clang: include/clang/AST/DeclCXX.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#ifndef LLVM_CLANG_AST_DECLCXX_H
16#define LLVM_CLANG_AST_DECLCXX_H
17
37#include "llvm/ADT/ArrayRef.h"
38#include "llvm/ADT/DenseMap.h"
39#include "llvm/ADT/PointerIntPair.h"
40#include "llvm/ADT/PointerUnion.h"
41#include "llvm/ADT/STLExtras.h"
42#include "llvm/ADT/TinyPtrVector.h"
43#include "llvm/ADT/iterator_range.h"
44#include "llvm/Support/Casting.h"
45#include "llvm/Support/Compiler.h"
46#include "llvm/Support/PointerLikeTypeTraits.h"
47#include "llvm/Support/TrailingObjects.h"
48#include
49#include
50#include
51#include
52#include
53
55
75
76
77
78
79
80
81
82
83
84
85
86class AccessSpecDecl : public Decl {
87
89
92 : Decl(AccessSpec, DC, ASLoc), ColonLoc(ColonLoc) {
94 }
95
97
98 virtual void anchor();
99
100public:
101
103
104
106
107
109
110
112
116
120 return new (C, DC) AccessSpecDecl(AS, DC, ASLoc, ColonLoc);
121 }
122
124
125
128};
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
147
148
149
151
152
153
155
156
157 LLVM_PREFERRED_TYPE(bool)
158 unsigned Virtual : 1;
159
160
161
162
163
164 LLVM_PREFERRED_TYPE(bool)
165 unsigned BaseOfClass : 1;
166
167
168
169
170
172 unsigned Access : 2;
173
174
175
176 LLVM_PREFERRED_TYPE(bool)
177 unsigned InheritConstructors : 1;
178
179
180
181
182
184
185public:
189 : Range(R), EllipsisLoc(EllipsisLoc), Virtual(V), BaseOfClass(BC),
190 Access(A), InheritConstructors(false), BaseTypeInfo(TInfo) {}
191
192
196
197
199 return BaseTypeInfo->getTypeLoc().getBeginLoc();
200 }
201
202
204
205
206
208
209
211
212
214
215
217 InheritConstructors = Inherit;
218 }
219
220
222 return EllipsisLoc;
223 }
224
225
226
227
228
229
236
237
238
239
240
241
245
246
247
248
250 return BaseTypeInfo->getType().getUnqualifiedType();
251 }
252
253
255};
256
257
269
272
273
274 enum SpecialMemberFlags {
275 SMF_DefaultConstructor = 0x1,
276 SMF_CopyConstructor = 0x2,
277 SMF_MoveConstructor = 0x4,
278 SMF_CopyAssignment = 0x8,
279 SMF_MoveAssignment = 0x10,
280 SMF_Destructor = 0x20,
281 SMF_All = 0x3f
282 };
283
284public:
290
291private:
292 struct DefinitionData {
293 #define FIELD(Name, Width, Merge) \
294 unsigned Name : Width;
295 #include "CXXRecordDeclDefinitionBits.def"
296
297
298 LLVM_PREFERRED_TYPE(bool)
299 unsigned IsLambda : 1;
300
301
302 LLVM_PREFERRED_TYPE(bool)
303 unsigned IsParsingBaseSpecifiers : 1;
304
305
306
307 LLVM_PREFERRED_TYPE(bool)
308 unsigned ComputedVisibleConversions : 1;
309
310 LLVM_PREFERRED_TYPE(bool)
311 unsigned HasODRHash : 1;
312
313
314 unsigned ODRHash = 0;
315
316
317 unsigned NumBases = 0;
318
319
320 unsigned NumVBases = 0;
321
322
323
324
326
327
329
330
331
332
333
334 LazyASTUnresolvedSet Conversions;
335
336
337
338
339
340
341 LazyASTUnresolvedSet VisibleConversions;
342
343
345
346
347
348
349
351
353
354
355 CXXBaseSpecifier *getBases() const {
356 if (!Bases.isOffset())
357 return Bases.get(nullptr);
358 return getBasesSlowCase();
359 }
360
361
362 CXXBaseSpecifier *getVBases() const {
363 if (!VBases.isOffset())
364 return VBases.get(nullptr);
365 return getVBasesSlowCase();
366 }
367
368 ArrayRef bases() const { return {getBases(), NumBases}; }
369
370 ArrayRef vbases() const {
371 return {getVBases(), NumVBases};
372 }
373
374 private:
375 CXXBaseSpecifier *getBasesSlowCase() const;
376 CXXBaseSpecifier *getVBasesSlowCase() const;
377 };
378
379 struct DefinitionData *DefinitionData;
380
381
382 struct LambdaDefinitionData : public DefinitionData {
383 using Capture = LambdaCapture;
384
385
386
387
388
389
390
391
392
394 unsigned DependencyKind : 2;
395
396
397 LLVM_PREFERRED_TYPE(bool)
398 unsigned IsGenericLambda : 1;
399
400
402 unsigned CaptureDefault : 2;
403
404
405 unsigned NumCaptures : 15;
406
407
408 unsigned NumExplicitCaptures : 12;
409
410
411 LLVM_PREFERRED_TYPE(bool)
412 unsigned HasKnownInternalLinkage : 1;
413
414
415
416 unsigned ManglingNumber : 31;
417
418
419
420 unsigned IndexInContext;
421
422
423
424
425
427
428
429
430
431
432 llvm::TinyPtrVector<Capture*> Captures;
433
434
435 TypeSourceInfo *MethodTyInfo;
436
437 LambdaDefinitionData(CXXRecordDecl *D, TypeSourceInfo *Info, unsigned DK,
439 : DefinitionData(D), DependencyKind(DK), IsGenericLambda(IsGeneric),
440 CaptureDefault(CaptureDefault), NumCaptures(0),
441 NumExplicitCaptures(0), HasKnownInternalLinkage(0), ManglingNumber(0),
442 IndexInContext(0), MethodTyInfo(Info) {
443 IsLambda = true;
444
445
446
448 PlainOldData = false;
449 }
450
451
452 void AddCaptureList(ASTContext &Ctx, Capture *CaptureList);
453 };
454
455 struct DefinitionData *dataPtr() const {
456
458 return DefinitionData;
459 }
460
461 struct DefinitionData &data() const {
462 auto *DD = dataPtr();
463 assert(DD && "queried property of class with no definition");
464 return *DD;
465 }
466
467 struct LambdaDefinitionData &getLambdaData() const {
468
469
470 auto *DD = DefinitionData;
471 assert(DD && DD->IsLambda && "queried lambda property of non-lambda class");
472 return static_cast<LambdaDefinitionData&>(*DD);
473 }
474
475
476
477
478
479
480
481
482
483
484 llvm::PointerUnion<ClassTemplateDecl *, MemberSpecializationInfo *>
485 TemplateOrInstantiation;
486
487
488
490
491
492
493
494
495
496 void addedMember(Decl *D);
497
498 void markedVirtualFunctionPure();
499
500
501
502 FriendDecl *getFirstFriend() const;
503
504
505
506
507 bool hasSubobjectAtOffsetZeroOfEmptyBaseType(ASTContext &Ctx,
509
510protected:
512 SourceLocation StartLoc, SourceLocation IdLoc,
514
515public:
516
518
519
521
525
529
531 return cast_or_null(
533 }
534
538
543
547
549
550
551 auto *DD = DefinitionData ? DefinitionData : dataPtr();
552 return DD ? DD->Definition : nullptr;
553 }
554
560
561 bool hasDefinition() const { return DefinitionData || dataPtr(); }
562
569 unsigned DependencyKind, bool IsGeneric,
573
575 return data().Polymorphic || data().NumVBases != 0;
576 }
577
578
579
583
584
585
589
591
593 return data().IsParsingBaseSpecifiers;
594 }
595
597
598
600
601
602 unsigned getNumBases() const { return data().NumBases; }
603
606 llvm::iterator_range<base_class_const_iterator>;
607
614
621
622
623 unsigned getNumVBases() const { return data().NumVBases; }
624
631
638
639
640
642
643
644
645
648 llvm::iterator_range<specific_decl_iterator>;
649
653
654
655
659
660
664
665
668 llvm::iterator_range<specific_decl_iterator>;
669
671
675
679
680
681
682 class friend_iterator;
683 using friend_range = llvm::iterator_range<friend_iterator>;
684
689
690
692 return data().FirstFriend.isValid();
693 }
694
695
696
699 (data().DeclaredSpecialMembers & SMF_CopyConstructor)) &&
700 "this property has not yet been computed by Sema");
701 return data().DefaultedCopyConstructorIsDeleted;
702 }
703
704
705
708 (data().DeclaredSpecialMembers & SMF_MoveConstructor)) &&
709 "this property has not yet been computed by Sema");
710 return data().DefaultedMoveConstructorIsDeleted;
711 }
712
713
716 (data().DeclaredSpecialMembers & SMF_Destructor)) &&
717 "this property has not yet been computed by Sema");
718 return data().DefaultedDestructorIsDeleted;
719 }
720
721
722
725 !data().DefaultedCopyConstructorIsDeleted;
726 }
727
728
729
732 !data().DefaultedMoveConstructorIsDeleted;
733 }
734
735
736
739 !data().DefaultedCopyAssignmentIsDeleted;
740 }
741
742
743
746 !data().DefaultedMoveAssignmentIsDeleted;
747 }
748
749
750
753 !data().DefaultedDestructorIsDeleted;
754 }
755
756
758 return (data().DeclaredSpecialMembers & SMF_DefaultConstructor) ||
760 }
761
762
763
764
765
767 return (!data().UserDeclaredConstructor &&
768 !(data().DeclaredSpecialMembers & SMF_DefaultConstructor) &&
770
771
772
773 (data().HasInheritedDefaultConstructor &&
774 !(data().DeclaredSpecialMembers & SMF_DefaultConstructor));
775 }
776
777
778
779
781 return data().UserDeclaredConstructor;
782 }
783
784
785
787 return data().UserProvidedDefaultConstructor;
788 }
789
790
791
792
794 return data().UserDeclaredSpecialMembers & SMF_CopyConstructor;
795 }
796
797
798
800 return !(data().DeclaredSpecialMembers & SMF_CopyConstructor);
801 }
802
803
804
806
807
808
809
810
811
812 if (data().UserDeclaredSpecialMembers &
813 (SMF_MoveConstructor | SMF_MoveAssignment))
814 return true;
815 return data().NeedOverloadResolutionForCopyConstructor;
816 }
817
818
819
821 return data().ImplicitCopyConstructorCanHaveConstParamForNonVBase &&
823 data().ImplicitCopyConstructorCanHaveConstParamForVBase);
824 }
825
826
827
829 return data().HasDeclaredCopyConstructorWithConstParam ||
832 }
833
834
835
836
837
838
840 return data().UserDeclaredSpecialMembers &
841 (SMF_MoveConstructor | SMF_MoveAssignment);
842 }
843
844
845
847 return data().UserDeclaredSpecialMembers & SMF_MoveConstructor;
848 }
849
850
852 return (data().DeclaredSpecialMembers & SMF_MoveConstructor) ||
854 }
855
856
857
859 assert((data().DefaultedCopyConstructorIsDeleted ||
861 "Copy constructor should not be deleted");
862 data().DefaultedCopyConstructorIsDeleted = true;
863 }
864
865
866
868 assert((data().DefaultedMoveConstructorIsDeleted ||
870 "move constructor should not be deleted");
871 data().DefaultedMoveConstructorIsDeleted = true;
872 }
873
874
875
877 assert((data().DefaultedDestructorIsDeleted ||
879 "destructor should not be deleted");
880 data().DefaultedDestructorIsDeleted = true;
881
882
883
884
885
886
887 data().DefaultedDestructorIsConstexpr = data().NumVBases == 0;
888 }
889
890
891
893 return !(data().DeclaredSpecialMembers & SMF_MoveConstructor) &&
898 }
899
900
901
903 return data().NeedOverloadResolutionForMoveConstructor;
904 }
905
906
907
908
909
911 return data().UserDeclaredSpecialMembers & SMF_CopyAssignment;
912 }
913
914
915
917 assert((data().DefaultedCopyAssignmentIsDeleted ||
919 "copy assignment should not be deleted");
920 data().DefaultedCopyAssignmentIsDeleted = true;
921 }
922
923
924
926 return !(data().DeclaredSpecialMembers & SMF_CopyAssignment);
927 }
928
929
930
932
933
934
935
936
937
938 if (data().UserDeclaredSpecialMembers &
939 (SMF_MoveConstructor | SMF_MoveAssignment))
940 return true;
941 return data().NeedOverloadResolutionForCopyAssignment;
942 }
943
944
945
947 return data().ImplicitCopyAssignmentHasConstParam;
948 }
949
950
951
952
954 return data().HasDeclaredCopyAssignmentWithConstParam ||
957 }
958
959
960
962 return data().UserDeclaredSpecialMembers & SMF_MoveAssignment;
963 }
964
965
967 return (data().DeclaredSpecialMembers & SMF_MoveAssignment) ||
969 }
970
971
972
974 assert((data().DefaultedMoveAssignmentIsDeleted ||
976 "move assignment should not be deleted");
977 data().DefaultedMoveAssignmentIsDeleted = true;
978 }
979
980
981
982
984 return !(data().DeclaredSpecialMembers & SMF_MoveAssignment) &&
990 }
991
992
993
995 return data().NeedOverloadResolutionForMoveAssignment;
996 }
997
998
999
1000
1002 return data().UserDeclaredSpecialMembers & SMF_Destructor;
1003 }
1004
1005
1006
1008 return !(data().DeclaredSpecialMembers & SMF_Destructor);
1009 }
1010
1011
1012
1014 return data().NeedOverloadResolutionForDestructor;
1015 }
1016
1017
1019
1020 auto *DD = DefinitionData;
1021 return DD && DD->IsLambda;
1022 }
1023
1024
1025
1026
1028
1029
1030
1032
1033
1034
1036
1037
1038
1040
1041
1042
1043
1044
1045
1046
1047
1050
1051
1052
1053
1055
1056
1058
1063
1066 return false;
1068 }
1069
1070
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090 void
1091 getCaptureFields(llvm::DenseMap<const ValueDecl *, FieldDecl *> &Captures,
1093
1096
1100
1102 if (()) return nullptr;
1103 LambdaDefinitionData &LambdaData = getLambdaData();
1104 return LambdaData.Captures.empty() ? nullptr : LambdaData.Captures.front();
1105 }
1106
1111
1112 unsigned capture_size() const { return getLambdaData().NumCaptures; }
1113
1118
1120
1122 return data().Conversions.get(getASTContext()).begin();
1123 }
1124
1126 return data().Conversions.get(getASTContext()).end();
1127 }
1128
1129
1130
1131
1133
1134
1135
1136 llvm::iterator_range<conversion_iterator>
1138
1139
1140
1141
1142
1144
1145
1146
1147
1149
1150
1151
1152
1153
1154
1155
1156
1157
1160 data().HasUninitializedReferenceMember;
1161 }
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171 bool isPOD() const { return data().PlainOldData; }
1172
1173
1174
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186 bool isEmpty() const { return data().Empty; }
1187
1190
1192 return data().HasPrivateFields;
1193 }
1194
1196 return data().HasProtectedFields;
1197 }
1198
1199
1201 auto &D = data();
1202 return D.HasPublicFields || D.HasProtectedFields || D.HasPrivateFields;
1203 }
1204
1205
1206
1207
1208
1209
1211
1212
1213
1215
1216
1217
1218
1219
1220
1222
1223
1224
1226
1227
1228
1230
1231
1232
1234
1235
1237
1238
1239
1242 (data().HasTrivialSpecialMembers & SMF_DefaultConstructor);
1243 }
1244
1245
1246
1248 return (data().DeclaredNonTrivialSpecialMembers & SMF_DefaultConstructor) ||
1250 !(data().HasTrivialSpecialMembers & SMF_DefaultConstructor));
1251 }
1252
1253
1254
1256 return data().HasConstexprNonCopyMoveConstructor ||
1259 }
1260
1261
1262
1264 return data().DefaultedDefaultConstructorIsConstexpr &&
1267 }
1268
1269
1271 return data().HasConstexprDefaultConstructor ||
1274 }
1275
1276
1277
1279 return data().HasTrivialSpecialMembers & SMF_CopyConstructor;
1280 }
1281
1283 return data().HasTrivialSpecialMembersForCall & SMF_CopyConstructor;
1284 }
1285
1286
1287
1289 return data().DeclaredNonTrivialSpecialMembers & SMF_CopyConstructor ||
1291 }
1292
1294 return (data().DeclaredNonTrivialSpecialMembersForCall &
1295 SMF_CopyConstructor) ||
1297 }
1298
1299
1300
1303 (data().HasTrivialSpecialMembers & SMF_MoveConstructor);
1304 }
1305
1308 (data().HasTrivialSpecialMembersForCall & SMF_MoveConstructor);
1309 }
1310
1311
1312
1314 return (data().DeclaredNonTrivialSpecialMembers & SMF_MoveConstructor) ||
1316 !(data().HasTrivialSpecialMembers & SMF_MoveConstructor));
1317 }
1318
1320 return (data().DeclaredNonTrivialSpecialMembersForCall &
1321 SMF_MoveConstructor) ||
1323 !(data().HasTrivialSpecialMembersForCall & SMF_MoveConstructor));
1324 }
1325
1326
1327
1329 return data().HasTrivialSpecialMembers & SMF_CopyAssignment;
1330 }
1331
1332
1333
1335 return data().DeclaredNonTrivialSpecialMembers & SMF_CopyAssignment ||
1337 }
1338
1339
1340
1343 (data().HasTrivialSpecialMembers & SMF_MoveAssignment);
1344 }
1345
1346
1347
1349 return (data().DeclaredNonTrivialSpecialMembers & SMF_MoveAssignment) ||
1351 !(data().HasTrivialSpecialMembers & SMF_MoveAssignment));
1352 }
1353
1354
1355
1357 return data().DefaultedDestructorIsConstexpr &&
1359 }
1360
1361
1363
1364
1365
1367 return data().HasTrivialSpecialMembers & SMF_Destructor;
1368 }
1369
1371 return data().HasTrivialSpecialMembersForCall & SMF_Destructor;
1372 }
1373
1374
1375
1377 return !(data().HasTrivialSpecialMembers & SMF_Destructor);
1378 }
1379
1381 return !(data().HasTrivialSpecialMembersForCall & SMF_Destructor);
1382 }
1383
1385 data().HasTrivialSpecialMembersForCall =
1386 (SMF_CopyConstructor | SMF_MoveConstructor | SMF_Destructor);
1387 }
1388
1389
1390
1392 return !data().HasUninitializedFields ||
1393 !(data().HasDefaultedDefaultConstructor ||
1395 }
1396
1397
1398
1399
1400
1401
1403 return data().HasIrrelevantDestructor;
1404 }
1405
1406
1407
1409 return data().HasNonLiteralTypeFieldsOrBases;
1410 }
1411
1412
1413
1415 return data().HasInheritedConstructor;
1416 }
1417
1418
1419
1421 return data().HasInheritedAssignment;
1422 }
1423
1424
1425
1427
1428
1430
1431
1432
1433
1434
1435
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1456
1457
1459 return isLiteral() && data().StructuralIfLiteral;
1460 }
1461
1462
1463
1464
1465
1466
1467
1468
1470
1471
1472
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1495
1496
1497
1498
1500
1501
1502
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1518
1520
1521
1522
1523
1525
1526
1528
1529
1530
1532
1535 ->getTemplateInstantiationPattern());
1536 }
1537
1538
1540
1541
1543
1544
1545
1547
1548
1549
1551
1552
1553
1555 if (const auto *RD = dyn_cast(getDeclContext()))
1556 return RD->isLocalClass();
1557
1559 }
1560
1563 const_cast<const CXXRecordDecl*>(this)->isLocalClass());
1564 }
1565
1566
1567
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1614
1615
1616
1618
1619
1620
1621
1622
1623
1626
1627
1628
1629
1630
1631
1632
1633
1634
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1673 bool LookupInDependent = false) const;
1674
1675
1676
1677
1678
1679
1680
1681
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1697
1698
1699
1700
1702
1703
1705
1706
1707
1708
1709
1710
1711
1713
1714
1715
1716
1718
1719
1720
1723 assert(DeclAccess != AS_none);
1725 return (PathAccess > DeclAccess ? PathAccess : DeclAccess);
1726 }
1727
1728
1729
1731
1733
1734
1736
1737
1738
1739
1740
1741
1742
1743
1745
1746
1747
1748
1749
1750
1751
1752
1754
1755
1756
1758
1759
1760
1761
1762
1763
1764
1766 assert(isLambda() && "Not a lambda closure type!");
1767 return getLambdaData().ManglingNumber;
1768 }
1769
1770
1771
1773 assert(isLambda() && "Not a lambda closure type!");
1774 return getLambdaData().HasKnownInternalLinkage;
1775 }
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1787
1788
1789
1791 assert(isLambda() && "Not a lambda closure type!");
1792 return getLambdaData().IndexInContext;
1793 }
1794
1795
1803
1804
1806
1807
1813
1814
1816
1817
1819
1820
1822
1823
1824
1825
1826
1827
1828
1830
1831
1832
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1849
1853
1857 return getLambdaData().DependencyKind;
1858 }
1859
1861 return getLambdaData().MethodTyInfo;
1862 }
1863
1865 assert(DefinitionData && DefinitionData->IsLambda &&
1866 "setting lambda property of non-lambda class");
1867 auto &DL = static_cast<LambdaDefinitionData &>(*DefinitionData);
1868 DL.MethodTyInfo = TS;
1869 }
1870
1872 getLambdaData().DependencyKind = Kind;
1873 }
1874
1876 assert(DefinitionData && DefinitionData->IsLambda &&
1877 "setting lambda property of non-lambda class");
1878 auto &DL = static_cast<LambdaDefinitionData &>(*DefinitionData);
1879 DL.IsGenericLambda = IsGeneric;
1880 }
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1907
1910
1911
1912
1914
1917 return K >= firstCXXRecord && K <= lastCXXRecord;
1918 }
1920};
1921
1922
1923
1925 llvm::PointerIntPair<Expr *, 2, ExplicitSpecKind> ExplicitSpec{
1927
1928public:
1933 const Expr *getExpr() const { return ExplicitSpec.getPointer(); }
1935
1936
1939 ExplicitSpec.getPointer();
1940 }
1941
1942
1943
1945
1946
1947
1951
1952
1955 !ExplicitSpec.getPointer();
1956 }
1959
1967};
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1980 void anchor() override;
1981
1982public:
1983
1984
1985
1990
1991private:
2000 : FunctionDecl(CXXDeductionGuide, C, DC, StartLoc, NameInfo, T, TInfo,
2002 TrailingRequiresClause),
2003 Ctor(Ctor), ExplicitSpec(ES),
2004 SourceDeductionGuide(GeneratedFrom, SourceKind) {
2005 if (EndLocation.isValid())
2008 }
2009
2010 CXXConstructorDecl *Ctor;
2011 ExplicitSpecifier ExplicitSpec;
2012
2013
2014
2015 llvm::PointerIntPair<const CXXDeductionGuideDecl *, 2,
2017 SourceDeductionGuide;
2018 void setExplicitSpecifier(ExplicitSpecifier ES) { ExplicitSpec = ES; }
2019
2020public:
2023
2024 static CXXDeductionGuideDecl *
2033
2036
2039
2040
2041 bool isExplicit() const { return ExplicitSpec.isExplicit(); }
2042
2043
2047
2048
2049
2051
2052
2053
2054
2056 return SourceDeductionGuide.getPointer();
2057 }
2058
2060 SourceDeductionGuide.setPointer(DG);
2061 }
2062
2064 return SourceDeductionGuide.getInt();
2065 }
2066
2068 SourceDeductionGuide.setInt(SK);
2069 }
2070
2072 FunctionDeclBits.DeductionCandidateKind = static_cast<unsigned char>(K);
2073 }
2074
2079
2080
2082 static bool classofKind(Kind K) { return K == CXXDeductionGuide; }
2083};
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2100 : Decl(RequiresExprBody, DC, StartLoc), DeclContext(RequiresExprBody) {}
2101
2102public:
2105
2108
2111
2112
2115
2117 return static_cast<DeclContext *>(const_cast<RequiresExprBodyDecl *>(D));
2118 }
2119
2121 return static_cast<RequiresExprBodyDecl *>(const_cast<DeclContext *>(DC));
2122 }
2123};
2124
2125
2126
2127
2128
2130 void anchor() override;
2131
2132protected:
2140 isInline, ConstexprKind, TrailingRequiresClause) {
2141 if (EndLocation.isValid())
2143 }
2144
2145public:
2147 Create(ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc,
2148 const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo,
2149 StorageClass SC, bool UsesFPIntrin, bool isInline,
2151 const AssociatedConstraint &TrailingRequiresClause = {});
2152
2154
2157
2158
2159
2160
2161
2163
2164
2165
2166
2168
2169
2170
2172
2173
2174
2175
2176
2177 return OOK == OO_New || OOK == OO_Array_New || OOK == OO_Delete ||
2178 OOK == OO_Array_Delete;
2179 }
2180
2183
2186
2187
2188
2190 return true;
2191
2193 }
2194
2195
2196
2197
2198
2199
2201
2203 bool IsAppleKext) const {
2205 Base, IsAppleKext);
2206 }
2207
2208
2209
2210
2211
2212
2213
2214
2217
2218
2219
2221
2222
2224
2231
2239
2241
2243
2247
2249 llvm::TinyPtrVector<const CXXMethodDecl *>::const_iterator>;
2250
2252
2253
2254
2258
2259
2260
2265
2266
2267
2268
2269
2270
2271
2273
2274
2275
2276
2277
2282
2286
2289
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2308
2310
2311
2312
2313
2314
2315
2316
2317
2319
2320
2321
2322
2323
2324
2327 bool MayBeBase = false);
2328
2331 bool MayBeBase = false) const {
2334 }
2335
2336
2337
2339 bool MayBeBase = false);
2342 bool MayBeBase = false) const {
2345 }
2346
2347
2350 return K >= firstCXXMethod && K <= lastCXXMethod;
2351 }
2352};
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2370
2371
2372
2373 llvm::PointerUnion<TypeSourceInfo *, FieldDecl *, IndirectFieldDecl *>
2374 Initializee;
2375
2376
2377
2379
2380
2381
2382
2383
2384
2385
2387
2388
2390
2391
2393
2394
2395
2396 LLVM_PREFERRED_TYPE(bool)
2397 unsigned IsDelegating : 1;
2398
2399
2400
2401 LLVM_PREFERRED_TYPE(bool)
2402 unsigned IsVirtual : 1;
2403
2404
2405
2406 LLVM_PREFERRED_TYPE(bool)
2407 unsigned IsWritten : 1;
2408
2409
2410
2411 unsigned SourceOrder : 13;
2412
2413public:
2414
2415 explicit
2419
2420
2421 explicit
2425
2426
2427 explicit
2431
2432
2433 explicit
2436
2437
2439
2440
2444
2445
2446
2448
2452
2456
2457
2458
2459
2460
2461
2462
2464 return Init->getStmtClass() == Stmt::CXXDefaultInitExprClass;
2465 }
2466
2467
2468
2472
2473
2477
2478
2481 return {};
2482 return MemberOrEllipsisLocation;
2483 }
2484
2485
2486
2487
2489
2490
2491
2493
2494
2496 assert(isBaseInitializer() && "Must call this on base initializer!");
2497
2498 return IsVirtual;
2499 }
2500
2501
2502
2506
2507
2508
2512 return nullptr;
2513 }
2514
2520 return nullptr;
2521 }
2522
2526 return nullptr;
2527 }
2528
2530 return MemberOrEllipsisLocation;
2531 }
2532
2533
2535
2536
2538
2539
2540
2542
2543
2544
2546 return IsWritten ? static_cast<int>(SourceOrder) : -1;
2547 }
2548
2549
2550
2551
2552
2553
2554
2555
2557 assert(!IsWritten &&
2558 "setSourceOrder() used on implicit initializer");
2559 assert(SourceOrder == 0 &&
2560 "calling twice setSourceOrder() on the same initializer");
2561 assert(Pos >= 0 &&
2562 "setSourceOrder() used to make an initializer implicit");
2563 IsWritten = true;
2564 SourceOrder = static_cast<unsigned>(Pos);
2565 }
2566
2569
2570
2572};
2573
2574
2578
2579public:
2583 : Shadow(Shadow), BaseCtor(BaseCtor) {}
2584
2585 explicit operator bool() const { return Shadow; }
2586
2589};
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601class CXXConstructorDecl final
2603 private llvm::TrailingObjects<CXXConstructorDecl, InheritedConstructor,
2604 ExplicitSpecifier> {
2605
2606
2607
2608
2609
2610
2612
2620
2621 void anchor() override;
2622
2623 size_t numTrailingObjects(OverloadToken) const {
2625 }
2626
2629 return *getTrailingObjects();
2634 }
2635
2636 enum TrailingAllocKind {
2637 TAKInheritsConstructor = 1,
2638 TAKHasTailExplicit = 1 << 1,
2639 };
2640
2641 uint64_t getTrailingAllocKind() const {
2642 uint64_t Kind = 0;
2644 Kind |= TAKInheritsConstructor;
2646 Kind |= TAKHasTailExplicit;
2647 return Kind;
2648 }
2649
2650public:
2654
2656 uint64_t AllocKind);
2657 static CXXConstructorDecl *
2664
2666 assert((!ES.getExpr() ||
2668 "cannot set this explicit specifier. no trail-allocated space for "
2669 "explicit");
2672 else
2674 }
2675
2682
2683
2685
2686
2688
2689
2691
2692 using init_range = llvm::iterator_range<init_iterator>;
2694
2699
2700
2702 const auto *ConstThis = this;
2703 return const_cast<init_iterator>(ConstThis->init_begin());
2704 }
2705
2706
2708
2709
2713
2714
2718
2721 std::reverse_iterator<init_const_iterator>;
2722
2729
2736
2737
2738
2742
2745
2746
2747
2749 numCtorInitializers && "NumCtorInitializers overflow!");
2750 }
2751
2753 CtorInitializers = Initializers;
2754 }
2755
2756
2761
2762
2764
2765
2766
2767
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2784
2785
2786
2787
2789 unsigned TypeQuals = 0;
2791 }
2792
2793
2794
2795
2796
2797
2799
2800
2801
2803 unsigned TypeQuals = 0;
2805 }
2806
2807
2808
2809
2810
2812
2813
2815 unsigned Quals;
2817 }
2818
2819
2820
2821
2823
2824
2825
2826
2828
2829
2830
2834
2835
2836
2840
2841
2846
2853
2854
2856 static bool classofKind(Kind K) { return K == CXXConstructor; }
2857};
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2872
2873
2874
2875 Expr *OperatorDeleteThisArg = nullptr;
2876
2882 : CXXMethodDecl(CXXDestructor, C, RD, StartLoc, NameInfo, T, TInfo,
2886 }
2887
2888 void anchor() override;
2889
2890public:
2891 static CXXDestructorDecl *
2892 Create(ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc,
2893 const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo,
2894 bool UsesFPIntrin, bool isInline, bool isImplicitlyDeclared,
2896 const AssociatedConstraint &TrailingRequiresClause = {});
2897 static CXXDestructorDecl *CreateDeserialized(ASTContext &C, GlobalDeclID ID);
2898
2907
2911
2912
2913
2914
2916
2923
2924
2926 static bool classofKind(Kind K) { return K == CXXDestructor; }
2927};
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2946 : CXXMethodDecl(CXXConversion, C, RD, StartLoc, NameInfo, T, TInfo,
2948 EndLocation, TrailingRequiresClause),
2949 ExplicitSpec(ES) {}
2950 void anchor() override;
2951
2953
2954public:
2957
2958 static CXXConversionDecl *
2965
2969
2973
2974
2977
2978
2982
2983
2984
2986
2993
2994
2996 static bool classofKind(Kind K) { return K == CXXConversion; }
2997};
2998
2999
3000
3001
3002
3004
3005
3006
3007
3008
3009
3010
3012 virtual void anchor();
3013
3014
3015
3016
3018
3019
3021
3024 bool HasBraces);
3025
3026public:
3032
3033
3037
3038
3042
3043
3044
3049
3054 RBraceLoc = L;
3056 }
3057
3065
3069
3072
3074 return static_cast<DeclContext *>(const_cast<LinkageSpecDecl*>(D));
3075 }
3076
3078 return static_cast<LinkageSpecDecl *>(const_cast<DeclContext*>(DC));
3079 }
3080};
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3093
3095
3096
3098
3099
3101
3102
3104
3105
3106
3108
3115 : NamedDecl(UsingDirective, DC, IdentLoc, getName()), UsingLoc(UsingLoc),
3116 NamespaceLoc(NamespcLoc), QualifierLoc(QualifierLoc),
3117 NominatedNamespace(Nominated), CommonAncestor(CommonAncestor) {}
3118
3119
3120
3121
3122
3125 }
3126
3127 void anchor() override;
3128
3129public:
3131
3132
3134
3135
3136
3138
3139
3140
3142 return QualifierLoc.getNestedNameSpecifier();
3143 }
3144
3147 return NominatedNamespace;
3148 }
3149
3150
3152
3156
3157
3158
3161
3162
3164
3165
3166
3168
3169
3171
3180
3184
3187};
3188
3189
3190
3191
3192
3193
3194
3195
3199
3200
3202
3203
3204
3205
3207
3208
3210
3211
3212
3214
3220 redeclarable_base(C), NamespaceLoc(NamespaceLoc), IdentLoc(IdentLoc),
3221 QualifierLoc(QualifierLoc), Namespace(Namespace) {}
3222
3223 void anchor() override;
3224
3226
3230
3231public:
3237
3239
3242
3248
3255
3256
3257
3259
3260
3261
3263 return QualifierLoc.getNestedNameSpecifier();
3264 }
3265
3266
3268 if (auto *AD = dyn_cast(Namespace))
3270
3272 }
3273
3275 return const_cast<NamespaceAliasDecl *>(this)->getNamespace();
3276 }
3277
3278
3279
3281
3282
3284
3285
3287
3288
3289
3291
3293 return SourceRange(NamespaceLoc, IdentLoc);
3294 }
3295
3298};
3299
3300
3301
3302class LifetimeExtendedTemporaryDecl final
3303 : public Decl,
3304 public Mergeable {
3307
3308 Stmt *ExprWithTemporary = nullptr;
3309
3310
3311
3312 ValueDecl *ExtendingDecl = nullptr;
3313 unsigned ManglingNumber;
3314
3315 mutable APValue *Value = nullptr;
3316
3317 LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION();
3318
3319 LifetimeExtendedTemporaryDecl(Expr *Temp, ValueDecl *EDecl, unsigned Mangling)
3322 ExprWithTemporary(Temp), ExtendingDecl(EDecl),
3323 ManglingNumber(Mangling) {}
3324
3326 : Decl(Decl::LifetimeExtendedTemporary, EmptyShell{}) {}
3327
3328public:
3330 unsigned Mangling) {
3332 LifetimeExtendedTemporaryDecl(Temp, EDec, Mangling);
3333 }
3336 return new (C, ID) LifetimeExtendedTemporaryDecl(EmptyShell{});
3337 }
3338
3341
3342
3344
3345
3346
3347
3348
3349
3352
3354
3355
3356
3358
3360
3361
3365
3369
3372 return K == Decl::LifetimeExtendedTemporary;
3373 }
3374};
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3397
3398
3399 NamedDecl *Underlying = nullptr;
3400
3401
3402
3403 NamedDecl *UsingOrNextShadow = nullptr;
3404
3405 void anchor() override;
3406
3408
3411 }
3412
3415 }
3416
3419 }
3420
3421protected:
3423 DeclarationName Name, BaseUsingDecl *Introducer,
3426
3427public:
3430
3434 return new (C, DC)
3436 }
3437
3439
3442
3449
3456
3457
3458
3460
3461
3462
3464 assert(ND && "Target decl is null!");
3465 Underlying = ND;
3466
3467
3471 }
3472
3473
3474
3476
3477
3478
3480 return dyn_cast_or_null(UsingOrNextShadow);
3481 }
3482
3485 return K == Decl::UsingShadow || K == Decl::ConstructorUsingShadow;
3486 }
3487};
3488
3489
3490
3491
3493
3494
3495
3496
3497
3498 llvm::PointerIntPair<UsingShadowDecl *, 1, bool> FirstUsingShadow;
3499
3500protected:
3503
3504private:
3505 void anchor() override;
3506
3507protected:
3508
3509 bool getShadowFlag() const { return FirstUsingShadow.getInt(); }
3510
3511
3513
3514public:
3517
3518
3519
3521
3523
3524 public:
3530
3533
3536
3539 return *this;
3540 }
3541
3544 ++(*this);
3545 return tmp;
3546 }
3547
3549 return x.Current == y.Current;
3550 }
3552 return x.Current != y.Current;
3553 }
3554 };
3555
3557
3561
3565
3567
3568
3569
3573
3576
3578 static bool classofKind(Kind K) { return K == Using || K == UsingEnum; }
3579};
3580
3581
3582
3583
3584
3585
3586
3588
3590
3591
3593
3594
3595
3597
3602 UsingLocation(UL), QualifierLoc(QualifierLoc),
3603 DNLoc(NameInfo.getInfo()) {
3605 }
3606
3607 void anchor() override;
3608
3609public:
3612
3613
3615
3616
3618
3619
3620
3622
3623
3625 return QualifierLoc.getNestedNameSpecifier();
3626 }
3627
3631
3632
3634
3635
3637
3638
3640
3645 bool HasTypenameKeyword);
3646
3648
3650
3651
3658
3661};
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3674
3675
3676
3677 ConstructorUsingShadowDecl *NominatedBaseClassShadowDecl = nullptr;
3678
3679
3680
3681
3682
3683 ConstructorUsingShadowDecl *ConstructedBaseClassShadowDecl = nullptr;
3684
3685
3686
3687
3688 LLVM_PREFERRED_TYPE(bool)
3689 unsigned IsVirtual : 1;
3690
3693 bool TargetInVirtualBase)
3695 Using->getDeclName(), Using,
3696 Target->getUnderlyingDecl()),
3697 NominatedBaseClassShadowDecl(
3698 dyn_cast(Target)),
3699 ConstructedBaseClassShadowDecl(NominatedBaseClassShadowDecl),
3700 IsVirtual(TargetInVirtualBase) {
3701
3702
3703
3704 if (NominatedBaseClassShadowDecl &&
3705 NominatedBaseClassShadowDecl->constructsVirtualBase()) {
3706 ConstructedBaseClassShadowDecl =
3707 NominatedBaseClassShadowDecl->ConstructedBaseClassShadowDecl;
3708 IsVirtual = true;
3709 }
3710 }
3711
3714
3715 void anchor() override;
3716
3717public:
3720
3724 bool IsVirtual);
3727
3728
3729
3733
3734
3735
3736
3743
3744
3745
3746
3747
3749 return NominatedBaseClassShadowDecl;
3750 }
3751
3752
3753
3755 return ConstructedBaseClassShadowDecl;
3756 }
3757
3758
3759
3761
3762
3763
3766 ? ConstructedBaseClassShadowDecl
3769 }
3770
3771
3772
3774 return IsVirtual;
3775 }
3776
3779};
3780
3781
3782
3783
3784
3785
3786
3787
3789
3791
3793
3795
3798 : BaseUsingDecl(UsingEnum, DC, NL, DN), UsingLocation(UL), EnumLocation(EL),
3799 EnumType(EnumType){}
3800
3801 void anchor() override;
3802
3803public:
3806
3807
3810
3811
3820
3822 return EnumType->getTypeLoc();
3823 }
3825 return EnumType;
3826 }
3828
3829public:
3831 return EnumType->getType()->castAsclang::EnumType()->getDecl();
3832 }
3833
3837
3839
3841
3842
3849
3852};
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867class UsingPackDecl final
3869 private llvm::TrailingObjects<UsingPackDecl, NamedDecl *> {
3870
3871
3873
3874
3875 unsigned NumExpansions;
3876
3880 InstantiatedFrom ? InstantiatedFrom->getLocation()
3882 InstantiatedFrom ? InstantiatedFrom->getDeclName()
3884 InstantiatedFrom(InstantiatedFrom), NumExpansions(UsingDecls.size()) {
3885 llvm::uninitialized_copy(UsingDecls, getTrailingObjects());
3886 }
3887
3888 void anchor() override;
3889
3890public:
3894
3895
3896
3897
3899
3900
3901
3903 return getTrailingObjects(NumExpansions);
3904 }
3905
3909
3911 unsigned NumExpansions);
3912
3914 return InstantiatedFrom->getSourceRange();
3915 }
3916
3919
3922};
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935class UnresolvedUsingValueDecl : public ValueDecl,
3936 public Mergeable {
3937
3939
3940
3942
3943
3945
3946
3947
3949
3955 : ValueDecl(UnresolvedUsingValue, DC,
3957 UsingLocation(UsingLoc), EllipsisLoc(EllipsisLoc),
3958 QualifierLoc(QualifierLoc), DNLoc(NameInfo.getInfo()) {}
3959
3960 void anchor() override;
3961
3962public:
3965
3966
3968
3969
3971
3972
3974
3975
3976
3978
3979
3981 return QualifierLoc.getNestedNameSpecifier();
3982 }
3983
3987
3988
3990 return EllipsisLoc.isValid();
3991 }
3992
3993
3995 return EllipsisLoc;
3996 }
3997
4002
4005
4007
4008
4015
4018};
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031class UnresolvedUsingTypenameDecl
4033 public Mergeable {
4035
4036
4038
4039
4041
4042
4044
4051 : TypeDecl(UnresolvedUsingTypename, DC, TargetNameLoc, TargetName,
4052 UsingLoc),
4053 TypenameLocation(TypenameLoc), EllipsisLoc(EllipsisLoc),
4054 QualifierLoc(QualifierLoc) {}
4055
4056 void anchor() override;
4057
4058public:
4059
4061
4062
4064
4065
4066
4068
4069
4071 return QualifierLoc.getNestedNameSpecifier();
4072 }
4073
4077
4078
4080 return EllipsisLoc.isValid();
4081 }
4082
4083
4085 return EllipsisLoc;
4086 }
4087
4093
4096
4097
4104
4106 static bool classofKind(Kind K) { return K == UnresolvedUsingTypename; }
4107};
4108
4109
4110
4111
4112
4113
4114class UnresolvedUsingIfExistsDecl final : public NamedDecl {
4117
4118 void anchor() override;
4119
4120public:
4126
4128 static bool classofKind(Kind K) { return K == Decl::UnresolvedUsingIfExists; }
4129};
4130
4131
4132class StaticAssertDecl : public Decl {
4133 llvm::PointerIntPair<Expr *, 1, bool> AssertExprAndFailed;
4134 Expr *Message;
4136
4139 bool Failed)
4140 : Decl(StaticAssert, DC, StaticAssertLoc),
4141 AssertExprAndFailed(AssertExpr, Failed), Message(Message),
4142 RParenLoc(RParenLoc) {}
4143
4144 virtual void anchor();
4145
4146public:
4148
4151 Expr *AssertExpr, Expr *Message,
4154
4157
4160
4161 bool isFailed() const { return AssertExprAndFailed.getInt(); }
4162
4164
4168
4171};
4172
4173
4174
4175
4176
4177
4178
4179
4180
4182
4184
4185
4186
4187
4188 Expr *Binding = nullptr;
4189
4192 : ValueDecl(Decl::Binding, DC, IdLoc, Id, T) {}
4193
4194 void anchor() override;
4195
4196public:
4198
4203
4204
4205
4206
4208
4209
4211
4212
4213
4215
4216
4217
4218
4221 this->Binding = Binding;
4222 }
4223
4224
4226
4227
4228
4230
4233};
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243class DecompositionDecl final
4245 private llvm::TrailingObjects<DecompositionDecl, BindingDecl *> {
4246
4247 unsigned NumBindings;
4248
4253 : VarDecl(Decomposition, C, DC, StartLoc, LSquareLoc, nullptr, T, TInfo,
4254 SC),
4255 NumBindings(Bindings.size()) {
4256 llvm::uninitialized_copy(Bindings, getTrailingObjects());
4258 B->setDecomposedDecl(this);
4259 if (B->isParameterPack() && B->getBinding()) {
4261 NestedBD->setDecomposedDecl(this);
4262 }
4263 }
4264 }
4265 }
4266
4267 void anchor() override;
4268
4269public:
4272
4280 unsigned NumBindings);
4281
4282
4284 return getTrailingObjects(NumBindings);
4285 }
4286
4287
4291
4292
4295
4298 PackBindings = Bindings.front()->getBindingPackDecls();
4300 }
4301
4302 return llvm::concat<BindingDecl *const>(std::move(BeforePackBindings),
4303 std::move(PackBindings),
4305 }
4306
4308
4310 static bool classofKind(Kind K) { return K == Decomposition; }
4311};
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4342
4346 : DeclaratorDecl(MSProperty, DC, L, N, T, TInfo, StartL),
4347 GetterId(Getter), SetterId(Setter) {}
4348
4349 void anchor() override;
4350public:
4352
4358
4360
4361 bool hasGetter() const { return GetterId != nullptr; }
4363 bool hasSetter() const { return SetterId != nullptr; }
4365};
4366
4367
4368
4370
4372
4374
4376
4378
4380 uint64_t Val;
4382 return Val;
4383 }
4384};
4385
4386
4387
4388
4389
4390
4391
4394 public llvm::FoldingSetNode {
4395public:
4397
4398private:
4399
4401
4402
4403
4405
4406 void anchor() override;
4407
4409
4412
4413
4417
4418public:
4419
4420 void printName(llvm::raw_ostream &OS,
4422
4423
4425
4426
4427
4428
4430
4432 ID.AddInteger(P.Part1);
4433 ID.AddInteger(P.Part2);
4434 ID.AddInteger(P.Part3);
4436 }
4438
4441};
4442
4443
4444
4445
4446
4447
4448
4449class UnnamedGlobalConstantDecl : public ValueDecl,
4450 public Mergeable,
4451 public llvm::FoldingSetNode {
4452
4453
4455
4456 void anchor() override;
4457
4460
4463 static UnnamedGlobalConstantDecl *CreateDeserialized(ASTContext &C,
4465
4466
4467
4471
4472public:
4473
4474 void printName(llvm::raw_ostream &OS,
4476
4478
4487
4489 static bool classofKind(Kind K) { return K == Decl::UnnamedGlobalConstant; }
4490};
4491
4492
4493
4494const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
4495 AccessSpecifier AS);
4496
4497}
4498
4499#endif
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Defines the LambdaCapture class.
Defines several types used to describe C++ lambda expressions that are shared between the parser and ...
Defines the clang::LangOptions interface.
Defines an enumeration for C++ overloaded operators.
llvm::SmallVector< std::pair< const MemRegion *, SVal >, 4 > Bindings
Defines the clang::SourceLocation class and associated facilities.
Defines various enumerations that describe declaration and type specifiers.
C Language Family Type Representation.
Defines the clang::TypeLoc interface and its subclasses.
__DEVICE__ void * memcpy(void *__a, const void *__b, size_t __c)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
void Profile(llvm::FoldingSetNodeID &ID) const
profile this value.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Represents an access specifier followed by colon ':'.
Definition DeclCXX.h:86
static AccessSpecDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Definition DeclCXX.h:113
static AccessSpecDecl * Create(ASTContext &C, AccessSpecifier AS, DeclContext *DC, SourceLocation ASLoc, SourceLocation ColonLoc)
Definition DeclCXX.h:117
SourceLocation getColonLoc() const
The location of the colon following the access specifier.
Definition DeclCXX.h:108
static bool classof(const Decl *D)
Definition DeclCXX.h:126
static bool classofKind(Kind K)
Definition DeclCXX.h:127
SourceLocation getAccessSpecifierLoc() const
The location of the access specifier.
Definition DeclCXX.h:102
void setAccessSpecifierLoc(SourceLocation ASLoc)
Sets the location of the access specifier.
Definition DeclCXX.h:105
void setColonLoc(SourceLocation CLoc)
Sets the location of the colon.
Definition DeclCXX.h:111
Iterates through the using shadow declarations associated with this using declaration.
Definition DeclCXX.h:3520
shadow_iterator()=default
reference operator*() const
Definition DeclCXX.h:3534
pointer operator->() const
Definition DeclCXX.h:3535
shadow_iterator & operator++()
Definition DeclCXX.h:3537
UsingShadowDecl * reference
Definition DeclCXX.h:3526
std::forward_iterator_tag iterator_category
Definition DeclCXX.h:3528
shadow_iterator(UsingShadowDecl *C)
Definition DeclCXX.h:3532
friend bool operator==(shadow_iterator x, shadow_iterator y)
Definition DeclCXX.h:3548
UsingShadowDecl * value_type
Definition DeclCXX.h:3525
shadow_iterator operator++(int)
Definition DeclCXX.h:3542
UsingShadowDecl * pointer
Definition DeclCXX.h:3527
friend bool operator!=(shadow_iterator x, shadow_iterator y)
Definition DeclCXX.h:3551
std::ptrdiff_t difference_type
Definition DeclCXX.h:3529
Represents a C++ declaration that introduces decls from somewhere else.
Definition DeclCXX.h:3492
llvm::iterator_range< shadow_iterator > shadow_range
Definition DeclCXX.h:3556
bool getShadowFlag() const
A bool flag for use by a derived type.
Definition DeclCXX.h:3509
unsigned shadow_size() const
Return the number of shadowed declarations associated with this using declaration.
Definition DeclCXX.h:3570
void addShadowDecl(UsingShadowDecl *S)
shadow_range shadows() const
Definition DeclCXX.h:3558
friend class ASTDeclReader
Definition DeclCXX.h:3515
shadow_iterator shadow_end() const
Definition DeclCXX.h:3566
static bool classofKind(Kind K)
Definition DeclCXX.h:3578
BaseUsingDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N)
Definition DeclCXX.h:3501
friend class ASTDeclWriter
Definition DeclCXX.h:3516
shadow_iterator shadow_begin() const
Definition DeclCXX.h:3562
void setShadowFlag(bool V)
A bool flag a derived type may set.
Definition DeclCXX.h:3512
void removeShadowDecl(UsingShadowDecl *S)
static bool classof(const Decl *D)
Definition DeclCXX.h:3577
A binding in a decomposition declaration.
Definition DeclCXX.h:4181
VarDecl * getHoldingVar() const
Get the variable (if any) that holds the value of evaluating the binding.
ValueDecl * getDecomposedDecl() const
Get the decomposition declaration that this binding represents a decomposition of.
Definition DeclCXX.h:4214
Expr * getBinding() const
Get the expression to which this declaration is bound.
Definition DeclCXX.h:4207
friend class ASTDeclReader
Definition DeclCXX.h:4197
static bool classof(const Decl *D)
Definition DeclCXX.h:4231
void setBinding(QualType DeclaredType, Expr *Binding)
Set the binding for this BindingDecl, along with its declared type (which should be a possibly-cv-qua...
Definition DeclCXX.h:4219
void setDecomposedDecl(ValueDecl *Decomposed)
Set the decomposed variable for this BindingDecl.
Definition DeclCXX.h:4225
ArrayRef< BindingDecl * > getBindingPackDecls() const
static BindingDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classofKind(Kind K)
Definition DeclCXX.h:4232
Represents a path from a specific derived class (which is not represented as part of the path) to a p...
BasePaths - Represents the set of paths from a derived class to one of its (direct or indirect) bases...
Represents a base class of a C++ class.
Definition DeclCXX.h:146
void setInheritConstructors(bool Inherit=true)
Set that this base class's constructors should be inherited.
Definition DeclCXX.h:216
SourceLocation getBeginLoc() const LLVM_READONLY
Definition DeclCXX.h:194
AccessSpecifier getAccessSpecifierAsWritten() const
Retrieves the access specifier as written in the source code (which may mean that no access specifier...
Definition DeclCXX.h:242
CXXBaseSpecifier(SourceRange R, bool V, bool BC, AccessSpecifier A, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc)
Definition DeclCXX.h:187
SourceLocation getEllipsisLoc() const
For a pack expansion, determine the location of the ellipsis.
Definition DeclCXX.h:221
bool isVirtual() const
Determines whether the base class is a virtual base class (or not).
Definition DeclCXX.h:203
QualType getType() const
Retrieves the type of the base class.
Definition DeclCXX.h:249
TypeSourceInfo * getTypeSourceInfo() const
Retrieves the type and source location of the base class.
Definition DeclCXX.h:254
CXXBaseSpecifier()=default
bool getInheritConstructors() const
Determine whether this base class's constructors get inherited.
Definition DeclCXX.h:213
bool isPackExpansion() const
Determine whether this base specifier is a pack expansion.
Definition DeclCXX.h:210
SourceLocation getBaseTypeLoc() const LLVM_READONLY
Get the location at which the base class type was written.
Definition DeclCXX.h:198
SourceLocation getEndLoc() const LLVM_READONLY
Definition DeclCXX.h:195
bool isBaseOfClass() const
Determine whether this base class is a base of a class declared with the 'class' keyword (vs.
Definition DeclCXX.h:207
SourceRange getSourceRange() const LLVM_READONLY
Retrieves the source range that contains the entire base specifier.
Definition DeclCXX.h:193
AccessSpecifier getAccessSpecifier() const
Returns the access specifier for this base specifier.
Definition DeclCXX.h:230
Represents a C++ constructor within a class.
Definition DeclCXX.h:2604
std::reverse_iterator< init_const_iterator > init_const_reverse_iterator
Definition DeclCXX.h:2720
init_const_iterator init_end() const
Retrieve an iterator past the last initializer.
Definition DeclCXX.h:2715
init_iterator init_end()
Retrieve an iterator past the last initializer.
Definition DeclCXX.h:2710
std::reverse_iterator< init_iterator > init_reverse_iterator
Definition DeclCXX.h:2719
init_reverse_iterator init_rbegin()
Definition DeclCXX.h:2723
CXXConstructorDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
Definition DeclCXX.h:2847
void setInheritingConstructor(bool isIC=true)
State that this is an implicit constructor synthesized to model a call to a constructor inherited fro...
Definition DeclCXX.h:2837
bool isExplicit() const
Return true if the declaration is already resolved to be explicit.
Definition DeclCXX.h:2684
ExplicitSpecifier getExplicitSpecifier()
Definition DeclCXX.h:2676
init_iterator init_begin()
Retrieve an iterator to the first initializer.
Definition DeclCXX.h:2701
CXXConstructorDecl * getTargetConstructor() const
When this constructor delegates to another, retrieve the target.
static bool classofKind(Kind K)
Definition DeclCXX.h:2856
static CXXConstructorDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, uint64_t AllocKind)
bool isDefaultConstructor() const
Whether this constructor is a default constructor (C++ [class.ctor]p5), which can be used to default-...
bool isDelegatingConstructor() const
Determine whether this constructor is a delegating constructor.
Definition DeclCXX.h:2757
bool isSpecializationCopyingObject() const
Determine whether this is a member template specialization that would copy the object to itself.
InheritedConstructor getInheritedConstructor() const
Get the constructor that this inheriting constructor is based on.
Definition DeclCXX.h:2842
CXXCtorInitializer ** init_iterator
Iterates through the member/base initializer list.
Definition DeclCXX.h:2687
friend class ASTDeclReader
Definition DeclCXX.h:2651
init_range inits()
Definition DeclCXX.h:2695
bool isMoveConstructor() const
Determine whether this constructor is a move constructor (C++11 [class.copy]p3), which can be used to...
Definition DeclCXX.h:2802
init_const_reverse_iterator init_rbegin() const
Definition DeclCXX.h:2726
void setNumCtorInitializers(unsigned numCtorInitializers)
Definition DeclCXX.h:2743
void setExplicitSpecifier(ExplicitSpecifier ES)
Definition DeclCXX.h:2665
init_const_range inits() const
Definition DeclCXX.h:2696
bool isCopyOrMoveConstructor() const
Determine whether this a copy or move constructor.
Definition DeclCXX.h:2814
init_const_reverse_iterator init_rend() const
Definition DeclCXX.h:2733
bool isInheritingConstructor() const
Determine whether this is an implicit constructor synthesized to model a call to a constructor inheri...
Definition DeclCXX.h:2831
init_reverse_iterator init_rend()
Definition DeclCXX.h:2730
llvm::iterator_range< init_iterator > init_range
Definition DeclCXX.h:2692
CXXCtorInitializer *const * init_const_iterator
Iterates through the member/base initializer list.
Definition DeclCXX.h:2690
friend class ASTDeclWriter
Definition DeclCXX.h:2652
const ExplicitSpecifier getExplicitSpecifier() const
Definition DeclCXX.h:2679
unsigned getNumCtorInitializers() const
Determine the number of arguments used to initialize the member or base.
Definition DeclCXX.h:2739
llvm::iterator_range< init_const_iterator > init_const_range
Definition DeclCXX.h:2693
bool isConvertingConstructor(bool AllowExplicit) const
Whether this constructor is a converting constructor (C++ [class.conv.ctor]), which can be used for u...
const CXXConstructorDecl * getCanonicalDecl() const
Definition DeclCXX.h:2850
static bool classof(const Decl *D)
Definition DeclCXX.h:2855
void setCtorInitializers(CXXCtorInitializer **Initializers)
Definition DeclCXX.h:2752
friend TrailingObjects
Definition DeclCXX.h:2653
bool isCopyConstructor() const
Whether this constructor is a copy constructor (C++ [class.copy]p2, which can be used to copy the cla...
Definition DeclCXX.h:2788
Represents a C++ conversion function within a class.
Definition DeclCXX.h:2939
bool isLambdaToBlockPointerConversion() const
Determine whether this conversion function is a conversion from a lambda closure type to a block poin...
bool isExplicit() const
Return true if the declaration is already resolved to be explicit.
Definition DeclCXX.h:2975
static bool classof(const Decl *D)
Definition DeclCXX.h:2995
static bool classofKind(Kind K)
Definition DeclCXX.h:2996
ExplicitSpecifier getExplicitSpecifier()
Definition DeclCXX.h:2966
friend class ASTDeclReader
Definition DeclCXX.h:2955
QualType getConversionType() const
Returns the type that this conversion function is converting to.
Definition DeclCXX.h:2979
void setExplicitSpecifier(ExplicitSpecifier ES)
Definition DeclCXX.h:2976
static CXXConversionDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
friend class ASTDeclWriter
Definition DeclCXX.h:2956
const CXXConversionDecl * getCanonicalDecl() const
Definition DeclCXX.h:2990
CXXConversionDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
Definition DeclCXX.h:2987
const ExplicitSpecifier getExplicitSpecifier() const
Definition DeclCXX.h:2970
Represents a C++ base or member initializer.
Definition DeclCXX.h:2369
FieldDecl * getMember() const
If this is a member initializer, returns the declaration of the non-static data member being initiali...
Definition DeclCXX.h:2509
bool isDelegatingInitializer() const
Determine whether this initializer is creating a delegating constructor.
Definition DeclCXX.h:2469
bool isWritten() const
Determine whether this initializer is explicitly written in the source code.
Definition DeclCXX.h:2541
Expr * getInit() const
Get the initializer.
Definition DeclCXX.h:2571
SourceLocation getRParenLoc() const
Definition DeclCXX.h:2568
SourceLocation getEllipsisLoc() const
Definition DeclCXX.h:2479
SourceLocation getLParenLoc() const
Definition DeclCXX.h:2567
SourceRange getSourceRange() const LLVM_READONLY
Determine the source range covering the entire initializer.
int getSourceOrder() const
Return the source position of the initializer, counting from 0.
Definition DeclCXX.h:2545
SourceLocation getSourceLocation() const
Determine the source location of the initializer.
bool isAnyMemberInitializer() const
Definition DeclCXX.h:2449
bool isPackExpansion() const
Determine whether this initializer is a pack expansion.
Definition DeclCXX.h:2474
TypeSourceInfo * getTypeSourceInfo() const
Returns the declarator information for a base class or delegating initializer.
Definition DeclCXX.h:2503
bool isMemberInitializer() const
Determine whether this initializer is initializing a non-static data member.
Definition DeclCXX.h:2447
bool isBaseInitializer() const
Determine whether this initializer is initializing a base class.
Definition DeclCXX.h:2441
void setSourceOrder(int Pos)
Set the source order of this initializer.
Definition DeclCXX.h:2556
bool isIndirectMemberInitializer() const
Definition DeclCXX.h:2453
int64_t getID(const ASTContext &Context) const
bool isInClassMemberInitializer() const
Determine whether this initializer is an implicit initializer generated for a field with an initializ...
Definition DeclCXX.h:2463
const Type * getBaseClass() const
If this is a base class initializer, returns the type of the base class.
SourceLocation getMemberLocation() const
Definition DeclCXX.h:2529
FieldDecl * getAnyMember() const
Definition DeclCXX.h:2515
IndirectFieldDecl * getIndirectMember() const
Definition DeclCXX.h:2523
TypeLoc getBaseClassLoc() const
If this is a base class initializer, returns the type of the base class with location information.
bool isBaseVirtual() const
Returns whether the base is virtual or not.
Definition DeclCXX.h:2495
CXXCtorInitializer(ASTContext &Context, TypeSourceInfo *TInfo, bool IsVirtual, SourceLocation L, Expr *Init, SourceLocation R, SourceLocation EllipsisLoc)
Creates a new base-class initializer.
Represents a C++ deduction guide declaration.
Definition DeclCXX.h:1979
void setDeductionCandidateKind(DeductionCandidate K)
Definition DeclCXX.h:2071
void setSourceDeductionGuide(CXXDeductionGuideDecl *DG)
Definition DeclCXX.h:2059
static CXXDeductionGuideDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
bool isExplicit() const
Return true if the declaration is already resolved to be explicit.
Definition DeclCXX.h:2041
CXXConstructorDecl * getCorrespondingConstructor() const
Get the constructor from which this deduction guide was generated, if this is an implicit deduction g...
Definition DeclCXX.h:2050
friend class ASTDeclReader
Definition DeclCXX.h:2021
const CXXDeductionGuideDecl * getSourceDeductionGuide() const
Get the deduction guide from which this deduction guide was generated, if it was generated as part of...
Definition DeclCXX.h:2055
ExplicitSpecifier getExplicitSpecifier()
Definition DeclCXX.h:2037
friend class ASTDeclWriter
Definition DeclCXX.h:2022
SourceDeductionGuideKind
Definition DeclCXX.h:1986
@ None
Definition DeclCXX.h:1987
@ Alias
Definition DeclCXX.h:1988
static bool classofKind(Kind K)
Definition DeclCXX.h:2082
void setSourceDeductionGuideKind(SourceDeductionGuideKind SK)
Definition DeclCXX.h:2067
TemplateDecl * getDeducedTemplate() const
Get the template for which this guide performs deduction.
Definition DeclCXX.h:2044
DeductionCandidate getDeductionCandidateKind() const
Definition DeclCXX.h:2075
const ExplicitSpecifier getExplicitSpecifier() const
Definition DeclCXX.h:2038
static bool classof(const Decl *D)
Definition DeclCXX.h:2081
SourceDeductionGuideKind getSourceDeductionGuideKind() const
Definition DeclCXX.h:2063
Represents a C++ destructor within a class.
Definition DeclCXX.h:2869
void setGlobalOperatorArrayDelete(FunctionDecl *OD)
static CXXDestructorDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
const CXXDestructorDecl * getCanonicalDecl() const
Definition DeclCXX.h:2920
CXXDestructorDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
Definition DeclCXX.h:2917
friend class ASTDeclReader
Definition DeclCXX.h:2870
const FunctionDecl * getOperatorGlobalDelete() const
const FunctionDecl * getGlobalArrayOperatorDelete() const
friend class ASTDeclWriter
Definition DeclCXX.h:2871
static bool classofKind(Kind K)
Definition DeclCXX.h:2926
const FunctionDecl * getOperatorDelete() const
void setOperatorDelete(FunctionDecl *OD, Expr *ThisArg)
bool isCalledByDelete(const FunctionDecl *OpDel=nullptr) const
Will this destructor ever be called when considering which deallocation function is associated with t...
void setOperatorArrayDelete(FunctionDecl *OD)
Expr * getOperatorDeleteThisArg() const
Definition DeclCXX.h:2908
const FunctionDecl * getArrayOperatorDelete() const
static bool classof(const Decl *D)
Definition DeclCXX.h:2925
void setOperatorGlobalDelete(FunctionDecl *OD)
A mapping from each virtual member function to its set of final overriders.
A set of all the primary bases for a class.
Represents a static or instance method of a struct/union/class.
Definition DeclCXX.h:2129
bool isExplicitObjectMemberFunction() const
[C++2b][dcl.fct]/p7 An explicit object member function is a non-static member function with an explic...
static bool classofKind(Kind K)
Definition DeclCXX.h:2349
const CXXMethodDecl * getMostRecentDecl() const
Definition DeclCXX.h:2236
CXXMethodDecl * getCorrespondingMethodDeclaredInClass(const CXXRecordDecl *RD, bool MayBeBase=false)
Find if RD declares a function that overrides this function, and if so, return it.
bool isImplicitObjectMemberFunction() const
[C++2b][dcl.fct]/p7 An implicit object member function is a non-static member function without an exp...
void addOverriddenMethod(const CXXMethodDecl *MD)
bool hasInlineBody() const
bool isVirtual() const
Definition DeclCXX.h:2184
const CXXMethodDecl * getDevirtualizedMethod(const Expr *Base, bool IsAppleKext) const
Definition DeclCXX.h:2202
bool isUsualDeallocationFunction(SmallVectorImpl< const FunctionDecl * > &PreventedBy) const
Determine whether this is a usual deallocation function (C++ [basic.stc.dynamic.deallocation]p2),...
unsigned getNumExplicitParams() const
Definition DeclCXX.h:2283
bool isVolatile() const
Definition DeclCXX.h:2182
CXXMethodDecl * getMostRecentDecl()
Definition DeclCXX.h:2232
overridden_method_range overridden_methods() const
unsigned size_overridden_methods() const
const CXXMethodDecl *const * method_iterator
Definition DeclCXX.h:2242
QualType getFunctionObjectParameterReferenceType() const
Return the type of the object pointed by this.
RefQualifierKind getRefQualifier() const
Retrieve the ref-qualifier associated with this method.
Definition DeclCXX.h:2305
method_iterator begin_overridden_methods() const
const CXXRecordDecl * getParent() const
Return the parent of this method declaration, which is the class in which this method is defined.
Definition DeclCXX.h:2255
QualType getThisType() const
Return the type of the this pointer.
bool isInstance() const
Definition DeclCXX.h:2156
bool isMoveAssignmentOperator() const
Determine whether this is a move assignment operator.
Qualifiers getMethodQualifiers() const
Definition DeclCXX.h:2290
CXXRecordDecl * getParent()
Return the parent of this method declaration, which is the class in which this method is defined.
Definition DeclCXX.h:2261
QualType getFunctionObjectParameterType() const
Definition DeclCXX.h:2279
const CXXMethodDecl * getCorrespondingMethodDeclaredInClass(const CXXRecordDecl *RD, bool MayBeBase=false) const
Definition DeclCXX.h:2341
CXXMethodDecl * getDevirtualizedMethod(const Expr *Base, bool IsAppleKext)
If it's possible to devirtualize a call to this method, return the called function.
static bool isStaticOverloadedOperator(OverloadedOperatorKind OOK)
Returns true if the given operator is implicitly static in a record context.
Definition DeclCXX.h:2171
bool isConst() const
Definition DeclCXX.h:2181
CXXMethodDecl * getCorrespondingMethodInClass(const CXXRecordDecl *RD, bool MayBeBase=false)
Find the method in RD that corresponds to this one.
static bool classof(const Decl *D)
Definition DeclCXX.h:2348
const CXXMethodDecl * getCanonicalDecl() const
Definition DeclCXX.h:2228
bool isCopyAssignmentOperator() const
Determine whether this is a copy-assignment operator, regardless of whether it was declared implicitl...
CXXMethodDecl(Kind DK, ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, StorageClass SC, bool UsesFPIntrin, bool isInline, ConstexprSpecKind ConstexprKind, SourceLocation EndLocation, const AssociatedConstraint &TrailingRequiresClause={})
Definition DeclCXX.h:2133
static CXXMethodDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
method_iterator end_overridden_methods() const
CXXMethodDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
Definition DeclCXX.h:2225
bool isLambdaStaticInvoker() const
Determine whether this is a lambda closure type's static member function that is used for the result ...
const CXXMethodDecl * getCorrespondingMethodInClass(const CXXRecordDecl *RD, bool MayBeBase=false) const
Definition DeclCXX.h:2330
llvm::iterator_range< llvm::TinyPtrVector< const CXXMethodDecl * >::const_iterator > overridden_method_range
Definition DeclCXX.h:2248
An iterator over the friend declarations of a class.
Represents a C++ struct/union/class.
Definition DeclCXX.h:258
llvm::function_ref< bool(const CXXBaseSpecifier *Specifier, CXXBasePath &Path)> BaseMatchesCallback
Function type used by lookupInBases() to determine whether a specific base class subobject matches th...
Definition DeclCXX.h:1647
ctor_iterator ctor_end() const
Definition DeclCXX.h:676
bool hasCopyConstructorWithConstParam() const
Determine whether this class has a copy constructor with a parameter type which is a reference to a c...
Definition DeclCXX.h:828
bool hasConstexprDefaultConstructor() const
Determine whether this class has a constexpr default constructor.
Definition DeclCXX.h:1270
bool hasMoveConstructor() const
Determine whether this class has a move constructor.
Definition DeclCXX.h:851
bool hasDefaultConstructor() const
Determine whether this class has any default constructors.
Definition DeclCXX.h:757
friend class ASTWriter
Definition DeclCXX.h:265
friend_range friends() const
friend_iterator friend_begin() const
bool hasMutableFields() const
Determine whether this class, or any of its class subobjects, contains a mutable field.
Definition DeclCXX.h:1233
bool isHLSLIntangible() const
Returns true if the class contains HLSL intangible type, either as a field or in base class.
Definition DeclCXX.h:1550
Decl * getLambdaContextDecl() const
Retrieve the declaration that provides additional context for a lambda, when the normal declaration c...
ctor_iterator ctor_begin() const
Definition DeclCXX.h:672
bool mayBeAbstract() const
Determine whether this class may end up being abstract, even though it is not yet known to be abstrac...
bool hasTrivialMoveAssignment() const
Determine whether this class has a trivial move assignment operator (C++11 [class....
Definition DeclCXX.h:1341
void setLambdaTypeInfo(TypeSourceInfo *TS)
Definition DeclCXX.h:1864
bool isTriviallyCopyable() const
Determine whether this class is considered trivially copyable per (C++11 [class]p6).
bool hasNonTrivialCopyAssignment() const
Determine whether this class has a non-trivial copy assignment operator (C++ [class....
Definition DeclCXX.h:1334
TemplateParameterList * getGenericLambdaTemplateParameterList() const
Retrieve the generic lambda's template parameter list.
friend class ASTRecordWriter
Definition DeclCXX.h:264
bool isEffectivelyFinal() const
Determine whether it's impossible for a class to be derived from this class.
bool hasSimpleMoveConstructor() const
true if we know for sure that this class has a single, accessible, unambiguous move constructor that ...
Definition DeclCXX.h:730
bool isAggregate() const
Determine whether this class is an aggregate (C++ [dcl.init.aggr]), which is a class with no user-dec...
Definition DeclCXX.h:1143
void getIndirectPrimaryBases(CXXIndirectPrimaryBaseSet &Bases) const
Get the indirect primary bases for this class.
bool hasTrivialDefaultConstructor() const
Determine whether this class has a trivial default constructor (C++11 [class.ctor]p5).
Definition DeclCXX.h:1240
void setBases(CXXBaseSpecifier const *const *Bases, unsigned NumBases)
Sets the base classes of this struct or class.
bool isGenericLambda() const
Determine whether this class describes a generic lambda function object (i.e.
base_class_iterator bases_end()
Definition DeclCXX.h:617
llvm::iterator_range< friend_iterator > friend_range
Definition DeclCXX.h:683
CXXRecordDecl * getMostRecentDecl()
Definition DeclCXX.h:539
bool hasPrivateFields() const
Definition DeclCXX.h:1191
bool hasTrivialDestructor() const
Determine whether this class has a trivial destructor (C++ [class.dtor]p3)
Definition DeclCXX.h:1366
bool hasUserDeclaredDestructor() const
Determine whether this class has a user-declared destructor.
Definition DeclCXX.h:1001
friend class ODRDiagsEmitter
Definition DeclCXX.h:268
unsigned getLambdaDependencyKind() const
Definition DeclCXX.h:1854
void setLambdaIsGeneric(bool IsGeneric)
Definition DeclCXX.h:1875
specific_decl_iterator< CXXConstructorDecl > ctor_iterator
Iterator access to constructor members.
Definition DeclCXX.h:666
bool implicitCopyConstructorHasConstParam() const
Determine whether an implicit copy constructor for this type would have a parameter with a const-qual...
Definition DeclCXX.h:820
bool defaultedDestructorIsDeleted() const
true if a defaulted destructor for this class would be deleted.
Definition DeclCXX.h:714
const FunctionDecl * isLocalClass() const
If the class is a local class [class.local], returns the enclosing function declaration.
Definition DeclCXX.h:1554
bool hasInheritedAssignment() const
Determine whether this class has a using-declaration that names a base class assignment operator.
Definition DeclCXX.h:1420
bool hasUninitializedReferenceMember() const
Whether this class or any of its subobjects has any members of reference type which would make value-...
Definition DeclCXX.h:1158
bool allowConstDefaultInit() const
Determine whether declaring a const variable with this type is ok per core issue 253.
Definition DeclCXX.h:1391
CXXRecordDecl * getInstantiatedFromMemberClass() const
If this record is an instantiation of a member class, retrieves the member class from which it was in...
bool hasTrivialDestructorForCall() const
Definition DeclCXX.h:1370
bool hasInjectedClassType() const
Determines whether this declaration has is canonically of an injected class type.
bool defaultedMoveConstructorIsDeleted() const
true if a defaulted move constructor for this class would be deleted.
Definition DeclCXX.h:706
LambdaDependencyKind
Definition DeclCXX.h:285
@ LDK_AlwaysDependent
Definition DeclCXX.h:287
@ LDK_NeverDependent
Definition DeclCXX.h:288
@ LDK_Unknown
Definition DeclCXX.h:286
CXXBaseSpecifier * base_class_iterator
Iterator that traverses the base classes of a class.
Definition DeclCXX.h:517
void completeDefinition() override
Indicates that the definition of this class is now complete.
base_class_const_iterator bases_end() const
Definition DeclCXX.h:618
bool isLiteral() const
Determine whether this class is a literal type.
bool hasUserDeclaredMoveAssignment() const
Determine whether this class has had a move assignment declared by the user.
Definition DeclCXX.h:961
CXXRecordDecl * getTemplateInstantiationPattern()
Definition DeclCXX.h:1533
bool hasDeletedDestructor() const
Returns the destructor decl for this class.
bool defaultedDestructorIsConstexpr() const
Determine whether a defaulted default constructor for this class would be constexpr.
Definition DeclCXX.h:1356
bool mayBeNonDynamicClass() const
Definition DeclCXX.h:586
bool isStandardLayout() const
Determine whether this class is standard-layout per C++ [class]p7.
Definition DeclCXX.h:1225
void setCaptures(ASTContext &Context, ArrayRef< LambdaCapture > Captures)
Set the captures for this lambda closure type.
void pushFriendDecl(FriendDecl *FD)
unsigned getDeviceLambdaManglingNumber() const
Retrieve the device side mangling number.
llvm::iterator_range< base_class_const_iterator > base_class_const_range
Definition DeclCXX.h:605
llvm::iterator_range< capture_const_iterator > capture_const_range
Definition DeclCXX.h:1095
bool hasKnownLambdaInternalLinkage() const
The lambda is known to has internal linkage no matter whether it has name mangling number.
Definition DeclCXX.h:1772
base_class_range bases()
Definition DeclCXX.h:608
specific_decl_iterator< CXXMethodDecl > method_iterator
Iterator access to method members.
Definition DeclCXX.h:646
bool hasProtectedFields() const
Definition DeclCXX.h:1195
bool hasAnyDependentBases() const
Determine whether this class has any dependent base classes which are not the current instantiation.
unsigned getLambdaIndexInContext() const
Retrieve the index of this lambda within the context declaration returned by getLambdaContextDecl().
Definition DeclCXX.h:1790
void setTrivialForCallFlags(CXXMethodDecl *MD)
const CXXRecordDecl * getPreviousDecl() const
Definition DeclCXX.h:535
bool isLambda() const
Determine whether this class describes a lambda function object.
Definition DeclCXX.h:1018
friend class ASTDeclMerger
Definition DeclCXX.h:259
bool hasTrivialMoveConstructor() const
Determine whether this class has a trivial move constructor (C++11 [class.copy]p12)
Definition DeclCXX.h:1301
bool needsImplicitDefaultConstructor() const
Determine if we need to declare a default constructor for this class.
Definition DeclCXX.h:766
llvm::function_ref< bool(const CXXRecordDecl *BaseDefinition)> ForallBasesCallback
Function type used by forallBases() as a callback.
Definition DeclCXX.h:1624
void viewInheritance(ASTContext &Context) const
Renders and displays an inheritance diagram for this C++ class and all of its base classes (transitiv...
bool needsImplicitMoveConstructor() const
Determine whether this class should get an implicit move constructor or if any existing special membe...
Definition DeclCXX.h:892
bool hasUserDeclaredCopyAssignment() const
Determine whether this class has a user-declared copy assignment operator.
Definition DeclCXX.h:910
capture_const_iterator captures_end() const
Definition DeclCXX.h:1107
bool isProvablyNotDerivedFrom(const CXXRecordDecl *Base) const
Determine whether this class is provably not derived from the type Base.
void addedSelectedDestructor(CXXDestructorDecl *DD)
Notify the class that this destructor is now selected.
unsigned getLambdaManglingNumber() const
If this is the closure type of a lambda expression, retrieve the number to be used for name mangling ...
Definition DeclCXX.h:1765
bool isNeverDependentLambda() const
Definition DeclCXX.h:1850
bool hasFriends() const
Determines whether this record has any friends.
Definition DeclCXX.h:691
method_range methods() const
Definition DeclCXX.h:650
static bool classof(const Decl *D)
Definition DeclCXX.h:1915
bool hasNonTrivialDestructor() const
Determine whether this class has a non-trivial destructor (C++ [class.dtor]p3)
Definition DeclCXX.h:1376
CXXRecordDecl * getDefinition() const
Definition DeclCXX.h:548
bool needsOverloadResolutionForCopyAssignment() const
Determine whether we need to eagerly declare a defaulted copy assignment operator for this class.
Definition DeclCXX.h:931
static AccessSpecifier MergeAccess(AccessSpecifier PathAccess, AccessSpecifier DeclAccess)
Calculates the access of a decl that is reached along a path.
Definition DeclCXX.h:1721
bool isParsingBaseSpecifiers() const
Definition DeclCXX.h:592
friend class ASTReader
Definition DeclCXX.h:263
void getCaptureFields(llvm::DenseMap< const ValueDecl *, FieldDecl * > &Captures, FieldDecl *&ThisCapture) const
For a closure type, retrieve the mapping from captured variables and this to the non-static data memb...
bool hasConstexprNonCopyMoveConstructor() const
Determine whether this class has at least one constexpr constructor other than the copy or move const...
Definition DeclCXX.h:1255
static CXXRecordDecl * CreateLambda(const ASTContext &C, DeclContext *DC, TypeSourceInfo *Info, SourceLocation Loc, unsigned DependencyKind, bool IsGeneric, LambdaCaptureDefault CaptureDefault)
llvm::iterator_range< conversion_iterator > getVisibleConversionFunctions() const
Get all conversion functions visible in current class, including conversion function templates.
bool defaultedDefaultConstructorIsConstexpr() const
Determine whether a defaulted default constructor for this class would be constexpr.
Definition DeclCXX.h:1263
bool hasTrivialCopyConstructor() const
Determine whether this class has a trivial copy constructor (C++ [class.copy]p6, C++11 [class....
Definition DeclCXX.h:1278
void setImplicitMoveAssignmentIsDeleted()
Set that we attempted to declare an implicit move assignment operator, but overload resolution failed...
Definition DeclCXX.h:973
bool hasConstexprDestructor() const
Determine whether this class has a constexpr destructor.
bool isPolymorphic() const
Whether this class is polymorphic (C++ [class.virtual]), which means that the class contains or inher...
Definition DeclCXX.h:1214
unsigned getNumBases() const
Retrieves the number of base classes of this class.
Definition DeclCXX.h:602
bool hasNonLiteralTypeFieldsOrBases() const
Determine whether this class has a non-literal or/ volatile type non-static data member or base class...
Definition DeclCXX.h:1408
base_class_const_range bases() const
Definition DeclCXX.h:611
friend class ASTDeclReader
Definition DeclCXX.h:260
bool defaultedCopyConstructorIsDeleted() const
true if a defaulted copy constructor for this class would be deleted.
Definition DeclCXX.h:697
bool isStructural() const
Determine whether this is a structural type.
Definition DeclCXX.h:1458
bool hasMoveAssignment() const
Determine whether this class has a move assignment operator.
Definition DeclCXX.h:966
friend class ASTNodeImporter
Definition DeclCXX.h:262
bool isTriviallyCopyConstructible() const
Determine whether this class is considered trivially copyable per.
bool hasTrivialCopyConstructorForCall() const
Definition DeclCXX.h:1282
bool isCapturelessLambda() const
Definition DeclCXX.h:1064
const CXXRecordDecl * getTemplateInstantiationPattern() const
Retrieve the record declaration from which this record could be instantiated.
bool hasInitMethod() const
Definition DeclCXX.h:1189
bool lookupInBases(BaseMatchesCallback BaseMatches, CXXBasePaths &Paths, bool LookupInDependent=false) const
Look for entities within the base classes of this C++ class, transitively searching all base class su...
method_iterator method_begin() const
Method begin iterator.
Definition DeclCXX.h:656
bool lambdaIsDefaultConstructibleAndAssignable() const
Determine whether this lambda should have an implicit default constructor and copy and move assignmen...
TemplateSpecializationKind getTemplateSpecializationKind() const
Determine whether this particular class is a specialization or instantiation of a class template or m...
base_class_iterator bases_begin()
Definition DeclCXX.h:615
FunctionTemplateDecl * getDependentLambdaCallOperator() const
Retrieve the dependent lambda call operator of the closure type if this is a templated closure type.
bool hasTrivialCopyAssignment() const
Determine whether this class has a trivial copy assignment operator (C++ [class.copy]p11,...
Definition DeclCXX.h:1328
void addedEligibleSpecialMemberFunction(const CXXMethodDecl *MD, unsigned SMKind)
Notify the class that an eligible SMF has been added.
conversion_iterator conversion_end() const
Definition DeclCXX.h:1125
const CXXBaseSpecifier * base_class_const_iterator
Iterator that traverses the base classes of a class.
Definition DeclCXX.h:520
base_class_range vbases()
Definition DeclCXX.h:625
bool hasUserProvidedDefaultConstructor() const
Whether this class has a user-provided default constructor per C++11.
Definition DeclCXX.h:786
base_class_iterator vbases_begin()
Definition DeclCXX.h:632
capture_const_range captures() const
Definition DeclCXX.h:1097
ctor_range ctors() const
Definition DeclCXX.h:670
void setImplicitMoveConstructorIsDeleted()
Set that we attempted to declare an implicit move constructor, but overload resolution failed so we d...
Definition DeclCXX.h:867
void finishedDefaultedOrDeletedMember(CXXMethodDecl *MD)
Indicates that the declaration of a defaulted or deleted special member function is now complete.
bool isAbstract() const
Determine whether this class has a pure virtual function.
Definition DeclCXX.h:1221
base_class_const_iterator bases_begin() const
Definition DeclCXX.h:616
TypeSourceInfo * getLambdaTypeInfo() const
Definition DeclCXX.h:1860
bool hasVariantMembers() const
Determine whether this class has any variant members.
Definition DeclCXX.h:1236
void setImplicitCopyConstructorIsDeleted()
Set that we attempted to declare an implicit copy constructor, but overload resolution failed so we d...
Definition DeclCXX.h:858
CXXRecordDecl(Kind K, TagKind TK, const ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, CXXRecordDecl *PrevDecl)
bool isDynamicClass() const
Definition DeclCXX.h:574
bool isCLike() const
True if this class is C-like, without C++-specific features, e.g.
void setInstantiationOfMemberClass(CXXRecordDecl *RD, TemplateSpecializationKind TSK)
Specify that this record is an instantiation of the member class RD.
bool hasInClassInitializer() const
Whether this class has any in-class initializers for non-static data members (including those in anon...
Definition DeclCXX.h:1148
bool mayBeDynamicClass() const
Definition DeclCXX.h:580
bool needsImplicitCopyConstructor() const
Determine whether this class needs an implicit copy constructor to be lazily declared.
Definition DeclCXX.h:799
base_class_const_iterator vbases_end() const
Definition DeclCXX.h:635
bool hasIrrelevantDestructor() const
Determine whether this class has a destructor which has no semantic effect.
Definition DeclCXX.h:1402
llvm::iterator_range< specific_decl_iterator< CXXConstructorDecl > > ctor_range
Definition DeclCXX.h:667
static CXXRecordDecl * CreateDeserialized(const ASTContext &C, GlobalDeclID ID)
bool isDependentLambda() const
Determine whether this lambda expression was known to be dependent at the time it was created,...
Definition DeclCXX.h:1846
bool hasSimpleMoveAssignment() const
true if we know for sure that this class has a single, accessible, unambiguous move assignment operat...
Definition DeclCXX.h:744
bool hasNonTrivialMoveConstructor() const
Determine whether this class has a non-trivial move constructor (C++11 [class.copy]p12)
Definition DeclCXX.h:1313
bool hasNonTrivialCopyConstructorForCall() const
Definition DeclCXX.h:1293
bool hasDirectFields() const
Determine whether this class has direct non-static data members.
Definition DeclCXX.h:1200
const LambdaCapture * capture_const_iterator
Definition DeclCXX.h:1094
const CXXRecordDecl * getCanonicalDecl() const
Definition DeclCXX.h:526
friend class LambdaExpr
Definition DeclCXX.h:267
MSInheritanceModel getMSInheritanceModel() const
Returns the inheritance model used for this record.
bool hasUserDeclaredCopyConstructor() const
Determine whether this class has a user-declared copy constructor.
Definition DeclCXX.h:793
bool isCXX11StandardLayout() const
Determine whether this class was standard-layout per C++11 [class]p7, specifically using the C++11 ru...
Definition DeclCXX.h:1229
bool nullFieldOffsetIsZero() const
In the Microsoft C++ ABI, use zero for the field offset of a null data member pointer if we can guara...
friend class ASTDeclWriter
Definition DeclCXX.h:261
CanQualType getCanonicalTemplateSpecializationType(const ASTContext &Ctx) const
bool hasUserDeclaredConstructor() const
Determine whether this class has any user-declared constructors.
Definition DeclCXX.h:780
base_class_const_iterator vbases_begin() const
Definition DeclCXX.h:633
llvm::iterator_range< base_class_iterator > base_class_range
Definition DeclCXX.h:604
unsigned getODRHash() const
LambdaNumbering getLambdaNumbering() const
Definition DeclCXX.h:1808
bool hasDefinition() const
Definition DeclCXX.h:561
ArrayRef< NamedDecl * > getLambdaExplicitTemplateParameters() const
Retrieve the lambda template parameters that were specified explicitly.
void setImplicitCopyAssignmentIsDeleted()
Set that we attempted to declare an implicit copy assignment operator, but overload resolution failed...
Definition DeclCXX.h:916
bool needsImplicitDestructor() const
Determine whether this class needs an implicit destructor to be lazily declared.
Definition DeclCXX.h:1007
ClassTemplateDecl * getDescribedClassTemplate() const
Retrieves the class template that is described by this class declaration.
bool isPOD() const
Whether this class is a POD-type (C++ [class]p4)
Definition DeclCXX.h:1171
void getFinalOverriders(CXXFinalOverriderMap &FinaOverriders) const
Retrieve the final overriders for each virtual member function in the class hierarchy where this clas...
void removeConversion(const NamedDecl *Old)
Removes a conversion function from this class.
MSInheritanceModel calculateInheritanceModel() const
Calculate what the inheritance model would be for this class.
bool hasSimpleCopyConstructor() const
true if we know for sure that this class has a single, accessible, unambiguous copy constructor that ...
Definition DeclCXX.h:723
bool isCurrentInstantiation(const DeclContext *CurContext) const
Determine whether this dependent class is a current instantiation, when viewed from within the given ...
MSVtorDispMode getMSVtorDispMode() const
Controls when vtordisps will be emitted if this record is used as a virtual base.
bool needsOverloadResolutionForMoveConstructor() const
Determine whether we need to eagerly declare a defaulted move constructor for this class.
Definition DeclCXX.h:902
base_class_iterator vbases_end()
Definition DeclCXX.h:634
bool isInjectedClassName() const
Determines whether this declaration represents the injected class name.
void setInitMethod(bool Val)
Definition DeclCXX.h:1188
bool isEmpty() const
Determine whether this is an empty class in the sense of (C++11 [meta.unary.prop]).
Definition DeclCXX.h:1186
LambdaCaptureDefault getLambdaCaptureDefault() const
Definition DeclCXX.h:1059
bool hasMemberName(DeclarationName N) const
Determine whether this class has a member with the given name, possibly in a non-dependent base class...
bool needsOverloadResolutionForMoveAssignment() const
Determine whether we need to eagerly declare a move assignment operator for this class.
Definition DeclCXX.h:994
CXXDestructorDecl * getDestructor() const
Returns the destructor decl for this class.
bool hasCopyAssignmentWithConstParam() const
Determine whether this class has a copy assignment operator with a parameter type which is a referenc...
Definition DeclCXX.h:953
bool hasNonTrivialMoveAssignment() const
Determine whether this class has a non-trivial move assignment operator (C++11 [class....
Definition DeclCXX.h:1348
bool hasNonTrivialDestructorForCall() const
Definition DeclCXX.h:1380
void setHasTrivialSpecialMemberForCall()
Definition DeclCXX.h:1384
method_iterator method_end() const
Method past-the-end iterator.
Definition DeclCXX.h:661
static bool classofKind(Kind K)
Definition DeclCXX.h:1916
capture_const_iterator captures_begin() const
Definition DeclCXX.h:1101
bool needsOverloadResolutionForDestructor() const
Determine whether we need to eagerly declare a destructor for this class.
Definition DeclCXX.h:1013
bool hasUserDeclaredMoveOperation() const
Whether this class has a user-declared move constructor or assignment operator.
Definition DeclCXX.h:839
llvm::iterator_range< specific_decl_iterator< CXXMethodDecl > > method_range
Definition DeclCXX.h:647
UnresolvedSetIterator conversion_iterator
Definition DeclCXX.h:1119
bool hasInheritedConstructor() const
Determine whether this class has a using-declaration that names a user-declared base class constructo...
Definition DeclCXX.h:1414
static bool FindVirtualBaseClass(const CXXBaseSpecifier *Specifier, CXXBasePath &Path, const CXXRecordDecl *BaseRecord)
Base-class lookup callback that determines whether the given base class specifier refers to a specifi...
CXXMethodDecl * getLambdaStaticInvoker() const
Retrieve the lambda static invoker, the address of which is returned by the conversion operator,...
bool hasNonTrivialDefaultConstructor() const
Determine whether this class has a non-trivial default constructor (C++11 [class.ctor]p5).
Definition DeclCXX.h:1247
bool needsOverloadResolutionForCopyConstructor() const
Determine whether we need to eagerly declare a defaulted copy constructor for this class.
Definition DeclCXX.h:805
CXXRecordDecl * getDefinitionOrSelf() const
Definition DeclCXX.h:555
static bool FindBaseClass(const CXXBaseSpecifier *Specifier, CXXBasePath &Path, const CXXRecordDecl *BaseRecord)
Base-class lookup callback that determines whether the given base class specifier refers to a specifi...
void setImplicitDestructorIsDeleted()
Set that we attempted to declare an implicit destructor, but overload resolution failed so we deleted...
Definition DeclCXX.h:876
void markAbstract()
Definition DeclCXX.h:1919
bool hasUserDeclaredMoveConstructor() const
Determine whether this class has had a move constructor declared by the user.
Definition DeclCXX.h:846
bool needsImplicitMoveAssignment() const
Determine whether this class should get an implicit move assignment operator or if any existing speci...
Definition DeclCXX.h:983
bool hasSimpleDestructor() const
true if we know for sure that this class has an accessible destructor that is not deleted.
Definition DeclCXX.h:751
friend_iterator friend_end() const
void setDescribedClassTemplate(ClassTemplateDecl *Template)
bool isVirtuallyDerivedFrom(const CXXRecordDecl *Base) const
Determine whether this class is virtually derived from the class Base.
bool isInterfaceLike() const
unsigned capture_size() const
Definition DeclCXX.h:1112
void setIsParsingBaseSpecifiers()
Definition DeclCXX.h:590
friend class DeclContext
Definition DeclCXX.h:266
bool hasNonTrivialMoveConstructorForCall() const
Definition DeclCXX.h:1319
bool needsImplicitCopyAssignment() const
Determine whether this class needs an implicit copy assignment operator to be lazily declared.
Definition DeclCXX.h:925
void setLambdaNumbering(LambdaNumbering Numbering)
Set the mangling numbers and context declaration for a lambda class.
bool isAnyDestructorNoReturn() const
Returns true if the class destructor, or any implicitly invoked destructors are marked noreturn.
Definition DeclCXX.h:1546
bool forallBases(ForallBasesCallback BaseMatches) const
Determines if the given callback holds for all the direct or indirect base classes of this type.
base_class_const_range vbases() const
Definition DeclCXX.h:628
void setLambdaDependencyKind(unsigned Kind)
Definition DeclCXX.h:1871
bool hasTrivialMoveConstructorForCall() const
Definition DeclCXX.h:1306
MemberSpecializationInfo * getMemberSpecializationInfo() const
If this class is an instantiation of a member class of a class template specialization,...
FunctionDecl * isLocalClass()
Definition DeclCXX.h:1561
bool hasNonTrivialCopyConstructor() const
Determine whether this class has a non-trivial copy constructor (C++ [class.copy]p6,...
Definition DeclCXX.h:1288
CXXMethodDecl * getLambdaCallOperator() const
Retrieve the lambda call operator of the closure type if this is a closure type.
const LambdaCapture * getCapture(unsigned I) const
Definition DeclCXX.h:1114
const CXXRecordDecl * getMostRecentDecl() const
Definition DeclCXX.h:544
const CXXRecordDecl * getStandardLayoutBaseWithFields() const
If this is a standard-layout class or union, any and all data members will be declared in the same ty...
bool hasSimpleCopyAssignment() const
true if we know for sure that this class has a single, accessible, unambiguous copy assignment operat...
Definition DeclCXX.h:737
CXXRecordDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
Definition DeclCXX.h:522
void setTemplateSpecializationKind(TemplateSpecializationKind TSK)
Set the kind of specialization or template instantiation this is.
bool isTrivial() const
Determine whether this class is considered trivial.
Definition DeclCXX.h:1436
unsigned getNumVBases() const
Retrieves the number of virtual base classes of this class.
Definition DeclCXX.h:623
conversion_iterator conversion_begin() const
Definition DeclCXX.h:1121
CXXRecordDecl * getPreviousDecl()
Definition DeclCXX.h:530
bool isDerivedFrom(const CXXRecordDecl *Base) const
Determine whether this class is derived from the class Base.
bool implicitCopyAssignmentHasConstParam() const
Determine whether an implicit copy assignment operator for this type would have a parameter with a co...
Definition DeclCXX.h:946
Declaration of a class template.
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
Definition DeclCXX.h:3673
const CXXRecordDecl * getParent() const
Returns the parent of this using shadow declaration, which is the class in which this is declared.
Definition DeclCXX.h:3737
static ConstructorUsingShadowDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
CXXRecordDecl * getParent()
Definition DeclCXX.h:3740
static bool classof(const Decl *D)
Definition DeclCXX.h:3777
CXXRecordDecl * getConstructedBaseClass() const
Get the base class whose constructor or constructor shadow declaration is passed the constructor argu...
Definition DeclCXX.h:3764
friend class ASTDeclReader
Definition DeclCXX.h:3718
static bool classofKind(Kind K)
Definition DeclCXX.h:3778
UsingDecl * getIntroducer() const
Override the UsingShadowDecl's getIntroducer, returning the UsingDecl that introduced this.
Definition DeclCXX.h:3730
friend class ASTDeclWriter
Definition DeclCXX.h:3719
bool constructsVirtualBase() const
Returns true if the constructed base class is a virtual base class subobject of this declaration's cl...
Definition DeclCXX.h:3773
ConstructorUsingShadowDecl * getConstructedBaseClassShadowDecl() const
Get the inheriting constructor declaration for the base class for which we don't have an explicit ini...
Definition DeclCXX.h:3754
ConstructorUsingShadowDecl * getNominatedBaseClassShadowDecl() const
Get the inheriting constructor declaration for the direct base class from which this using shadow dec...
Definition DeclCXX.h:3748
CXXRecordDecl * getNominatedBaseClass() const
Get the base class that was named in the using declaration.
specific_decl_iterator - Iterates over a subrange of declarations stored in a DeclContext,...
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
DeclContext * getParent()
getParent - Returns the containing DeclContext.
FunctionDeclBitfields FunctionDeclBits
CXXConstructorDeclBitfields CXXConstructorDeclBits
decl_iterator decls_end() const
LinkageSpecDeclBitfields LinkageSpecDeclBits
decl_iterator decls_begin() const
Decl - This represents one declaration (or definition), e.g.
SourceLocation getEndLoc() const LLVM_READONLY
ASTContext & getASTContext() const LLVM_READONLY
virtual Decl * getPreviousDeclImpl()
Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.
Kind
Lists the kind of concrete classes of Decl.
unsigned getIdentifierNamespace() const
virtual Decl * getNextRedeclarationImpl()
Returns the next redeclaration or itself if this is the only decl.
void setAccess(AccessSpecifier AS)
SourceLocation getLocation() const
IdentifierNamespace
IdentifierNamespace - The different namespaces in which declarations may appear.
@ IDNS_TagFriend
This declaration is a friend class.
@ IDNS_OrdinaryFriend
This declaration is a friend function.
@ IDNS_LocalExtern
This declaration is a function-local extern declaration of a variable or function.
void setImplicit(bool I=true)
void setLocation(SourceLocation L)
DeclContext * getDeclContext()
virtual Decl * getMostRecentDeclImpl()
Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chai...
const LangOptions & getLangOpts() const LLVM_READONLY
Helper to get the language options from the ASTContext.
DeclarationNameLoc - Additional source/type location info for a declaration name.
The name of a declaration.
TemplateDecl * getCXXDeductionGuideTemplate() const
If this name is the name of a C++ deduction guide, return the template associated with that name.
static DeclarationName getUsingDirectiveName()
Returns the name for all C++ using-directives.
DeclaratorDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N, QualType T, TypeSourceInfo *TInfo, SourceLocation StartL)
A decomposition declaration.
Definition DeclCXX.h:4245
friend TrailingObjects
Definition DeclCXX.h:4271
void printName(raw_ostream &OS, const PrintingPolicy &Policy) const override
Pretty-print the unqualified name of this declaration.
ArrayRef< BindingDecl * > bindings() const
Definition DeclCXX.h:4283
static bool classof(const Decl *D)
Definition DeclCXX.h:4309
auto flat_bindings() const
Definition DeclCXX.h:4288
friend class ASTDeclReader
Definition DeclCXX.h:4270
static bool classofKind(Kind K)
Definition DeclCXX.h:4310
static DecompositionDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned NumBindings)
Store information needed for an explicit specifier.
Definition DeclCXX.h:1924
bool isExplicit() const
Determine whether this specifier is known to correspond to an explicit declaration.
Definition DeclCXX.h:1948
ExplicitSpecKind getKind() const
Definition DeclCXX.h:1932
bool isInvalid() const
Determine if the explicit specifier is invalid.
Definition DeclCXX.h:1953
static ExplicitSpecifier Invalid()
Definition DeclCXX.h:1964
Expr * getExpr()
Definition DeclCXX.h:1934
static const ExplicitSpecifier getFromDecl(const FunctionDecl *Function)
Definition DeclCXX.h:1961
const Expr * getExpr() const
Definition DeclCXX.h:1933
ExplicitSpecifier()=default
void setExpr(Expr *E)
Definition DeclCXX.h:1958
void setKind(ExplicitSpecKind Kind)
Definition DeclCXX.h:1957
static ExplicitSpecifier getFromDecl(FunctionDecl *Function)
bool isSpecified() const
Determine if the declaration had an explicit specifier of any kind.
Definition DeclCXX.h:1937
bool isEquivalent(const ExplicitSpecifier Other) const
Check for equivalence of explicit specifiers.
ExplicitSpecifier(Expr *Expression, ExplicitSpecKind Kind)
Definition DeclCXX.h:1930
This represents one expression.
Represents a member of a struct/union/class.
FriendDecl - Represents the declaration of a friend entity, which can be a function,...
Represents a function declaration or definition.
void setIsPureVirtual(bool P=true)
bool UsesFPIntrin() const
Determine whether the function was declared in source context that requires constrained FP intrinsics...
QualType getReturnType() const
FunctionDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
FunctionDecl(Kind DK, ASTContext &C, DeclContext *DC, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, StorageClass S, bool UsesFPIntrin, bool isInlineSpecified, ConstexprSpecKind ConstexprKind, const AssociatedConstraint &TrailingRequiresClause)
bool isPureVirtual() const
Whether this virtual function is pure, i.e.
void setRangeEnd(SourceLocation E)
bool isVirtualAsWritten() const
Whether this function is marked as virtual explicitly.
unsigned getNumParams() const
Return the number of parameters this function must have based on its FunctionType.
Represents a prototype with parameter type info, e.g.
Declaration of a template function.
FunctionType - C99 6.7.5.3 - Function Declarators.
One of these records is kept for each identifier that is lexed.
Represents a field injected from an anonymous union/struct into the parent scope.
Description of a constructor that was inherited from a base class.
Definition DeclCXX.h:2575
InheritedConstructor()=default
CXXConstructorDecl * getConstructor() const
Definition DeclCXX.h:2588
InheritedConstructor(ConstructorUsingShadowDecl *Shadow, CXXConstructorDecl *BaseCtor)
Definition DeclCXX.h:2581
ConstructorUsingShadowDecl * getShadowDecl() const
Definition DeclCXX.h:2587
Describes the capture of a variable or of this, or of a C++1y init-capture.
Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-...
Definition DeclCXX.h:3304
const ValueDecl * getExtendingDecl() const
Definition DeclCXX.h:3340
unsigned getManglingNumber() const
Definition DeclCXX.h:3353
APValue * getValue() const
Definition DeclCXX.h:3359
friend class MaterializeTemporaryExpr
Definition DeclCXX.h:3305
APValue * getOrCreateValue(bool MayCreate) const
Get the storage for the constant value of a materialized temporary of static storage duration.
static bool classof(const Decl *D)
Definition DeclCXX.h:3370
friend class ASTDeclReader
Definition DeclCXX.h:3306
Stmt::child_range childrenExpr()
Definition DeclCXX.h:3362
StorageDuration getStorageDuration() const
Retrieve the storage duration for the materialized temporary.
Stmt::const_child_range childrenExpr() const
Definition DeclCXX.h:3366
static LifetimeExtendedTemporaryDecl * Create(Expr *Temp, ValueDecl *EDec, unsigned Mangling)
Definition DeclCXX.h:3329
Expr * getTemporaryExpr()
Retrieve the expression to which the temporary materialization conversion was applied.
Definition DeclCXX.h:3350
static LifetimeExtendedTemporaryDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
Definition DeclCXX.h:3334
const Expr * getTemporaryExpr() const
Definition DeclCXX.h:3351
ValueDecl * getExtendingDecl()
Definition DeclCXX.h:3339
static bool classofKind(Kind K)
Definition DeclCXX.h:3371
void setExternLoc(SourceLocation L)
Definition DeclCXX.h:3052
void setLanguage(LinkageSpecLanguageIDs L)
Set the language specified by this linkage specification.
Definition DeclCXX.h:3039
static bool classofKind(Kind K)
Definition DeclCXX.h:3071
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Definition DeclCXX.h:3066
void setRBraceLoc(SourceLocation L)
Definition DeclCXX.h:3053
static LinkageSpecDecl * castFromDeclContext(const DeclContext *DC)
Definition DeclCXX.h:3077
static DeclContext * castToDeclContext(const LinkageSpecDecl *D)
Definition DeclCXX.h:3073
LinkageSpecLanguageIDs getLanguage() const
Return the language specified by this linkage specification.
Definition DeclCXX.h:3034
SourceLocation getExternLoc() const
Definition DeclCXX.h:3050
SourceLocation getRBraceLoc() const
Definition DeclCXX.h:3051
SourceLocation getEndLoc() const LLVM_READONLY
Definition DeclCXX.h:3058
static bool classof(const Decl *D)
Definition DeclCXX.h:3070
static LinkageSpecDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
bool hasBraces() const
Determines whether this linkage specification had braces in its syntactic form.
Definition DeclCXX.h:3045
static bool classof(const Decl *D)
Definition DeclCXX.h:4439
Parts getParts() const
Get the decomposed parts of this declaration.
Definition DeclCXX.h:4424
static bool classofKind(Kind K)
Definition DeclCXX.h:4440
friend class ASTReader
Definition DeclCXX.h:4415
friend class ASTDeclReader
Definition DeclCXX.h:4416
static void Profile(llvm::FoldingSetNodeID &ID, Parts P)
Definition DeclCXX.h:4431
friend class ASTContext
Definition DeclCXX.h:4414
void Profile(llvm::FoldingSetNodeID &ID)
Definition DeclCXX.h:4437
APValue & getAsAPValue() const
Get the value of this MSGuidDecl as an APValue.
MSGuidDeclParts Parts
Definition DeclCXX.h:4396
void printName(llvm::raw_ostream &OS, const PrintingPolicy &Policy) const override
Print this UUID in a human-readable format.
static bool classof(const Decl *D)
Definition DeclCXX.h:4359
bool hasSetter() const
Definition DeclCXX.h:4363
IdentifierInfo * getGetterId() const
Definition DeclCXX.h:4362
friend class ASTDeclReader
Definition DeclCXX.h:4351
bool hasGetter() const
Definition DeclCXX.h:4361
IdentifierInfo * getSetterId() const
Definition DeclCXX.h:4364
static MSPropertyDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
Provides information a specialization of a member of a class template, which may be a member function...
UsingDecl * getFirstDecl()
This represents a decl that may have a name.
NamedDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N)
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Represents a C++ namespace alias.
Definition DeclCXX.h:3197
static NamespaceAliasDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
const NamespaceAliasDecl * getCanonicalDecl() const
Definition DeclCXX.h:3252
redeclarable_base::redecl_range redecl_range
Definition DeclCXX.h:3240
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Definition DeclCXX.h:3292
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name of the namespace, with source-location inf...
Definition DeclCXX.h:3258
friend class ASTDeclReader
Definition DeclCXX.h:3198
SourceLocation getAliasLoc() const
Returns the location of the alias name, i.e.
Definition DeclCXX.h:3280
NamespaceBaseDecl * getAliasedNamespace() const
Retrieve the namespace that this alias refers to, which may either be a NamespaceDecl or a NamespaceA...
Definition DeclCXX.h:3290
static bool classof(const Decl *D)
Definition DeclCXX.h:3296
SourceLocation getNamespaceLoc() const
Returns the location of the namespace keyword.
Definition DeclCXX.h:3283
SourceLocation getTargetNameLoc() const
Returns the location of the identifier in the named namespace.
Definition DeclCXX.h:3286
NamespaceAliasDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
Definition DeclCXX.h:3249
NamespaceDecl * getNamespace()
Retrieve the namespace declaration aliased by this directive.
Definition DeclCXX.h:3267
redeclarable_base::redecl_iterator redecl_iterator
Definition DeclCXX.h:3241
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name of the namespace.
Definition DeclCXX.h:3262
static bool classofKind(Kind K)
Definition DeclCXX.h:3297
const NamespaceDecl * getNamespace() const
Definition DeclCXX.h:3274
Represents C++ namespaces and their aliases.
NamespaceDecl * getNamespace()
Represent a C++ namespace.
A C++ nested-name-specifier augmented with source location information.
NestedNameSpecifier getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
Represents a C++ nested name specifier, such as "\::std::vector::".
A (possibly-)qualified type.
void Profile(llvm::FoldingSetNodeID &ID) const
QualType getNonReferenceType() const
If Type is a reference type (e.g., const int&), returns the type that the reference refers to ("const...
The collection of all-type qualifiers we support.
RecordDecl(Kind DK, TagKind TK, const ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, RecordDecl *PrevDecl)
Provides common interface for the Decls that can be redeclared.
NamespaceAliasDecl * getFirstDecl()
UsingShadowDecl * getNextRedeclaration() const
Redeclarable(const ASTContext &Ctx)
NamespaceAliasDecl * getPreviousDecl()
redecl_iterator redecls_end() const
llvm::iterator_range< redecl_iterator > redecl_range
NamespaceAliasDecl * getMostRecentDecl()
redecl_iterator redecls_begin() const
redecl_range redecls() const
static DeclContext * castToDeclContext(const RequiresExprBodyDecl *D)
Definition DeclCXX.h:2116
friend class ASTDeclReader
Definition DeclCXX.h:2103
static RequiresExprBodyDecl * castFromDeclContext(const DeclContext *DC)
Definition DeclCXX.h:2120
static bool classofKind(Kind K)
Definition DeclCXX.h:2114
static RequiresExprBodyDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classof(const Decl *D)
Definition DeclCXX.h:2113
friend class ASTDeclWriter
Definition DeclCXX.h:2104
Encodes a location in the source.
bool isValid() const
Return true if this is a valid SourceLocation object.
A trivial tuple used to represent a source range.
const Expr * getMessage() const
Definition DeclCXX.h:4159
bool isFailed() const
Definition DeclCXX.h:4161
friend class ASTDeclReader
Definition DeclCXX.h:4147
Expr * getAssertExpr()
Definition DeclCXX.h:4155
static bool classofKind(Kind K)
Definition DeclCXX.h:4170
Expr * getMessage()
Definition DeclCXX.h:4158
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Definition DeclCXX.h:4165
const Expr * getAssertExpr() const
Definition DeclCXX.h:4156
SourceLocation getRParenLoc() const
Definition DeclCXX.h:4163
static StaticAssertDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classof(const Decl *D)
Definition DeclCXX.h:4169
Stmt - This represents one statement.
llvm::iterator_range< child_iterator > child_range
llvm::iterator_range< const_child_iterator > const_child_range
void startDefinition()
Starts the definition of this tag declaration.
TagDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
The base class of all kinds of template declarations (e.g., class, function, etc.).
Stores a list of template parameters for a TemplateDecl and its derived classes.
TypeDecl(Kind DK, DeclContext *DC, SourceLocation L, const IdentifierInfo *Id, SourceLocation StartL=SourceLocation())
SourceLocation getBeginLoc() const LLVM_READONLY
Base wrapper for a particular "section" of type source info.
NestedNameSpecifierLoc getPrefix() const
If this type represents a qualified-id, this returns it's nested name specifier.
A container of type source information.
The base class of the type hierarchy.
const T * castAs() const
Member-template castAs.
const APValue & getValue() const
Definition DeclCXX.h:4477
static bool classofKind(Kind K)
Definition DeclCXX.h:4489
static bool classof(const Decl *D)
Definition DeclCXX.h:4488
friend class ASTReader
Definition DeclCXX.h:4469
friend class ASTDeclReader
Definition DeclCXX.h:4470
friend class ASTContext
Definition DeclCXX.h:4468
void printName(llvm::raw_ostream &OS, const PrintingPolicy &Policy) const override
Print this in a human-readable format.
static void Profile(llvm::FoldingSetNodeID &ID, QualType Ty, const APValue &APVal)
Definition DeclCXX.h:4479
void Profile(llvm::FoldingSetNodeID &ID)
Definition DeclCXX.h:4484
The iterator over UnresolvedSets.
static UnresolvedUsingIfExistsDecl * CreateDeserialized(ASTContext &Ctx, GlobalDeclID ID)
static bool classof(const Decl *D)
Definition DeclCXX.h:4127
static bool classofKind(Kind K)
Definition DeclCXX.h:4128
Represents a dependent using declaration which was marked with typename.
Definition DeclCXX.h:4033
bool isPackExpansion() const
Determine whether this is a pack expansion.
Definition DeclCXX.h:4079
SourceLocation getTypenameLoc() const
Returns the source location of the 'typename' keyword.
Definition DeclCXX.h:4063
static bool classofKind(Kind K)
Definition DeclCXX.h:4106
friend class ASTDeclReader
Definition DeclCXX.h:4034
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
Definition DeclCXX.h:4067
SourceLocation getUsingLoc() const
Returns the source location of the 'using' keyword.
Definition DeclCXX.h:4060
static bool classof(const Decl *D)
Definition DeclCXX.h:4105
UnresolvedUsingTypenameDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this declaration.
Definition DeclCXX.h:4098
SourceLocation getEllipsisLoc() const
Get the location of the ellipsis if this is a pack expansion.
Definition DeclCXX.h:4084
const UnresolvedUsingTypenameDecl * getCanonicalDecl() const
Definition DeclCXX.h:4101
DeclarationNameInfo getNameInfo() const
Definition DeclCXX.h:4074
static UnresolvedUsingTypenameDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
Definition DeclCXX.h:4070
Represents a dependent using declaration which was not marked with typename.
Definition DeclCXX.h:3936
const UnresolvedUsingValueDecl * getCanonicalDecl() const
Definition DeclCXX.h:4012
bool isPackExpansion() const
Determine whether this is a pack expansion.
Definition DeclCXX.h:3989
SourceLocation getUsingLoc() const
Returns the source location of the 'using' keyword.
Definition DeclCXX.h:3967
static bool classofKind(Kind K)
Definition DeclCXX.h:4017
bool isAccessDeclaration() const
Return true if it is a C++03 access declaration (no 'using').
Definition DeclCXX.h:3973
friend class ASTDeclReader
Definition DeclCXX.h:3963
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
Definition DeclCXX.h:3977
static bool classof(const Decl *D)
Definition DeclCXX.h:4016
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
Definition DeclCXX.h:3980
friend class ASTDeclWriter
Definition DeclCXX.h:3964
DeclarationNameInfo getNameInfo() const
Definition DeclCXX.h:3984
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
void setUsingLoc(SourceLocation L)
Set the source location of the 'using' keyword.
Definition DeclCXX.h:3970
SourceLocation getEllipsisLoc() const
Get the location of the ellipsis if this is a pack expansion.
Definition DeclCXX.h:3994
UnresolvedUsingValueDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this declaration.
Definition DeclCXX.h:4009
static UnresolvedUsingValueDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
Represents a C++ using-declaration.
Definition DeclCXX.h:3587
void setTypename(bool TN)
Sets whether the using declaration has 'typename'.
Definition DeclCXX.h:3639
UsingDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this declaration.
Definition DeclCXX.h:3652
bool hasTypename() const
Return true if the using declaration has 'typename'.
Definition DeclCXX.h:3636
bool isAccessDeclaration() const
Return true if it is a C++03 access declaration (no 'using').
Definition DeclCXX.h:3633
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
Definition DeclCXX.h:3624
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
Definition DeclCXX.h:3621
friend class ASTDeclReader
Definition DeclCXX.h:3610
void setUsingLoc(SourceLocation L)
Set the source location of the 'using' keyword.
Definition DeclCXX.h:3617
static UsingDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
const UsingDecl * getCanonicalDecl() const
Definition DeclCXX.h:3655
friend class ASTDeclWriter
Definition DeclCXX.h:3611
DeclarationNameInfo getNameInfo() const
Definition DeclCXX.h:3628
static bool classof(const Decl *D)
Definition DeclCXX.h:3659
static bool classofKind(Kind K)
Definition DeclCXX.h:3660
SourceLocation getUsingLoc() const
Return the source location of the 'using' keyword.
Definition DeclCXX.h:3614
Represents C++ using-directive.
Definition DeclCXX.h:3092
static UsingDirectiveDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
const NamedDecl * getNominatedNamespaceAsWritten() const
Definition DeclCXX.h:3146
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Definition DeclCXX.h:3181
const DeclContext * getCommonAncestor() const
Definition DeclCXX.h:3160
static bool classofKind(Kind K)
Definition DeclCXX.h:3186
friend class ASTDeclReader
Definition DeclCXX.h:3130
SourceLocation getUsingLoc() const
Return the location of the using keyword.
Definition DeclCXX.h:3163
NamespaceDecl * getNominatedNamespace()
Returns the namespace nominated by this using-directive.
const NamespaceDecl * getNominatedNamespace() const
Definition DeclCXX.h:3153
static bool classof(const Decl *D)
Definition DeclCXX.h:3185
NamedDecl * getNominatedNamespaceAsWritten()
Definition DeclCXX.h:3145
DeclContext * getCommonAncestor()
Returns the common ancestor context of this using-directive and its nominated namespace.
Definition DeclCXX.h:3159
SourceLocation getNamespaceKeyLocation() const
Returns the location of the namespace keyword.
Definition DeclCXX.h:3167
SourceLocation getIdentLocation() const
Returns the location of this using declaration's identifier.
Definition DeclCXX.h:3170
friend class DeclContext
Definition DeclCXX.h:3133
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name of the namespace.
Definition DeclCXX.h:3141
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name of the namespace, with source-location inf...
Definition DeclCXX.h:3137
Represents a C++ using-enum-declaration.
Definition DeclCXX.h:3788
void setEnumType(TypeSourceInfo *TSI)
Definition DeclCXX.h:3827
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
void setEnumLoc(SourceLocation L)
Definition DeclCXX.h:3813
NestedNameSpecifierLoc getQualifierLoc() const
Definition DeclCXX.h:3817
SourceLocation getEnumLoc() const
The source location of the 'enum' keyword.
Definition DeclCXX.h:3812
void setUsingLoc(SourceLocation L)
Definition DeclCXX.h:3809
UsingEnumDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this declaration.
Definition DeclCXX.h:3843
friend class ASTDeclReader
Definition DeclCXX.h:3804
EnumDecl * getEnumDecl() const
Definition DeclCXX.h:3830
friend class ASTDeclWriter
Definition DeclCXX.h:3805
const UsingEnumDecl * getCanonicalDecl() const
Definition DeclCXX.h:3846
TypeSourceInfo * getEnumType() const
Definition DeclCXX.h:3824
static bool classofKind(Kind K)
Definition DeclCXX.h:3851
static UsingEnumDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classof(const Decl *D)
Definition DeclCXX.h:3850
NestedNameSpecifier getQualifier() const
Definition DeclCXX.h:3814
TypeLoc getEnumTypeLoc() const
Definition DeclCXX.h:3821
SourceLocation getUsingLoc() const
The source location of the 'using' keyword.
Definition DeclCXX.h:3808
Represents a pack of using declarations that a single using-declarator pack-expanded into.
Definition DeclCXX.h:3869
friend TrailingObjects
Definition DeclCXX.h:3893
static UsingPackDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned NumExpansions)
const UsingPackDecl * getCanonicalDecl() const
Definition DeclCXX.h:3918
UsingPackDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
Definition DeclCXX.h:3917
NamedDecl * getInstantiatedFromUsingDecl() const
Get the using declaration from which this was instantiated.
Definition DeclCXX.h:3898
static bool classof(const Decl *D)
Definition DeclCXX.h:3920
friend class ASTDeclReader
Definition DeclCXX.h:3891
static bool classofKind(Kind K)
Definition DeclCXX.h:3921
ArrayRef< NamedDecl * > expansions() const
Get the set of using declarations that this pack expanded into.
Definition DeclCXX.h:3902
friend class ASTDeclWriter
Definition DeclCXX.h:3892
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Definition DeclCXX.h:3913
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
Definition DeclCXX.h:3395
UsingShadowDecl * getMostRecentDecl()
Returns the most recent (re)declaration of this declaration.
UsingShadowDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
Definition DeclCXX.h:3450
UsingShadowDecl * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
redeclarable_base::redecl_range redecl_range
Definition DeclCXX.h:3440
friend class ASTDeclReader
Definition DeclCXX.h:3428
static UsingShadowDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation Loc, DeclarationName Name, BaseUsingDecl *Introducer, NamedDecl *Target)
Definition DeclCXX.h:3431
UsingShadowDecl * getNextUsingShadowDecl() const
The next using shadow declaration contained in the shadow decl chain of the using declaration which i...
Definition DeclCXX.h:3479
void setTargetDecl(NamedDecl *ND)
Sets the underlying declaration which has been brought into the local scope.
Definition DeclCXX.h:3463
static bool classofKind(Kind K)
Definition DeclCXX.h:3484
NamedDecl * getTargetDecl() const
Gets the underlying declaration which has been brought into the local scope.
Definition DeclCXX.h:3459
friend class ASTDeclWriter
Definition DeclCXX.h:3429
redeclarable_base::redecl_iterator redecl_iterator
Definition DeclCXX.h:3441
UsingShadowDecl(Kind K, ASTContext &C, DeclContext *DC, SourceLocation Loc, DeclarationName Name, BaseUsingDecl *Introducer, NamedDecl *Target)
static UsingShadowDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classof(const Decl *D)
Definition DeclCXX.h:3483
friend class BaseUsingDecl
Definition DeclCXX.h:3396
BaseUsingDecl * getIntroducer() const
Gets the (written or instantiated) using declaration that introduced this declaration.
const UsingShadowDecl * getCanonicalDecl() const
Definition DeclCXX.h:3453
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
ValueDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N, QualType T)
void setType(QualType newType)
bool isParameterPack() const
Determine whether this value is actually a function parameter pack, init-capture pack,...
Represents a variable declaration or definition.
VarDecl(Kind DK, ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, const IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, StorageClass SC)
The JSON file list parser is used to communicate input to InstallAPI.
CanQual< Type > CanQualType
Represents a canonical, potentially-qualified type.
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
bool isa(CodeGen::Address addr)
ConstexprSpecKind
Define the kind of constexpr specifier.
LinkageSpecLanguageIDs
Represents the language in a linkage specification.
Definition DeclCXX.h:3003
@ C
Definition DeclCXX.h:3003
@ CXX
Definition DeclCXX.h:3003
RefQualifierKind
The kind of C++11 ref-qualifier associated with a function type.
@ Create
'create' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
LazyOffsetPtr< CXXCtorInitializer *, uint64_t, &ExternalASTSource::GetExternalCXXCtorInitializers > LazyCXXCtorInitializersPtr
A lazy pointer to a set of CXXCtorInitializers.
LazyOffsetPtr< CXXBaseSpecifier, uint64_t, &ExternalASTSource::GetExternalCXXBaseSpecifiers > LazyCXXBaseSpecifiersPtr
A lazy pointer to a set of CXXBaseSpecifiers.
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
LazyOffsetPtr< Decl, GlobalDeclID, &ExternalASTSource::GetExternalDecl > LazyDeclPtr
A lazy pointer to a declaration.
nullptr
This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...
StorageClass
Storage classes.
StorageDuration
The storage duration for an object (per C++ [basic.stc]).
const FunctionProtoType * T
@ Template
We are parsing a template declaration.
MSVtorDispMode
In the Microsoft ABI, this controls the placement of virtual displacement members used to implement v...
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
DeductionCandidate
Only used by CXXDeductionGuideDecl.
MSInheritanceModel
Assigned inheritance model for a class in the MS C++ ABI.
ExplicitSpecKind
Define the meaning of possible values of the kind in ExplicitSpecifier.
const StreamingDiagnostic & operator<<(const StreamingDiagnostic &DB, const ConceptReference *C)
Insertion operator for diagnostics.
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
CallingConv
CallingConv - Specifies the calling convention that a function uses.
U cast(CodeGen::Address addr)
@ Other
Other implicit parameter.
Information about how a lambda is numbered within its context.
Definition DeclCXX.h:1796
unsigned ManglingNumber
Definition DeclCXX.h:1799
unsigned DeviceManglingNumber
Definition DeclCXX.h:1800
unsigned IndexInContext
Definition DeclCXX.h:1798
bool HasKnownInternalLinkage
Definition DeclCXX.h:1801
Decl * ContextDecl
Definition DeclCXX.h:1797
A placeholder type used to construct an empty shell of a decl-derived type that will be filled in lat...
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
SourceLocation getLoc() const
getLoc - Returns the main location of the declaration name.
DeclarationName getName() const
getName - Returns the embedded declaration name.
const DeclarationNameLoc & getInfo() const
Parts of a decomposed MSGuidDecl.
Definition DeclCXX.h:4369
uint16_t Part2
...-89ab-...
Definition DeclCXX.h:4373
uint32_t Part1
{01234567-...
Definition DeclCXX.h:4371
uint16_t Part3
...-cdef-...
Definition DeclCXX.h:4375
uint8_t Part4And5[8]
...-0123-456789abcdef}
Definition DeclCXX.h:4377
uint64_t getPart4And5AsUint64() const
Definition DeclCXX.h:4379
Describes how types, statements, expressions, and declarations should be printed.