@@ -191,8 +191,9 @@ using DeviceTypeArgument = std::pair<IdentifierInfo *, SourceLocation>;
191
191
// / an identifier. The 'asterisk' means 'the rest'.
192
192
class OpenACCDeviceTypeClause final
193
193
: public OpenACCClauseWithParams,
194
- public llvm::TrailingObjects<OpenACCDeviceTypeClause,
194
+ private llvm::TrailingObjects<OpenACCDeviceTypeClause,
195
195
DeviceTypeArgument> {
196
+ friend TrailingObjects;
196
197
// Data stored in trailing objects as IdentifierInfo* /SourceLocation pairs. A
197
198
// nullptr IdentifierInfo* represents an asterisk.
198
199
unsigned NumArchs;
@@ -377,7 +378,8 @@ class OpenACCClauseWithExprs : public OpenACCClauseWithParams {
377
378
// Represents the 'devnum' and expressions lists for the 'wait' clause.
378
379
class OpenACCWaitClause final
379
380
: public OpenACCClauseWithExprs,
380
- public llvm::TrailingObjects<OpenACCWaitClause, Expr *> {
381
+ private llvm::TrailingObjects<OpenACCWaitClause, Expr *> {
382
+ friend TrailingObjects;
381
383
SourceLocation QueuesLoc;
382
384
OpenACCWaitClause (SourceLocation BeginLoc, SourceLocation LParenLoc,
383
385
Expr *DevNumExpr, SourceLocation QueuesLoc,
@@ -419,7 +421,8 @@ class OpenACCWaitClause final
419
421
420
422
class OpenACCNumGangsClause final
421
423
: public OpenACCClauseWithExprs,
422
- public llvm::TrailingObjects<OpenACCNumGangsClause, Expr *> {
424
+ private llvm::TrailingObjects<OpenACCNumGangsClause, Expr *> {
425
+ friend TrailingObjects;
423
426
424
427
OpenACCNumGangsClause (SourceLocation BeginLoc, SourceLocation LParenLoc,
425
428
ArrayRef<Expr *> IntExprs, SourceLocation EndLoc)
@@ -449,7 +452,8 @@ class OpenACCNumGangsClause final
449
452
450
453
class OpenACCTileClause final
451
454
: public OpenACCClauseWithExprs,
452
- public llvm::TrailingObjects<OpenACCTileClause, Expr *> {
455
+ private llvm::TrailingObjects<OpenACCTileClause, Expr *> {
456
+ friend TrailingObjects;
453
457
OpenACCTileClause (SourceLocation BeginLoc, SourceLocation LParenLoc,
454
458
ArrayRef<Expr *> SizeExprs, SourceLocation EndLoc)
455
459
: OpenACCClauseWithExprs(OpenACCClauseKind::Tile, BeginLoc, LParenLoc,
@@ -503,7 +507,8 @@ class OpenACCClauseWithSingleIntExpr : public OpenACCClauseWithExprs {
503
507
504
508
class OpenACCGangClause final
505
509
: public OpenACCClauseWithExprs,
506
- public llvm::TrailingObjects<OpenACCGangClause, Expr *, OpenACCGangKind> {
510
+ private llvm::TrailingObjects<OpenACCGangClause, Expr *, OpenACCGangKind> {
511
+ friend TrailingObjects;
507
512
protected:
508
513
OpenACCGangClause (SourceLocation BeginLoc, SourceLocation LParenLoc,
509
514
ArrayRef<OpenACCGangKind> GangKinds,
@@ -658,7 +663,8 @@ class OpenACCClauseWithVarList : public OpenACCClauseWithExprs {
658
663
659
664
class OpenACCPrivateClause final
660
665
: public OpenACCClauseWithVarList,
661
- public llvm::TrailingObjects<OpenACCPrivateClause, Expr *> {
666
+ private llvm::TrailingObjects<OpenACCPrivateClause, Expr *> {
667
+ friend TrailingObjects;
662
668
663
669
OpenACCPrivateClause (SourceLocation BeginLoc, SourceLocation LParenLoc,
664
670
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
@@ -680,7 +686,8 @@ class OpenACCPrivateClause final
680
686
681
687
class OpenACCFirstPrivateClause final
682
688
: public OpenACCClauseWithVarList,
683
- public llvm::TrailingObjects<OpenACCFirstPrivateClause, Expr *> {
689
+ private llvm::TrailingObjects<OpenACCFirstPrivateClause, Expr *> {
690
+ friend TrailingObjects;
684
691
685
692
OpenACCFirstPrivateClause (SourceLocation BeginLoc, SourceLocation LParenLoc,
686
693
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
@@ -702,7 +709,8 @@ class OpenACCFirstPrivateClause final
702
709
703
710
class OpenACCDevicePtrClause final
704
711
: public OpenACCClauseWithVarList,
705
- public llvm::TrailingObjects<OpenACCDevicePtrClause, Expr *> {
712
+ private llvm::TrailingObjects<OpenACCDevicePtrClause, Expr *> {
713
+ friend TrailingObjects;
706
714
707
715
OpenACCDevicePtrClause (SourceLocation BeginLoc, SourceLocation LParenLoc,
708
716
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
@@ -724,7 +732,8 @@ class OpenACCDevicePtrClause final
724
732
725
733
class OpenACCAttachClause final
726
734
: public OpenACCClauseWithVarList,
727
- public llvm::TrailingObjects<OpenACCAttachClause, Expr *> {
735
+ private llvm::TrailingObjects<OpenACCAttachClause, Expr *> {
736
+ friend TrailingObjects;
728
737
729
738
OpenACCAttachClause (SourceLocation BeginLoc, SourceLocation LParenLoc,
730
739
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
@@ -746,7 +755,8 @@ class OpenACCAttachClause final
746
755
747
756
class OpenACCDetachClause final
748
757
: public OpenACCClauseWithVarList,
749
- public llvm::TrailingObjects<OpenACCDetachClause, Expr *> {
758
+ private llvm::TrailingObjects<OpenACCDetachClause, Expr *> {
759
+ friend TrailingObjects;
750
760
751
761
OpenACCDetachClause (SourceLocation BeginLoc, SourceLocation LParenLoc,
752
762
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
@@ -768,7 +778,8 @@ class OpenACCDetachClause final
768
778
769
779
class OpenACCDeleteClause final
770
780
: public OpenACCClauseWithVarList,
771
- public llvm::TrailingObjects<OpenACCDeleteClause, Expr *> {
781
+ private llvm::TrailingObjects<OpenACCDeleteClause, Expr *> {
782
+ friend TrailingObjects;
772
783
773
784
OpenACCDeleteClause (SourceLocation BeginLoc, SourceLocation LParenLoc,
774
785
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
@@ -790,7 +801,8 @@ class OpenACCDeleteClause final
790
801
791
802
class OpenACCUseDeviceClause final
792
803
: public OpenACCClauseWithVarList,
793
- public llvm::TrailingObjects<OpenACCUseDeviceClause, Expr *> {
804
+ private llvm::TrailingObjects<OpenACCUseDeviceClause, Expr *> {
805
+ friend TrailingObjects;
794
806
795
807
OpenACCUseDeviceClause (SourceLocation BeginLoc, SourceLocation LParenLoc,
796
808
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
@@ -812,7 +824,8 @@ class OpenACCUseDeviceClause final
812
824
813
825
class OpenACCNoCreateClause final
814
826
: public OpenACCClauseWithVarList,
815
- public llvm::TrailingObjects<OpenACCNoCreateClause, Expr *> {
827
+ private llvm::TrailingObjects<OpenACCNoCreateClause, Expr *> {
828
+ friend TrailingObjects;
816
829
817
830
OpenACCNoCreateClause (SourceLocation BeginLoc, SourceLocation LParenLoc,
818
831
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
@@ -834,7 +847,8 @@ class OpenACCNoCreateClause final
834
847
835
848
class OpenACCPresentClause final
836
849
: public OpenACCClauseWithVarList,
837
- public llvm::TrailingObjects<OpenACCPresentClause, Expr *> {
850
+ private llvm::TrailingObjects<OpenACCPresentClause, Expr *> {
851
+ friend TrailingObjects;
838
852
839
853
OpenACCPresentClause (SourceLocation BeginLoc, SourceLocation LParenLoc,
840
854
ArrayRef<Expr *> VarList, SourceLocation EndLoc)
@@ -856,7 +870,8 @@ class OpenACCPresentClause final
856
870
857
871
class OpenACCCopyClause final
858
872
: public OpenACCClauseWithVarList,
859
- public llvm::TrailingObjects<OpenACCCopyClause, Expr *> {
873
+ private llvm::TrailingObjects<OpenACCCopyClause, Expr *> {
874
+ friend TrailingObjects;
860
875
861
876
OpenACCCopyClause (OpenACCClauseKind Spelling, SourceLocation BeginLoc,
862
877
SourceLocation LParenLoc, ArrayRef<Expr *> VarList,
@@ -885,7 +900,8 @@ class OpenACCCopyClause final
885
900
886
901
class OpenACCCopyInClause final
887
902
: public OpenACCClauseWithVarList,
888
- public llvm::TrailingObjects<OpenACCCopyInClause, Expr *> {
903
+ private llvm::TrailingObjects<OpenACCCopyInClause, Expr *> {
904
+ friend TrailingObjects;
889
905
bool IsReadOnly;
890
906
891
907
OpenACCCopyInClause (OpenACCClauseKind Spelling, SourceLocation BeginLoc,
@@ -917,7 +933,8 @@ class OpenACCCopyInClause final
917
933
918
934
class OpenACCCopyOutClause final
919
935
: public OpenACCClauseWithVarList,
920
- public llvm::TrailingObjects<OpenACCCopyOutClause, Expr *> {
936
+ private llvm::TrailingObjects<OpenACCCopyOutClause, Expr *> {
937
+ friend TrailingObjects;
921
938
bool IsZero;
922
939
923
940
OpenACCCopyOutClause (OpenACCClauseKind Spelling, SourceLocation BeginLoc,
@@ -949,7 +966,8 @@ class OpenACCCopyOutClause final
949
966
950
967
class OpenACCCreateClause final
951
968
: public OpenACCClauseWithVarList,
952
- public llvm::TrailingObjects<OpenACCCreateClause, Expr *> {
969
+ private llvm::TrailingObjects<OpenACCCreateClause, Expr *> {
970
+ friend TrailingObjects;
953
971
bool IsZero;
954
972
955
973
OpenACCCreateClause (OpenACCClauseKind Spelling, SourceLocation BeginLoc,
@@ -981,7 +999,8 @@ class OpenACCCreateClause final
981
999
982
1000
class OpenACCReductionClause final
983
1001
: public OpenACCClauseWithVarList,
984
- public llvm::TrailingObjects<OpenACCReductionClause, Expr *> {
1002
+ private llvm::TrailingObjects<OpenACCReductionClause, Expr *> {
1003
+ friend TrailingObjects;
985
1004
OpenACCReductionOperator Op;
986
1005
987
1006
OpenACCReductionClause (SourceLocation BeginLoc, SourceLocation LParenLoc,
0 commit comments