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
56class ASTContext;
57class ClassTemplateDecl;
58class ConstructorUsingShadowDecl;
59class CXXBasePath;
60class CXXBasePaths;
61class CXXConstructorDecl;
62class CXXDestructorDecl;
63class CXXFinalOverriderMap;
64class CXXIndirectPrimaryBaseSet;
65class CXXMethodDecl;
66class DecompositionDecl;
67class FriendDecl;
68class FunctionTemplateDecl;
69class IdentifierInfo;
70class MemberSpecializationInfo;
71class BaseUsingDecl;
72class TemplateDecl;
73class TemplateParameterList;
74class UsingDecl;
75
76
77
78
79
80
81
82
83
84
85
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
115 }
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
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
233 else
235 }
236
237
238
239
240
241
244 }
245
246
247
248
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:
289 };
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
344 CXXRecordDecl *Definition;
345
346
347
348
349
351
352 DefinitionData(CXXRecordDecl *D);
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 {
370 }
371
372 ArrayRef vbases() const {
374 }
375
376 private:
377 CXXBaseSpecifier *getBasesSlowCase() const;
378 CXXBaseSpecifier *getVBasesSlowCase() const;
379 };
380
381 struct DefinitionData *DefinitionData;
382
383
384 struct LambdaDefinitionData : public DefinitionData {
385 using Capture = LambdaCapture;
386
387
388
389
390
391
392
393
394
396 unsigned DependencyKind : 2;
397
398
399 LLVM_PREFERRED_TYPE(bool)
400 unsigned IsGenericLambda : 1;
401
402
404 unsigned CaptureDefault : 2;
405
406
407 unsigned NumCaptures : 15;
408
409
410 unsigned NumExplicitCaptures : 12;
411
412
413 LLVM_PREFERRED_TYPE(bool)
414 unsigned HasKnownInternalLinkage : 1;
415
416
417
418 unsigned ManglingNumber : 31;
419
420
421
422 unsigned IndexInContext;
423
424
425
426
427
429
430
431
432
433
434 llvm::TinyPtrVector<Capture*> Captures;
435
436
437 TypeSourceInfo *MethodTyInfo;
438
439 LambdaDefinitionData(CXXRecordDecl *D, TypeSourceInfo *Info, unsigned DK,
441 : DefinitionData(D), DependencyKind(DK), IsGenericLambda(IsGeneric),
442 CaptureDefault(CaptureDefault), NumCaptures(0),
443 NumExplicitCaptures(0), HasKnownInternalLinkage(0), ManglingNumber(0),
444 IndexInContext(0), MethodTyInfo(Info) {
445 IsLambda = true;
446
447
448
450 PlainOldData = false;
451 }
452
453
454 void AddCaptureList(ASTContext &Ctx, Capture *CaptureList);
455 };
456
457 struct DefinitionData *dataPtr() const {
458
460 return DefinitionData;
461 }
462
463 struct DefinitionData &data() const {
464 auto *DD = dataPtr();
465 assert(DD && "queried property of class with no definition");
466 return *DD;
467 }
468
469 struct LambdaDefinitionData &getLambdaData() const {
470
471
472 auto *DD = DefinitionData;
473 assert(DD && DD->IsLambda && "queried lambda property of non-lambda class");
474 return static_cast<LambdaDefinitionData&>(*DD);
475 }
476
477
478
479
480
481
482
483
484
485
486 llvm::PointerUnion<ClassTemplateDecl *, MemberSpecializationInfo *>
487 TemplateOrInstantiation;
488
489
490
491 void addedClassSubobject(CXXRecordDecl *Base);
492
493
494
495
496
497
498 void addedMember(Decl *D);
499
500 void markedVirtualFunctionPure();
501
502
503
504 FriendDecl *getFirstFriend() const;
505
506
507
508
509 bool hasSubobjectAtOffsetZeroOfEmptyBaseType(ASTContext &Ctx,
510 const CXXRecordDecl *X);
511
512protected:
514 SourceLocation StartLoc, SourceLocation IdLoc,
515 IdentifierInfo *Id, CXXRecordDecl *PrevDecl);
516
517public:
518
520
521
523
526 }
527
530 }
531
533 return cast_or_null(
535 }
536
539 }
540
542 return cast(
544 }
545
548 }
549
554
557 }
558 return Recent;
559 }
560
563 }
564
566
567
568 auto *DD = DefinitionData ? DefinitionData : dataPtr();
569 return DD ? DD->Definition : nullptr;
570 }
571
572 bool hasDefinition() const { return DefinitionData || dataPtr(); }
573
578 bool DelayTypeCreation = false);
581 unsigned DependencyKind, bool IsGeneric,
585
587 return data().Polymorphic || data().NumVBases != 0;
588 }
589
590
591
594 }
595
596
597
600 }
601
603
605 return data().IsParsingBaseSpecifiers;
606 }
607
609
610
612
613
614 unsigned getNumBases() const { return data().NumBases; }
615
618 llvm::iterator_range<base_class_const_iterator>;
619
622 }
625 }
626
632 }
633
634
635 unsigned getNumVBases() const { return data().NumVBases; }
636
639 }
642 }
643
649 }
650
651
652
654
655
656
657
660 llvm::iterator_range<specific_decl_iterator>;
661
664 }
665
666
667
670 }
671
672
675 }
676
677
680 llvm::iterator_range<specific_decl_iterator>;
681
683
686 }
687
690 }
691
692
693
694 class friend_iterator;
695 using friend_range = llvm::iterator_range<friend_iterator>;
696
701
702
704 return data().FirstFriend.isValid();
705 }
706
707
708
711 (data().DeclaredSpecialMembers & SMF_CopyConstructor)) &&
712 "this property has not yet been computed by Sema");
713 return data().DefaultedCopyConstructorIsDeleted;
714 }
715
716
717
720 (data().DeclaredSpecialMembers & SMF_MoveConstructor)) &&
721 "this property has not yet been computed by Sema");
722 return data().DefaultedMoveConstructorIsDeleted;
723 }
724
725
728 (data().DeclaredSpecialMembers & SMF_Destructor)) &&
729 "this property has not yet been computed by Sema");
730 return data().DefaultedDestructorIsDeleted;
731 }
732
733
734
737 !data().DefaultedCopyConstructorIsDeleted;
738 }
739
740
741
744 !data().DefaultedMoveConstructorIsDeleted;
745 }
746
747
748
751 !data().DefaultedCopyAssignmentIsDeleted;
752 }
753
754
755
758 !data().DefaultedMoveAssignmentIsDeleted;
759 }
760
761
762
765 !data().DefaultedDestructorIsDeleted;
766 }
767
768
770 return (data().DeclaredSpecialMembers & SMF_DefaultConstructor) ||
772 }
773
774
775
776
777
779 return (!data().UserDeclaredConstructor &&
780 !(data().DeclaredSpecialMembers & SMF_DefaultConstructor) &&
782
783
784
785 (data().HasInheritedDefaultConstructor &&
786 !(data().DeclaredSpecialMembers & SMF_DefaultConstructor));
787 }
788
789
790
791
793 return data().UserDeclaredConstructor;
794 }
795
796
797
799 return data().UserProvidedDefaultConstructor;
800 }
801
802
803
804
806 return data().UserDeclaredSpecialMembers & SMF_CopyConstructor;
807 }
808
809
810
812 return !(data().DeclaredSpecialMembers & SMF_CopyConstructor);
813 }
814
815
816
818
819
820
821
822
823
824 if (data().UserDeclaredSpecialMembers &
825 (SMF_MoveConstructor | SMF_MoveAssignment))
826 return true;
827 return data().NeedOverloadResolutionForCopyConstructor;
828 }
829
830
831
833 return data().ImplicitCopyConstructorCanHaveConstParamForNonVBase &&
835 data().ImplicitCopyConstructorCanHaveConstParamForVBase);
836 }
837
838
839
841 return data().HasDeclaredCopyConstructorWithConstParam ||
844 }
845
846
847
848
849
850
852 return data().UserDeclaredSpecialMembers &
853 (SMF_MoveConstructor | SMF_MoveAssignment);
854 }
855
856
857
859 return data().UserDeclaredSpecialMembers & SMF_MoveConstructor;
860 }
861
862
864 return (data().DeclaredSpecialMembers & SMF_MoveConstructor) ||
866 }
867
868
869
871 assert((data().DefaultedCopyConstructorIsDeleted ||
873 "Copy constructor should not be deleted");
874 data().DefaultedCopyConstructorIsDeleted = true;
875 }
876
877
878
880 assert((data().DefaultedMoveConstructorIsDeleted ||
882 "move constructor should not be deleted");
883 data().DefaultedMoveConstructorIsDeleted = true;
884 }
885
886
887
889 assert((data().DefaultedDestructorIsDeleted ||
891 "destructor should not be deleted");
892 data().DefaultedDestructorIsDeleted = true;
893
894
895
896
897
898
899 data().DefaultedDestructorIsConstexpr = data().NumVBases == 0;
900 }
901
902
903
905 return !(data().DeclaredSpecialMembers & SMF_MoveConstructor) &&
910 }
911
912
913
915 return data().NeedOverloadResolutionForMoveConstructor;
916 }
917
918
919
920
921
923 return data().UserDeclaredSpecialMembers & SMF_CopyAssignment;
924 }
925
926
927
929 assert((data().DefaultedCopyAssignmentIsDeleted ||
931 "copy assignment should not be deleted");
932 data().DefaultedCopyAssignmentIsDeleted = true;
933 }
934
935
936
938 return !(data().DeclaredSpecialMembers & SMF_CopyAssignment);
939 }
940
941
942
944
945
946
947
948
949
950 if (data().UserDeclaredSpecialMembers &
951 (SMF_MoveConstructor | SMF_MoveAssignment))
952 return true;
953 return data().NeedOverloadResolutionForCopyAssignment;
954 }
955
956
957
959 return data().ImplicitCopyAssignmentHasConstParam;
960 }
961
962
963
964
966 return data().HasDeclaredCopyAssignmentWithConstParam ||
969 }
970
971
972
974 return data().UserDeclaredSpecialMembers & SMF_MoveAssignment;
975 }
976
977
979 return (data().DeclaredSpecialMembers & SMF_MoveAssignment) ||
981 }
982
983
984
986 assert((data().DefaultedMoveAssignmentIsDeleted ||
988 "move assignment should not be deleted");
989 data().DefaultedMoveAssignmentIsDeleted = true;
990 }
991
992
993
994
996 return !(data().DeclaredSpecialMembers & SMF_MoveAssignment) &&
1002 }
1003
1004
1005
1007 return data().NeedOverloadResolutionForMoveAssignment;
1008 }
1009
1010
1011
1012
1014 return data().UserDeclaredSpecialMembers & SMF_Destructor;
1015 }
1016
1017
1018
1020 return !(data().DeclaredSpecialMembers & SMF_Destructor);
1021 }
1022
1023
1024
1026 return data().NeedOverloadResolutionForDestructor;
1027 }
1028
1029
1031
1032 auto *DD = DefinitionData;
1033 return DD && DD->IsLambda;
1034 }
1035
1036
1037
1038
1040
1041
1042
1044
1045
1046
1048
1049
1050
1052
1053
1054
1055
1056
1057
1058
1059
1062
1063
1064
1065
1067
1068
1070
1074 }
1075
1078 return false;
1080 }
1081
1082
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102 void
1103 getCaptureFields(llvm::DenseMap<const ValueDecl *, FieldDecl *> &Captures,
1105
1108
1111 }
1112
1114 if (()) return nullptr;
1115 LambdaDefinitionData &LambdaData = getLambdaData();
1116 return LambdaData.Captures.empty() ? nullptr : LambdaData.Captures.front();
1117 }
1118
1121 : nullptr;
1122 }
1123
1124 unsigned capture_size() const { return getLambdaData().NumCaptures; }
1125
1129 }
1130
1132
1134 return data().Conversions.get(getASTContext()).begin();
1135 }
1136
1138 return data().Conversions.get(getASTContext()).end();
1139 }
1140
1141
1142
1143
1145
1146
1147
1148 llvm::iterator_range<conversion_iterator>
1150
1151
1152
1153
1154
1156
1157
1158
1159
1161
1162
1163
1164
1165
1166
1167
1168
1169
1172 data().HasUninitializedReferenceMember;
1173 }
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183 bool isPOD() const { return data().PlainOldData; }
1184
1185
1186
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198 bool isEmpty() const { return data().Empty; }
1199
1202
1204 return data().HasPrivateFields;
1205 }
1206
1208 return data().HasProtectedFields;
1209 }
1210
1211
1213 auto &D = data();
1214 return D.HasPublicFields || D.HasProtectedFields || D.HasPrivateFields;
1215 }
1216
1217
1218
1219
1220
1221
1223
1224
1225
1227
1228
1229
1230
1231
1232
1234
1235
1236
1238
1239
1240
1242
1243
1244
1246
1247
1249
1250
1251
1254 (data().HasTrivialSpecialMembers & SMF_DefaultConstructor);
1255 }
1256
1257
1258
1260 return (data().DeclaredNonTrivialSpecialMembers & SMF_DefaultConstructor) ||
1262 !(data().HasTrivialSpecialMembers & SMF_DefaultConstructor));
1263 }
1264
1265
1266
1268 return data().HasConstexprNonCopyMoveConstructor ||
1271 }
1272
1273
1274
1276 return data().DefaultedDefaultConstructorIsConstexpr &&
1279 }
1280
1281
1283 return data().HasConstexprDefaultConstructor ||
1286 }
1287
1288
1289
1291 return data().HasTrivialSpecialMembers & SMF_CopyConstructor;
1292 }
1293
1295 return data().HasTrivialSpecialMembersForCall & SMF_CopyConstructor;
1296 }
1297
1298
1299
1301 return data().DeclaredNonTrivialSpecialMembers & SMF_CopyConstructor ||
1303 }
1304
1306 return (data().DeclaredNonTrivialSpecialMembersForCall &
1307 SMF_CopyConstructor) ||
1309 }
1310
1311
1312
1315 (data().HasTrivialSpecialMembers & SMF_MoveConstructor);
1316 }
1317
1320 (data().HasTrivialSpecialMembersForCall & SMF_MoveConstructor);
1321 }
1322
1323
1324
1326 return (data().DeclaredNonTrivialSpecialMembers & SMF_MoveConstructor) ||
1328 !(data().HasTrivialSpecialMembers & SMF_MoveConstructor));
1329 }
1330
1332 return (data().DeclaredNonTrivialSpecialMembersForCall &
1333 SMF_MoveConstructor) ||
1335 !(data().HasTrivialSpecialMembersForCall & SMF_MoveConstructor));
1336 }
1337
1338
1339
1341 return data().HasTrivialSpecialMembers & SMF_CopyAssignment;
1342 }
1343
1344
1345
1347 return data().DeclaredNonTrivialSpecialMembers & SMF_CopyAssignment ||
1349 }
1350
1351
1352
1355 (data().HasTrivialSpecialMembers & SMF_MoveAssignment);
1356 }
1357
1358
1359
1361 return (data().DeclaredNonTrivialSpecialMembers & SMF_MoveAssignment) ||
1363 !(data().HasTrivialSpecialMembers & SMF_MoveAssignment));
1364 }
1365
1366
1367
1369 return data().DefaultedDestructorIsConstexpr &&
1371 }
1372
1373
1375
1376
1377
1379 return data().HasTrivialSpecialMembers & SMF_Destructor;
1380 }
1381
1383 return data().HasTrivialSpecialMembersForCall & SMF_Destructor;
1384 }
1385
1386
1387
1389 return !(data().HasTrivialSpecialMembers & SMF_Destructor);
1390 }
1391
1393 return !(data().HasTrivialSpecialMembersForCall & SMF_Destructor);
1394 }
1395
1397 data().HasTrivialSpecialMembersForCall =
1398 (SMF_CopyConstructor | SMF_MoveConstructor | SMF_Destructor);
1399 }
1400
1401
1402
1404 return !data().HasUninitializedFields ||
1405 !(data().HasDefaultedDefaultConstructor ||
1407 }
1408
1409
1410
1411
1412
1413
1415 return data().HasIrrelevantDestructor;
1416 }
1417
1418
1419
1421 return data().HasNonLiteralTypeFieldsOrBases;
1422 }
1423
1424
1425
1427 return data().HasInheritedConstructor;
1428 }
1429
1430
1431
1433 return data().HasInheritedAssignment;
1434 }
1435
1436
1437
1439
1440
1442
1443
1444
1445
1446
1447
1450 }
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1468
1469
1471 return isLiteral() && data().StructuralIfLiteral;
1472 }
1473
1474
1475
1476
1477
1478
1479
1480
1482
1483
1484
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1507
1508
1509
1510
1512
1513
1514
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1530
1532
1533
1534
1535
1537
1538
1540
1541
1542
1544
1548 }
1549
1550
1552
1553
1554
1556
1557
1558
1560
1561
1562
1564 if (const auto *RD = dyn_cast(getDeclContext()))
1565 return RD->isLocalClass();
1566
1568 }
1569
1573 }
1574
1575
1576
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1623
1624
1625
1627
1628
1629
1630
1631
1632
1635
1636
1637
1638
1639
1640
1641
1642
1643
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1682 bool LookupInDependent = false) const;
1683
1684
1685
1686
1687
1688
1689
1690
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1706
1707
1708
1709
1711
1712
1714
1715
1716
1717
1718
1719
1720
1722
1723
1724
1725
1726
1727 std::vector<const NamedDecl *>
1729 llvm::function_ref<bool(const NamedDecl *ND)> Filter);
1730
1731
1732
1733
1735
1736
1737
1740 assert(DeclAccess != AS_none);
1742 return (PathAccess > DeclAccess ? PathAccess : DeclAccess);
1743 }
1744
1745
1746
1748
1750
1751
1753
1754
1755
1756
1757
1758
1759
1760
1762
1763
1764
1765
1766
1767
1768
1769
1771
1772
1773
1775
1776
1777
1778
1779
1780
1781
1783 assert(isLambda() && "Not a lambda closure type!");
1784 return getLambdaData().ManglingNumber;
1785 }
1786
1787
1788
1790 assert(isLambda() && "Not a lambda closure type!");
1791 return getLambdaData().HasKnownInternalLinkage;
1792 }
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1804
1805
1806
1808 assert(isLambda() && "Not a lambda closure type!");
1809 return getLambdaData().IndexInContext;
1810 }
1811
1812
1819 };
1820
1821
1823
1824
1829 }
1830
1831
1833
1834
1836
1837
1839
1840
1841
1842
1843
1844
1845
1847
1848
1849
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1865 }
1866
1869 }
1870
1874 return getLambdaData().DependencyKind;
1875 }
1876
1878 return getLambdaData().MethodTyInfo;
1879 }
1880
1882 assert(DefinitionData && DefinitionData->IsLambda &&
1883 "setting lambda property of non-lambda class");
1884 auto &DL = static_cast<LambdaDefinitionData &>(*DefinitionData);
1885 DL.MethodTyInfo = TS;
1886 }
1887
1889 getLambdaData().DependencyKind = Kind;
1890 }
1891
1893 assert(DefinitionData && DefinitionData->IsLambda &&
1894 "setting lambda property of non-lambda class");
1895 auto &DL = static_cast<LambdaDefinitionData &>(*DefinitionData);
1896 DL.IsGenericLambda = IsGeneric;
1897 }
1898
1899
1900
1902
1905 return K >= firstCXXRecord && K <= lastCXXRecord;
1906 }
1908};
1909
1910
1911
1913 llvm::PointerIntPair<Expr *, 2, ExplicitSpecKind> ExplicitSpec{
1915
1916public:
1921 const Expr *getExpr() const { return ExplicitSpec.getPointer(); }
1923
1924
1927 ExplicitSpec.getPointer();
1928 }
1929
1930
1931
1933
1934
1935
1938 }
1939
1940
1943 !ExplicitSpec.getPointer();
1944 }
1947
1951 }
1954 }
1955};
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1968 void anchor() override;
1969
1970private:
1976 Expr *TrailingRequiresClause)
1977 : FunctionDecl(CXXDeductionGuide, C, DC, StartLoc, NameInfo, T, TInfo,
1979 TrailingRequiresClause),
1980 Ctor(Ctor), ExplicitSpec(ES) {
1981 if (EndLocation.isValid())
1984 }
1985
1988 void setExplicitSpecifier(ExplicitSpecifier ES) { ExplicitSpec = ES; }
1989
1990public:
1993
2000 Expr *TrailingRequiresClause = nullptr);
2001
2004
2007
2008
2010
2011
2014 }
2015
2016
2017
2019
2021 FunctionDeclBits.DeductionCandidateKind = static_cast<unsigned char>(K);
2022 }
2023
2027 }
2028
2029
2032};
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2049 : Decl(RequiresExprBody, DC, StartLoc), DeclContext(RequiresExprBody) {}
2050
2051public:
2054
2057
2060
2061
2064
2067 }
2068
2071 }
2072};
2073
2074
2075
2076
2077
2079 void anchor() override;
2080
2081protected:
2087 Expr *TrailingRequiresClause = nullptr)
2089 isInline, ConstexprKind, TrailingRequiresClause) {
2090 if (EndLocation.isValid())
2092 }
2093
2094public:
2100 Expr *TrailingRequiresClause = nullptr);
2101
2103
2106
2107
2108
2109
2110
2112
2113
2114
2115
2117
2118
2119
2121
2122
2123
2124
2125
2126 return OOK == OO_New || OOK == OO_Array_New || OOK == OO_Delete ||
2127 OOK == OO_Array_Delete;
2128 }
2129
2132
2135
2136
2137
2139 return true;
2140
2142 }
2143
2144
2145
2146
2147
2148
2150
2152 bool IsAppleKext) const {
2154 Base, IsAppleKext);
2155 }
2156
2157
2158
2159
2160
2161
2162
2163
2166
2167
2168
2170
2171
2173
2176 }
2179 }
2180
2182 return cast(
2184 }
2187 }
2188
2190
2192
2196
2198 llvm::TinyPtrVector<const CXXMethodDecl *>::const_iterator>;
2199
2201
2202
2203
2206 }
2207
2208
2209
2213 }
2214
2215
2216
2217
2218
2219
2220
2222
2223
2224
2225
2226
2230 }
2231
2234 }
2235
2238
2241 }
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2256 }
2257
2259
2260
2261
2262
2263
2264
2265
2266
2268
2269
2270
2271
2272
2273
2276 bool MayBeBase = false);
2277
2280 bool MayBeBase = false) const {
2283 }
2284
2285
2286
2288 bool MayBeBase = false);
2291 bool MayBeBase = false) const {
2294 }
2295
2296
2299 return K >= firstCXXMethod && K <= lastCXXMethod;
2300 }
2301};
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2319
2320
2321
2322 llvm::PointerUnion<TypeSourceInfo *, FieldDecl *, IndirectFieldDecl *>
2323 Initializee;
2324
2325
2326
2328
2329
2330
2331
2332
2333
2334
2336
2337
2339
2340
2342
2343
2344
2345 LLVM_PREFERRED_TYPE(bool)
2346 unsigned IsDelegating : 1;
2347
2348
2349
2350 LLVM_PREFERRED_TYPE(bool)
2351 unsigned IsVirtual : 1;
2352
2353
2354
2355 LLVM_PREFERRED_TYPE(bool)
2356 unsigned IsWritten : 1;
2357
2358
2359
2360 unsigned SourceOrder : 13;
2361
2362public:
2363
2364 explicit
2368
2369
2370 explicit
2374
2375
2376 explicit
2380
2381
2382 explicit
2385
2386
2388
2389
2391 return isa<TypeSourceInfo *>(Initializee) && !IsDelegating;
2392 }
2393
2394
2395
2397
2400 }
2401
2403 return isa<IndirectFieldDecl *>(Initializee);
2404 }
2405
2406
2407
2408
2409
2410
2411
2413 return Init->getStmtClass() == Stmt::CXXDefaultInitExprClass;
2414 }
2415
2416
2417
2419 return isa<TypeSourceInfo *>(Initializee) && IsDelegating;
2420 }
2421
2422
2425 }
2426
2427
2430 return {};
2431 return MemberOrEllipsisLocation;
2432 }
2433
2434
2435
2436
2438
2439
2440
2442
2443
2445 assert(isBaseInitializer() && "Must call this on base initializer!");
2446
2447 return IsVirtual;
2448 }
2449
2450
2451
2454 }
2455
2456
2457
2460 return cast<FieldDecl *>(Initializee);
2461 return nullptr;
2462 }
2463
2466 return cast<FieldDecl *>(Initializee);
2468 return cast<IndirectFieldDecl *>(Initializee)->getAnonField();
2469 return nullptr;
2470 }
2471
2474 return cast<IndirectFieldDecl *>(Initializee);
2475 return nullptr;
2476 }
2477
2479 return MemberOrEllipsisLocation;
2480 }
2481
2482
2484
2485
2487
2488
2489
2491
2492
2493
2495 return IsWritten ? static_cast<int>(SourceOrder) : -1;
2496 }
2497
2498
2499
2500
2501
2502
2503
2504
2506 assert(!IsWritten &&
2507 "setSourceOrder() used on implicit initializer");
2508 assert(SourceOrder == 0 &&
2509 "calling twice setSourceOrder() on the same initializer");
2510 assert(Pos >= 0 &&
2511 "setSourceOrder() used to make an initializer implicit");
2512 IsWritten = true;
2513 SourceOrder = static_cast<unsigned>(Pos);
2514 }
2515
2518
2519
2521};
2522
2523
2527
2528public:
2532 : Shadow(Shadow), BaseCtor(BaseCtor) {}
2533
2534 explicit operator bool() const { return Shadow; }
2535
2538};
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2552 private llvm::TrailingObjects<CXXConstructorDecl, InheritedConstructor,
2553 ExplicitSpecifier> {
2554
2555
2556
2557
2558
2559
2561
2568 Expr *TrailingRequiresClause);
2569
2570 void anchor() override;
2571
2572 size_t numTrailingObjects(OverloadToken) const {
2574 }
2575 size_t numTrailingObjects(OverloadToken) const {
2577 }
2578
2581 return *getTrailingObjects();
2586 }
2587
2588 enum TrailingAllocKind {
2589 TAKInheritsConstructor = 1,
2590 TAKHasTailExplicit = 1 << 1,
2591 };
2592
2593 uint64_t getTrailingAllocKind() const {
2594 return numTrailingObjects(OverloadToken()) |
2595 (numTrailingObjects(OverloadToken()) << 1);
2596 }
2597
2598public:
2602
2604 uint64_t AllocKind);
2611 Expr *TrailingRequiresClause = nullptr);
2612
2614 assert((!ES.getExpr() ||
2616 "cannot set this explicit specifier. no trail-allocated space for "
2617 "explicit");
2620 else
2622 }
2623
2626 }
2629 }
2630
2631
2633
2634
2636
2637
2639
2640 using init_range = llvm::iterator_range<init_iterator>;
2642
2646 }
2647
2648
2650 const auto *ConstThis = this;
2651 return const_cast<init_iterator>(ConstThis->init_begin());
2652 }
2653
2654
2656
2657
2660 }
2661
2662
2665 }
2666
2669 std::reverse_iterator<init_const_iterator>;
2670
2673 }
2676 }
2677
2680 }
2683 }
2684
2685
2686
2689 }
2690
2693
2694
2695
2697 numCtorInitializers && "NumCtorInitializers overflow!");
2698 }
2699
2701 CtorInitializers = Initializers;
2702 }
2703
2704
2708 }
2709
2710
2712
2713
2714
2715
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2732
2733
2734
2735
2737 unsigned TypeQuals = 0;
2739 }
2740
2741
2742
2743
2744
2745
2747
2748
2749
2751 unsigned TypeQuals = 0;
2753 }
2754
2755
2756
2757
2758
2760
2761
2763 unsigned Quals;
2765 }
2766
2767
2768
2769
2771
2772
2773
2774
2776
2777
2778
2781 }
2782
2783
2784
2787 }
2788
2789
2793 }
2794
2797 }
2800 }
2801
2802
2805};
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2820
2821
2822
2824 Expr *OperatorDeleteThisArg = nullptr;
2825
2830 Expr *TrailingRequiresClause = nullptr)
2831 : CXXMethodDecl(CXXDestructor, C, RD, StartLoc, NameInfo, T, TInfo,
2835 }
2836
2837 void anchor() override;
2838
2839public:
2843 bool UsesFPIntrin, bool isInline, bool isImplicitlyDeclared,
2845 Expr *TrailingRequiresClause = nullptr);
2847
2849
2852 }
2853
2856 }
2857
2858
2859
2860
2862
2865 }
2868 }
2869
2870
2873};
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2891 Expr *TrailingRequiresClause = nullptr)
2892 : CXXMethodDecl(CXXConversion, C, RD, StartLoc, NameInfo, T, TInfo,
2894 EndLocation, TrailingRequiresClause),
2895 ExplicitSpec(ES) {}
2896 void anchor() override;
2897
2899
2900public:
2903
2909 Expr *TrailingRequiresClause = nullptr);
2911
2914 }
2915
2918 }
2919
2920
2923
2924
2927 }
2928
2929
2930
2932
2935 }
2938 }
2939
2940
2943};
2944
2945
2946
2947
2948
2950
2951
2952
2953
2954
2955
2956
2958 virtual void anchor();
2959
2960
2961
2962
2964
2965
2967
2970 bool HasBraces);
2971
2972public:
2978
2979
2982 }
2983
2984
2987 }
2988
2989
2990
2994 }
2995
3000 RBraceLoc = L;
3002 }
3003
3007
3008
3010 }
3011
3014 }
3015
3018
3021 }
3022
3025 }
3026};
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3039
3041
3042
3044
3045
3047
3048
3050
3051
3052
3054
3061 : NamedDecl(UsingDirective, DC, IdentLoc, getName()), UsingLoc(UsingLoc),
3062 NamespaceLoc(NamespcLoc), QualifierLoc(QualifierLoc),
3063 NominatedNamespace(Nominated), CommonAncestor(CommonAncestor) {}
3064
3065
3066
3067
3068
3071 }
3072
3073 void anchor() override;
3074
3075public:
3077
3078
3080
3081
3082
3084
3085
3086
3089 }
3090
3093 return NominatedNamespace;
3094 }
3095
3096
3098
3101 }
3102
3103
3104
3107
3108
3110
3111
3112
3114
3115
3117
3126
3129 }
3130
3133};
3134
3135
3136
3137
3138
3139
3140
3141
3145
3146
3148
3149
3150
3151
3153
3154
3156
3157
3158
3160
3166 NamespaceLoc(NamespaceLoc), IdentLoc(IdentLoc),
3167 QualifierLoc(QualifierLoc), Namespace(Namespace) {}
3168
3169 void anchor() override;
3170
3172
3176
3177public:
3185
3187
3190
3196
3199 }
3202 }
3203
3204
3205
3207
3208
3209
3212 }
3213
3214
3216 if (auto *AD = dyn_cast(Namespace))
3217 return AD->getNamespace();
3218
3219 return cast(Namespace);
3220 }
3221
3224 }
3225
3226
3227
3229
3230
3232
3233
3235
3236
3237
3239
3241 return SourceRange(NamespaceLoc, IdentLoc);
3242 }
3243
3246};
3247
3248
3249
3251 : public Decl,
3252 public Mergeable {
3255
3256 Stmt *ExprWithTemporary = nullptr;
3257
3258
3259
3260 ValueDecl *ExtendingDecl = nullptr;
3261 unsigned ManglingNumber;
3262
3264
3265 virtual void anchor();
3266
3270 ExprWithTemporary(Temp), ExtendingDecl(EDecl),
3271 ManglingNumber(Mangling) {}
3272
3274 : Decl(Decl::LifetimeExtendedTemporary, EmptyShell{}) {}
3275
3276public:
3278 unsigned Mangling) {
3281 }
3285 }
3286
3289
3290
3292
3293
3294
3295
3296
3297
3300
3302
3303
3304
3306
3308
3309
3311 return Stmt::child_range(&ExprWithTemporary, &ExprWithTemporary + 1);
3312 }
3313
3316 }
3317
3320 return K == Decl::LifetimeExtendedTemporary;
3321 }
3322};
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3345
3346
3347 NamedDecl *Underlying = nullptr;
3348
3349
3350
3351 NamedDecl *UsingOrNextShadow = nullptr;
3352
3353 void anchor() override;
3354
3356
3359 }
3360
3363 }
3364
3365 UsingShadowDecl *getMostRecentDeclImpl() override {
3367 }
3368
3369protected:
3371 DeclarationName Name, BaseUsingDecl *Introducer,
3374
3375public:
3378
3382 return new (C, DC)
3384 }
3385
3387
3390
3397
3400 }
3403 }
3404
3405
3406
3408
3409
3410
3412 assert(ND && "Target decl is null!");
3413 Underlying = ND;
3414
3415
3419 }
3420
3421
3422
3424
3425
3426
3428 return dyn_cast_or_null(UsingOrNextShadow);
3429 }
3430
3433 return K == Decl::UsingShadow || K == Decl::ConstructorUsingShadow;
3434 }
3435};
3436
3437
3438
3439
3441
3442
3443
3444
3445
3446 llvm::PointerIntPair<UsingShadowDecl *, 1, bool> FirstUsingShadow;
3447
3448protected:
3450 : NamedDecl(DK, DC, L, N), FirstUsingShadow(nullptr, false) {}
3451
3452private:
3453 void anchor() override;
3454
3455protected:
3456
3457 bool getShadowFlag() const { return FirstUsingShadow.getInt(); }
3458
3459
3461
3462public:
3465
3466
3467
3469
3471
3472 public:
3478
3481
3484
3486 Current = Current->getNextUsingShadowDecl();
3487 return *this;
3488 }
3489
3492 ++(*this);
3493 return tmp;
3494 }
3495
3497 return x.Current == y.Current;
3498 }
3500 return x.Current != y.Current;
3501 }
3502 };
3503
3505
3508 }
3509
3512 }
3513
3515
3516
3517
3520 }
3521
3524
3526 static bool classofKind(Kind K) { return K == Using || K == UsingEnum; }
3527};
3528
3529
3530
3531
3532
3533
3534
3536
3538
3539
3541
3542
3543
3545
3550 UsingLocation(UL), QualifierLoc(QualifierLoc),
3551 DNLoc(NameInfo.getInfo()) {
3553 }
3554
3555 void anchor() override;
3556
3557public:
3560
3561
3563
3564
3566
3567
3568
3570
3571
3574 }
3575
3578 }
3579
3580
3582
3583
3585
3586
3588
3593 bool HasTypenameKeyword);
3594
3596
3598
3599
3602 }
3605 }
3606
3609};
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3622
3623
3624
3626
3627
3628
3629
3630
3632
3633
3634
3635
3636 LLVM_PREFERRED_TYPE(bool)
3637 unsigned IsVirtual : 1;
3638
3641 bool TargetInVirtualBase)
3643 Using->getDeclName(), Using,
3644 Target->getUnderlyingDecl()),
3645 NominatedBaseClassShadowDecl(
3646 dyn_cast(Target)),
3647 ConstructedBaseClassShadowDecl(NominatedBaseClassShadowDecl),
3648 IsVirtual(TargetInVirtualBase) {
3649
3650
3651
3652 if (NominatedBaseClassShadowDecl &&
3653 NominatedBaseClassShadowDecl->constructsVirtualBase()) {
3654 ConstructedBaseClassShadowDecl =
3655 NominatedBaseClassShadowDecl->ConstructedBaseClassShadowDecl;
3656 IsVirtual = true;
3657 }
3658 }
3659
3662
3663 void anchor() override;
3664
3665public:
3668
3672 bool IsVirtual);
3675
3676
3677
3680 }
3681
3682
3683
3684
3687 }
3690 }
3691
3692
3693
3694
3695
3697 return NominatedBaseClassShadowDecl;
3698 }
3699
3700
3701
3703 return ConstructedBaseClassShadowDecl;
3704 }
3705
3706
3707
3709
3710
3711
3713 return cast((ConstructedBaseClassShadowDecl
3714 ? ConstructedBaseClassShadowDecl
3717 }
3718
3719
3720
3722 return IsVirtual;
3723 }
3724
3727};
3728
3729
3730
3731
3732
3733
3734
3735
3737
3739
3741
3743
3746 : BaseUsingDecl(UsingEnum, DC, NL, DN), UsingLocation(UL), EnumLocation(EL),
3748
3749 void anchor() override;
3750
3751public:
3754
3755
3758
3759
3764 }
3767 return ETL.getQualifierLoc();
3769 }
3770
3772 return EnumType->getTypeLoc();
3773 }
3776 }
3778
3779public:
3781
3785
3787
3789
3790
3793 }
3796 }
3797
3800};
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3817 private llvm::TrailingObjects<UsingPackDecl, NamedDecl *> {
3818
3819
3821
3822
3823 unsigned NumExpansions;
3824
3828 InstantiatedFrom ? InstantiatedFrom->getLocation()
3830 InstantiatedFrom ? InstantiatedFrom->getDeclName()
3832 InstantiatedFrom(InstantiatedFrom), NumExpansions(UsingDecls.size()) {
3833 std::uninitialized_copy(UsingDecls.begin(), UsingDecls.end(),
3834 getTrailingObjects<NamedDecl *>());
3835 }
3836
3837 void anchor() override;
3838
3839public:
3843
3844
3845
3846
3848
3849
3850
3852 return llvm::ArrayRef(getTrailingObjects<NamedDecl *>(), NumExpansions);
3853 }
3854
3858
3860 unsigned NumExpansions);
3861
3863 return InstantiatedFrom->getSourceRange();
3864 }
3865
3868
3871};
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3885 public Mergeable {
3886
3888
3889
3891
3892
3894
3895
3896
3898
3904 : ValueDecl(UnresolvedUsingValue, DC,
3906 UsingLocation(UsingLoc), EllipsisLoc(EllipsisLoc),
3907 QualifierLoc(QualifierLoc), DNLoc(NameInfo.getInfo()) {}
3908
3909 void anchor() override;
3910
3911public:
3914
3915
3917
3918
3920
3921
3923
3924
3925
3927
3928
3931 }
3932
3935 }
3936
3937
3939 return EllipsisLoc.isValid();
3940 }
3941
3942
3944 return EllipsisLoc;
3945 }
3946
3951
3954
3956
3957
3960 }
3963 }
3964
3967};
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3982 public Mergeable {
3984
3985
3987
3988
3990
3991
3993
4000 : TypeDecl(UnresolvedUsingTypename, DC, TargetNameLoc, TargetName,
4001 UsingLoc),
4002 TypenameLocation(TypenameLoc), EllipsisLoc(EllipsisLoc),
4003 QualifierLoc(QualifierLoc) {}
4004
4005 void anchor() override;
4006
4007public:
4008
4010
4011
4013
4014
4015
4017
4018
4021 }
4022
4025 }
4026
4027
4029 return EllipsisLoc.isValid();
4030 }
4031
4032
4034 return EllipsisLoc;
4035 }
4036
4042
4045
4046
4049 }
4052 }
4053
4055 static bool classofKind(Kind K) { return K == UnresolvedUsingTypename; }
4056};
4057
4058
4059
4060
4061
4062
4066
4067 void anchor() override;
4068
4069public:
4075
4077 static bool classofKind(Kind K) { return K == Decl::UnresolvedUsingIfExists; }
4078};
4079
4080
4082 llvm::PointerIntPair<Expr *, 1, bool> AssertExprAndFailed;
4083 Expr *Message;
4085
4088 bool Failed)
4089 : Decl(StaticAssert, DC, StaticAssertLoc),
4090 AssertExprAndFailed(AssertExpr, Failed), Message(Message),
4091 RParenLoc(RParenLoc) {}
4092
4093 virtual void anchor();
4094
4095public:
4097
4100 Expr *AssertExpr, Expr *Message,
4103
4106
4109
4110 bool isFailed() const { return AssertExprAndFailed.getInt(); }
4111
4113
4116 }
4117
4120};
4121
4122
4123
4124
4125
4126
4127
4128
4129
4131
4133
4134
4135
4136
4137 Expr *Binding = nullptr;
4138
4141
4142 void anchor() override;
4143
4144public:
4146
4150
4151
4152
4153
4155
4156
4157
4159
4160
4161
4163
4164
4165
4166
4169 this->Binding = Binding;
4170 }
4171
4172
4174
4177};
4178
4179
4180
4181
4182
4183
4184
4185
4186
4189 private llvm::TrailingObjects<DecompositionDecl, BindingDecl *> {
4190
4191 unsigned NumBindings;
4192
4197 : VarDecl(Decomposition, C, DC, StartLoc, LSquareLoc, nullptr, T, TInfo,
4198 SC),
4199 NumBindings(Bindings.size()) {
4201 getTrailingObjects<BindingDecl *>());
4203 B->setDecomposedDecl(this);
4204 }
4205
4206 void anchor() override;
4207
4208public:
4211
4219 unsigned NumBindings);
4220
4222 return llvm::ArrayRef(getTrailingObjects<BindingDecl *>(), NumBindings);
4223 }
4224
4226
4229};
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4260
4264 : DeclaratorDecl(MSProperty, DC, L, N, T, TInfo, StartL),
4265 GetterId(Getter), SetterId(Setter) {}
4266
4267 void anchor() override;
4268public:
4270
4276
4277 static bool classof(const Decl *D) { return D->getKind() == MSProperty; }
4278
4279 bool hasGetter() const { return GetterId != nullptr; }
4281 bool hasSetter() const { return SetterId != nullptr; }
4283};
4284
4285
4286
4288
4290
4292
4294
4296
4298 uint64_t Val;
4300 return Val;
4301 }
4302};
4303
4304
4305
4306
4307
4308
4309
4312 public llvm::FoldingSetNode {
4313public:
4315
4316private:
4317
4319
4320
4321
4323
4324 void anchor() override;
4325
4327
4330
4331
4335
4336public:
4337
4338 void printName(llvm::raw_ostream &OS,
4340
4341
4343
4344
4345
4346
4348
4353 ID.AddInteger(P.getPart4And5AsUint64());
4354 }
4356
4359};
4360
4361
4362
4363
4364
4365
4366
4368 public Mergeable,
4369 public llvm::FoldingSetNode {
4370
4371
4373
4374 void anchor() override;
4375
4378
4383
4384
4385
4389
4390public:
4391
4392 void printName(llvm::raw_ostream &OS,
4394
4396
4401 }
4404 }
4405
4407 static bool classofKind(Kind K) { return K == Decl::UnnamedGlobalConstant; }
4408};
4409
4410
4411
4412const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
4414
4415}
4416
4417#endif
const LambdaCapture * Capture
enum clang::sema::@1727::IndirectLocalPathEntry::EntryKind Kind
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.
llvm::MachO::Target Target
Defines an enumeration for C++ overloaded operators.
Defines the clang::SourceLocation class and associated facilities.
Defines various enumerations that describe declaration and type specifiers.
Defines the clang::TypeLoc interface and its subclasses.
C Language Family Type Representation.
const NestedNameSpecifier * Specifier
__DEVICE__ void * memcpy(void *__a, const void *__b, size_t __c)
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 ...
Reads an AST files chain containing the contents of a translation unit.
An object for streaming information to a record.
Writes an AST file containing the contents of a translation unit.
Represents an access specifier followed by colon ':'.
static AccessSpecDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
static AccessSpecDecl * Create(ASTContext &C, AccessSpecifier AS, DeclContext *DC, SourceLocation ASLoc, SourceLocation ColonLoc)
SourceLocation getColonLoc() const
The location of the colon following the access specifier.
static bool classof(const Decl *D)
static bool classofKind(Kind K)
SourceLocation getAccessSpecifierLoc() const
The location of the access specifier.
void setAccessSpecifierLoc(SourceLocation ASLoc)
Sets the location of the access specifier.
void setColonLoc(SourceLocation CLoc)
Sets the location of the colon.
Iterates through the using shadow declarations associated with this using declaration.
shadow_iterator()=default
reference operator*() const
pointer operator->() const
shadow_iterator & operator++()
std::forward_iterator_tag iterator_category
shadow_iterator(UsingShadowDecl *C)
friend bool operator==(shadow_iterator x, shadow_iterator y)
shadow_iterator operator++(int)
friend bool operator!=(shadow_iterator x, shadow_iterator y)
std::ptrdiff_t difference_type
Represents a C++ declaration that introduces decls from somewhere else.
llvm::iterator_range< shadow_iterator > shadow_range
bool getShadowFlag() const
A bool flag for use by a derived type.
unsigned shadow_size() const
Return the number of shadowed declarations associated with this using declaration.
void addShadowDecl(UsingShadowDecl *S)
shadow_range shadows() const
shadow_iterator shadow_end() const
static bool classofKind(Kind K)
BaseUsingDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N)
shadow_iterator shadow_begin() const
void setShadowFlag(bool V)
A bool flag a derived type may set.
void removeShadowDecl(UsingShadowDecl *S)
static bool classof(const Decl *D)
A binding in a decomposition declaration.
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.
Expr * getBinding() const
Get the expression to which this declaration is bound.
static bool classof(const Decl *D)
void setBinding(QualType DeclaredType, Expr *Binding)
Set the binding for this BindingDecl, along with its declared type (which should be a possibly-cv-qua...
void setDecomposedDecl(ValueDecl *Decomposed)
Set the decomposed variable for this BindingDecl.
static BindingDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classofKind(Kind K)
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.
void setInheritConstructors(bool Inherit=true)
Set that this base class's constructors should be inherited.
SourceLocation getBeginLoc() const LLVM_READONLY
AccessSpecifier getAccessSpecifierAsWritten() const
Retrieves the access specifier as written in the source code (which may mean that no access specifier...
CXXBaseSpecifier(SourceRange R, bool V, bool BC, AccessSpecifier A, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc)
SourceLocation getEllipsisLoc() const
For a pack expansion, determine the location of the ellipsis.
bool isVirtual() const
Determines whether the base class is a virtual base class (or not).
QualType getType() const
Retrieves the type of the base class.
TypeSourceInfo * getTypeSourceInfo() const
Retrieves the type and source location of the base class.
CXXBaseSpecifier()=default
bool getInheritConstructors() const
Determine whether this base class's constructors get inherited.
bool isPackExpansion() const
Determine whether this base specifier is a pack expansion.
SourceLocation getBaseTypeLoc() const LLVM_READONLY
Get the location at which the base class type was written.
SourceLocation getEndLoc() const LLVM_READONLY
bool isBaseOfClass() const
Determine whether this base class is a base of a class declared with the 'class' keyword (vs.
SourceRange getSourceRange() const LLVM_READONLY
Retrieves the source range that contains the entire base specifier.
AccessSpecifier getAccessSpecifier() const
Returns the access specifier for this base specifier.
Represents a C++ constructor within a class.
init_const_iterator init_end() const
Retrieve an iterator past the last initializer.
init_iterator init_end()
Retrieve an iterator past the last initializer.
std::reverse_iterator< init_iterator > init_reverse_iterator
std::reverse_iterator< init_const_iterator > init_const_reverse_iterator
init_reverse_iterator init_rbegin()
CXXConstructorDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
void setInheritingConstructor(bool isIC=true)
State that this is an implicit constructor synthesized to model a call to a constructor inherited fro...
bool isExplicit() const
Return true if the declaration is already resolved to be explicit.
ExplicitSpecifier getExplicitSpecifier()
init_iterator init_begin()
Retrieve an iterator to the first initializer.
CXXConstructorDecl * getTargetConstructor() const
When this constructor delegates to another, retrieve the target.
static bool classofKind(Kind K)
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.
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.
bool isMoveConstructor() const
Determine whether this constructor is a move constructor (C++11 [class.copy]p3), which can be used to...
init_const_reverse_iterator init_rbegin() const
void setNumCtorInitializers(unsigned numCtorInitializers)
void setExplicitSpecifier(ExplicitSpecifier ES)
init_const_range inits() const
bool isCopyOrMoveConstructor() const
Determine whether this a copy or move constructor.
init_const_reverse_iterator init_rend() const
bool isInheritingConstructor() const
Determine whether this is an implicit constructor synthesized to model a call to a constructor inheri...
init_reverse_iterator init_rend()
llvm::iterator_range< init_iterator > init_range
CXXCtorInitializer *const * init_const_iterator
Iterates through the member/base initializer list.
const ExplicitSpecifier getExplicitSpecifier() const
unsigned getNumCtorInitializers() const
Determine the number of arguments used to initialize the member or base.
llvm::iterator_range< init_const_iterator > init_const_range
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
static bool classof(const Decl *D)
void setCtorInitializers(CXXCtorInitializer **Initializers)
bool isCopyConstructor() const
Whether this constructor is a copy constructor (C++ [class.copy]p2, which can be used to copy the cla...
Represents a C++ conversion function within a class.
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.
static bool classof(const Decl *D)
static bool classofKind(Kind K)
ExplicitSpecifier getExplicitSpecifier()
QualType getConversionType() const
Returns the type that this conversion function is converting to.
void setExplicitSpecifier(ExplicitSpecifier ES)
static CXXConversionDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
const CXXConversionDecl * getCanonicalDecl() const
CXXConversionDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
const ExplicitSpecifier getExplicitSpecifier() const
Represents a C++ base or member initializer.
FieldDecl * getMember() const
If this is a member initializer, returns the declaration of the non-static data member being initiali...
bool isDelegatingInitializer() const
Determine whether this initializer is creating a delegating constructor.
bool isWritten() const
Determine whether this initializer is explicitly written in the source code.
Expr * getInit() const
Get the initializer.
SourceLocation getRParenLoc() const
SourceLocation getEllipsisLoc() const
SourceLocation getLParenLoc() const
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.
SourceLocation getSourceLocation() const
Determine the source location of the initializer.
bool isAnyMemberInitializer() const
bool isPackExpansion() const
Determine whether this initializer is a pack expansion.
TypeSourceInfo * getTypeSourceInfo() const
Returns the declarator information for a base class or delegating initializer.
bool isMemberInitializer() const
Determine whether this initializer is initializing a non-static data member.
bool isBaseInitializer() const
Determine whether this initializer is initializing a base class.
void setSourceOrder(int Pos)
Set the source order of this initializer.
bool isIndirectMemberInitializer() const
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...
const Type * getBaseClass() const
If this is a base class initializer, returns the type of the base class.
SourceLocation getMemberLocation() const
FieldDecl * getAnyMember() const
IndirectFieldDecl * getIndirectMember() const
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.
Represents a C++ deduction guide declaration.
void setDeductionCandidateKind(DeductionCandidate K)
static CXXDeductionGuideDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
bool isExplicit() const
Return true if the declaration is already resolved to be explicit.
CXXConstructorDecl * getCorrespondingConstructor() const
Get the constructor from which this deduction guide was generated, if this is an implicit deduction g...
ExplicitSpecifier getExplicitSpecifier()
static bool classofKind(Kind K)
TemplateDecl * getDeducedTemplate() const
Get the template for which this guide performs deduction.
DeductionCandidate getDeductionCandidateKind() const
const ExplicitSpecifier getExplicitSpecifier() const
static bool classof(const Decl *D)
Represents a C++ destructor within a class.
const FunctionDecl * getOperatorDelete() const
static CXXDestructorDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
const CXXDestructorDecl * getCanonicalDecl() const
CXXDestructorDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
static bool classofKind(Kind K)
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...
Expr * getOperatorDeleteThisArg() const
static bool classof(const Decl *D)
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.
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)
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, Expr *TrailingRequiresClause=nullptr)
const CXXMethodDecl * getMostRecentDecl() const
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
const CXXMethodDecl * getDevirtualizedMethod(const Expr *Base, bool IsAppleKext) const
bool isUsualDeallocationFunction(SmallVectorImpl< const FunctionDecl * > &PreventedBy) const
Determine whether this is a usual deallocation function (C++ [basic.stc.dynamic.deallocation]p2),...
unsigned getNumExplicitParams() const
CXXMethodDecl * getMostRecentDecl()
overridden_method_range overridden_methods() const
unsigned size_overridden_methods() const
const CXXMethodDecl *const * method_iterator
QualType getFunctionObjectParameterReferenceType() const
Return the type of the object pointed by this.
RefQualifierKind getRefQualifier() const
Retrieve the ref-qualifier associated with this method.
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.
QualType getThisType() const
Return the type of the this pointer.
bool isMoveAssignmentOperator() const
Determine whether this is a move assignment operator.
Qualifiers getMethodQualifiers() const
CXXRecordDecl * getParent()
Return the parent of this method declaration, which is the class in which this method is defined.
QualType getFunctionObjectParameterType() const
const CXXMethodDecl * getCorrespondingMethodDeclaredInClass(const CXXRecordDecl *RD, bool MayBeBase=false) const
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.
CXXMethodDecl * getCorrespondingMethodInClass(const CXXRecordDecl *RD, bool MayBeBase=false)
Find the method in RD that corresponds to this one.
llvm::iterator_range< llvm::TinyPtrVector< const CXXMethodDecl * >::const_iterator > overridden_method_range
static bool classof(const Decl *D)
const CXXMethodDecl * getCanonicalDecl() const
bool isCopyAssignmentOperator() const
Determine whether this is a copy-assignment operator, regardless of whether it was declared implicitl...
static CXXMethodDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
method_iterator end_overridden_methods() const
CXXMethodDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
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
An iterator over the friend declarations of a class.
Represents a C++ struct/union/class.
ctor_iterator ctor_end() const
bool hasCopyConstructorWithConstParam() const
Determine whether this class has a copy constructor with a parameter type which is a reference to a c...
bool hasConstexprDefaultConstructor() const
Determine whether this class has a constexpr default constructor.
bool hasMoveConstructor() const
Determine whether this class has a move constructor.
bool hasDefaultConstructor() const
Determine whether this class has any default constructors.
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.
bool isHLSLIntangible() const
Returns true if the class contains HLSL intangible type, either as a field or in base class.
Decl * getLambdaContextDecl() const
Retrieve the declaration that provides additional context for a lambda, when the normal declaration c...
ctor_iterator ctor_begin() const
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....
void setLambdaTypeInfo(TypeSourceInfo *TS)
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....
TemplateParameterList * getGenericLambdaTemplateParameterList() const
Retrieve the generic lambda's template parameter list.
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 ...
bool isAggregate() const
Determine whether this class is an aggregate (C++ [dcl.init.aggr]), which is a class with no user-dec...
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).
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()
llvm::iterator_range< friend_iterator > friend_range
CXXRecordDecl * getMostRecentDecl()
bool hasPrivateFields() const
bool hasTrivialDestructor() const
Determine whether this class has a trivial destructor (C++ [class.dtor]p3)
bool hasUserDeclaredDestructor() const
Determine whether this class has a user-declared destructor.
unsigned getLambdaDependencyKind() const
void setLambdaIsGeneric(bool IsGeneric)
specific_decl_iterator< CXXConstructorDecl > ctor_iterator
Iterator access to constructor members.
bool implicitCopyConstructorHasConstParam() const
Determine whether an implicit copy constructor for this type would have a parameter with a const-qual...
bool defaultedDestructorIsDeleted() const
true if a defaulted destructor for this class would be deleted.
const FunctionDecl * isLocalClass() const
If the class is a local class [class.local], returns the enclosing function declaration.
bool hasInheritedAssignment() const
Determine whether this class has a using-declaration that names a base class assignment operator.
bool hasUninitializedReferenceMember() const
Whether this class or any of its subobjects has any members of reference type which would make value-...
bool allowConstDefaultInit() const
Determine whether declaring a const variable with this type is ok per core issue 253.
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
bool defaultedMoveConstructorIsDeleted() const
true if a defaulted move constructor for this class would be deleted.
void completeDefinition() override
Indicates that the definition of this class is now complete.
base_class_const_iterator bases_end() const
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.
CXXRecordDecl * getTemplateInstantiationPattern()
bool defaultedDestructorIsConstexpr() const
Determine whether a defaulted default constructor for this class would be constexpr.
bool mayBeNonDynamicClass() const
bool isStandardLayout() const
Determine whether this class is standard-layout per C++ [class]p7.
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< capture_const_iterator > capture_const_range
bool hasKnownLambdaInternalLinkage() const
The lambda is known to has internal linkage no matter whether it has name mangling number.
specific_decl_iterator< CXXMethodDecl > method_iterator
Iterator access to method members.
bool hasProtectedFields() const
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().
void setTrivialForCallFlags(CXXMethodDecl *MD)
const CXXRecordDecl * getPreviousDecl() const
bool isLambda() const
Determine whether this class describes a lambda function object.
bool hasTrivialMoveConstructor() const
Determine whether this class has a trivial move constructor (C++11 [class.copy]p12)
bool needsImplicitDefaultConstructor() const
Determine if we need to declare a default constructor for this class.
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...
bool hasUserDeclaredCopyAssignment() const
Determine whether this class has a user-declared copy assignment operator.
capture_const_iterator captures_end() const
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 ...
bool isNeverDependentLambda() const
bool hasFriends() const
Determines whether this record has any friends.
method_range methods() const
static bool classof(const Decl *D)
bool hasNonTrivialDestructor() const
Determine whether this class has a non-trivial destructor (C++ [class.dtor]p3)
CXXRecordDecl * getDefinition() const
bool needsOverloadResolutionForCopyAssignment() const
Determine whether we need to eagerly declare a defaulted copy assignment operator for this class.
static AccessSpecifier MergeAccess(AccessSpecifier PathAccess, AccessSpecifier DeclAccess)
Calculates the access of a decl that is reached along a path.
bool isParsingBaseSpecifiers() const
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...
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.
bool hasTrivialCopyConstructor() const
Determine whether this class has a trivial copy constructor (C++ [class.copy]p6, C++11 [class....
void setImplicitMoveAssignmentIsDeleted()
Set that we attempted to declare an implicit move assignment operator, but overload resolution failed...
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...
unsigned getNumBases() const
Retrieves the number of base classes of this class.
bool hasNonLiteralTypeFieldsOrBases() const
Determine whether this class has a non-literal or/ volatile type non-static data member or base class...
base_class_const_range bases() const
bool defaultedCopyConstructorIsDeleted() const
true if a defaulted copy constructor for this class would be deleted.
CXXRecordDecl * getMostRecentNonInjectedDecl()
bool isStructural() const
Determine whether this is a structural type.
bool hasMoveAssignment() const
Determine whether this class has a move assignment operator.
bool isTriviallyCopyConstructible() const
Determine whether this class is considered trivially copyable per.
bool hasTrivialCopyConstructorForCall() const
bool isCapturelessLambda() const
llvm::iterator_range< specific_decl_iterator< CXXMethodDecl > > method_range
const CXXRecordDecl * getTemplateInstantiationPattern() const
Retrieve the record declaration from which this record could be instantiated.
bool hasInitMethod() const
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.
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()
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,...
void addedEligibleSpecialMemberFunction(const CXXMethodDecl *MD, unsigned SMKind)
Notify the class that an eligible SMF has been added.
conversion_iterator conversion_end() const
base_class_range vbases()
bool hasUserProvidedDefaultConstructor() const
Whether this class has a user-provided default constructor per C++11.
base_class_iterator vbases_begin()
capture_const_range captures() const
void setImplicitMoveConstructorIsDeleted()
Set that we attempted to declare an implicit move constructor, but overload resolution failed so we d...
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.
base_class_const_iterator bases_begin() const
TypeSourceInfo * getLambdaTypeInfo() const
bool hasVariantMembers() const
Determine whether this class has any variant members.
void setImplicitCopyConstructorIsDeleted()
Set that we attempted to declare an implicit copy constructor, but overload resolution failed so we d...
CXXRecordDecl(Kind K, TagKind TK, const ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, CXXRecordDecl *PrevDecl)
bool isDynamicClass() const
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...
bool mayBeDynamicClass() const
bool needsImplicitCopyConstructor() const
Determine whether this class needs an implicit copy constructor to be lazily declared.
base_class_const_iterator vbases_end() const
bool hasIrrelevantDestructor() const
Determine whether this class has a destructor which has no semantic effect.
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,...
bool hasSimpleMoveAssignment() const
true if we know for sure that this class has a single, accessible, unambiguous move assignment operat...
bool hasNonTrivialMoveConstructor() const
Determine whether this class has a non-trivial move constructor (C++11 [class.copy]p12)
bool hasNonTrivialCopyConstructorForCall() const
bool hasDirectFields() const
Determine whether this class has direct non-static data members.
const CXXRecordDecl * getCanonicalDecl() const
MSInheritanceModel getMSInheritanceModel() const
Returns the inheritance model used for this record.
bool hasUserDeclaredCopyConstructor() const
Determine whether this class has a user-declared copy constructor.
bool isCXX11StandardLayout() const
Determine whether this class was standard-layout per C++11 [class]p7, specifically using the C++11 ru...
bool nullFieldOffsetIsZero() const
In the Microsoft C++ ABI, use zero for the field offset of a null data member pointer if we can guara...
bool hasUserDeclaredConstructor() const
Determine whether this class has any user-declared constructors.
base_class_const_iterator vbases_begin() const
llvm::iterator_range< base_class_iterator > base_class_range
unsigned getODRHash() const
LambdaNumbering getLambdaNumbering() const
llvm::iterator_range< specific_decl_iterator< CXXConstructorDecl > > ctor_range
bool hasDefinition() const
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...
bool needsImplicitDestructor() const
Determine whether this class needs an implicit destructor to be lazily declared.
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)
void getFinalOverriders(CXXFinalOverriderMap &FinaOverriders) const
Retrieve the final overriders for each virtual member function in the class hierarchy where this clas...
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...
void removeConversion(const NamedDecl *Old)
Removes a conversion function from this class.
const CXXRecordDecl * getMostRecentNonInjectedDecl() const
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 ...
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.
base_class_iterator vbases_end()
void setInitMethod(bool Val)
bool isEmpty() const
Determine whether this is an empty class in the sense of (C++11 [meta.unary.prop]).
LambdaCaptureDefault getLambdaCaptureDefault() const
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.
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...
bool hasNonTrivialMoveAssignment() const
Determine whether this class has a non-trivial move assignment operator (C++11 [class....
bool hasNonTrivialDestructorForCall() const
void setHasTrivialSpecialMemberForCall()
method_iterator method_end() const
Method past-the-end iterator.
static bool classofKind(Kind K)
capture_const_iterator captures_begin() const
bool needsOverloadResolutionForDestructor() const
Determine whether we need to eagerly declare a destructor for this class.
llvm::iterator_range< base_class_const_iterator > base_class_const_range
bool hasUserDeclaredMoveOperation() const
Whether this class has a user-declared move constructor or assignment operator.
llvm::function_ref< bool(const CXXRecordDecl *BaseDefinition)> ForallBasesCallback
Function type used by forallBases() as a callback.
bool hasInheritedConstructor() const
Determine whether this class has a using-declaration that names a user-declared base class constructo...
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).
bool needsOverloadResolutionForCopyConstructor() const
Determine whether we need to eagerly declare a defaulted copy constructor for this class.
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...
bool hasUserDeclaredMoveConstructor() const
Determine whether this class has had a move constructor declared by the user.
bool needsImplicitMoveAssignment() const
Determine whether this class should get an implicit move assignment operator or if any existing speci...
bool hasSimpleDestructor() const
true if we know for sure that this class has an accessible destructor that is not deleted.
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
void setIsParsingBaseSpecifiers()
bool hasNonTrivialMoveConstructorForCall() const
bool needsImplicitCopyAssignment() const
Determine whether this class needs an implicit copy assignment operator to be lazily declared.
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.
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
void setLambdaDependencyKind(unsigned Kind)
bool hasTrivialMoveConstructorForCall() const
MemberSpecializationInfo * getMemberSpecializationInfo() const
If this class is an instantiation of a member class of a class template specialization,...
std::vector< const NamedDecl * > lookupDependentName(DeclarationName Name, llvm::function_ref< bool(const NamedDecl *ND)> Filter)
Performs an imprecise lookup of a dependent name in this class.
FunctionDecl * isLocalClass()
bool hasNonTrivialCopyConstructor() const
Determine whether this class has a non-trivial copy constructor (C++ [class.copy]p6,...
CXXMethodDecl * getLambdaCallOperator() const
Retrieve the lambda call operator of the closure type if this is a closure type.
const LambdaCapture * getCapture(unsigned I) const
const CXXRecordDecl * getMostRecentDecl() const
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...
CXXRecordDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
void setTemplateSpecializationKind(TemplateSpecializationKind TSK)
Set the kind of specialization or template instantiation this is.
bool isTrivial() const
Determine whether this class is considered trivial.
unsigned getNumVBases() const
Retrieves the number of virtual base classes of this class.
conversion_iterator conversion_begin() const
CXXRecordDecl * getPreviousDecl()
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...
Declaration of a class template.
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
const CXXRecordDecl * getParent() const
Returns the parent of this using shadow declaration, which is the class in which this is declared.
static ConstructorUsingShadowDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
CXXRecordDecl * getParent()
static bool classof(const Decl *D)
CXXRecordDecl * getConstructedBaseClass() const
Get the base class whose constructor or constructor shadow declaration is passed the constructor argu...
static bool classofKind(Kind K)
UsingDecl * getIntroducer() const
Override the UsingShadowDecl's getIntroducer, returning the UsingDecl that introduced this.
bool constructsVirtualBase() const
Returns true if the constructed base class is a virtual base class subobject of this declaration's cl...
ConstructorUsingShadowDecl * getConstructedBaseClassShadowDecl() const
Get the inheriting constructor declaration for the base class for which we don't have an explicit ini...
ConstructorUsingShadowDecl * getNominatedBaseClassShadowDecl() const
Get the inheriting constructor declaration for the direct base class from which this using shadow dec...
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
Kind
Lists the kind of concrete classes of Decl.
unsigned getIdentifierNamespace() const
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()
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.
Represents a ValueDecl that came out of a declarator.
A decomposition declaration.
void printName(raw_ostream &OS, const PrintingPolicy &Policy) const override
Pretty-print the unqualified name of this declaration.
ArrayRef< BindingDecl * > bindings() const
static bool classof(const Decl *D)
static bool classofKind(Kind K)
static DecompositionDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned NumBindings)
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of enums.
Store information needed for an explicit specifier.
bool isExplicit() const
Determine whether this specifier is known to correspond to an explicit declaration.
ExplicitSpecKind getKind() const
bool isInvalid() const
Determine if the explicit specifier is invalid.
static ExplicitSpecifier Invalid()
static const ExplicitSpecifier getFromDecl(const FunctionDecl *Function)
const Expr * getExpr() const
ExplicitSpecifier()=default
void setKind(ExplicitSpecKind Kind)
static ExplicitSpecifier getFromDecl(FunctionDecl *Function)
bool isSpecified() const
Determine if the declaration had an explicit specifier of any kind.
bool isEquivalent(const ExplicitSpecifier Other) const
Check for equivalence of explicit specifiers.
ExplicitSpecifier(Expr *Expression, ExplicitSpecKind Kind)
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.
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.
InheritedConstructor()=default
CXXConstructorDecl * getConstructor() const
InheritedConstructor(ConstructorUsingShadowDecl *Shadow, CXXConstructorDecl *BaseCtor)
ConstructorUsingShadowDecl * getShadowDecl() const
Describes the capture of a variable or of this, or of a C++1y init-capture.
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-...
const ValueDecl * getExtendingDecl() const
unsigned getManglingNumber() const
APValue * getValue() const
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)
Stmt::child_range childrenExpr()
StorageDuration getStorageDuration() const
Retrieve the storage duration for the materialized temporary.
Stmt::const_child_range childrenExpr() const
static LifetimeExtendedTemporaryDecl * Create(Expr *Temp, ValueDecl *EDec, unsigned Mangling)
Expr * getTemporaryExpr()
Retrieve the expression to which the temporary materialization conversion was applied.
static LifetimeExtendedTemporaryDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
const Expr * getTemporaryExpr() const
ValueDecl * getExtendingDecl()
static bool classofKind(Kind K)
Represents a linkage specification.
void setExternLoc(SourceLocation L)
void setLanguage(LinkageSpecLanguageIDs L)
Set the language specified by this linkage specification.
static bool classofKind(Kind K)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
void setRBraceLoc(SourceLocation L)
static LinkageSpecDecl * castFromDeclContext(const DeclContext *DC)
static DeclContext * castToDeclContext(const LinkageSpecDecl *D)
LinkageSpecLanguageIDs getLanguage() const
Return the language specified by this linkage specification.
SourceLocation getExternLoc() const
SourceLocation getRBraceLoc() const
SourceLocation getEndLoc() const LLVM_READONLY
static bool classof(const Decl *D)
static LinkageSpecDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
bool hasBraces() const
Determines whether this linkage specification had braces in its syntactic form.
static bool classof(const Decl *D)
Parts getParts() const
Get the decomposed parts of this declaration.
static bool classofKind(Kind K)
static void Profile(llvm::FoldingSetNodeID &ID, Parts P)
void Profile(llvm::FoldingSetNodeID &ID)
APValue & getAsAPValue() const
Get the value of this MSGuidDecl as an APValue.
void printName(llvm::raw_ostream &OS, const PrintingPolicy &Policy) const override
Print this UUID in a human-readable format.
An instance of this class represents the declaration of a property member.
static bool classof(const Decl *D)
IdentifierInfo * getGetterId() const
IdentifierInfo * getSetterId() const
static MSPropertyDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
Provides information a specialization of a member of a class template, which may be a member function...
Provides common interface for the Decls that cannot be redeclared, but can be merged if the same decl...
UsingDecl * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
This represents a decl that may have a name.
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
NamedDecl * getMostRecentDecl()
Represents a C++ namespace alias.
static NamespaceAliasDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
const NamespaceAliasDecl * getCanonicalDecl() const
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name of the namespace.
redeclarable_base::redecl_range redecl_range
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name of the namespace, with source-location inf...
SourceLocation getAliasLoc() const
Returns the location of the alias name, i.e.
NamedDecl * getAliasedNamespace() const
Retrieve the namespace that this alias refers to, which may either be a NamespaceDecl or a NamespaceA...
static bool classof(const Decl *D)
SourceLocation getNamespaceLoc() const
Returns the location of the namespace keyword.
SourceLocation getTargetNameLoc() const
Returns the location of the identifier in the named namespace.
NamespaceAliasDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
NamespaceDecl * getNamespace()
Retrieve the namespace declaration aliased by this directive.
redeclarable_base::redecl_iterator redecl_iterator
static bool classofKind(Kind K)
const NamespaceDecl * getNamespace() const
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...
QualType getUnqualifiedType() const
Retrieve the unqualified variant of the given type, removing as little sugar as possible.
The collection of all-type qualifiers we support.
Represents a struct/union/class.
bool isInjectedClassName() const
Determines whether this declaration represents the injected class name.
Provides common interface for the Decls that can be redeclared.
NamespaceAliasDecl * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
UsingShadowDecl * getNextRedeclaration() const
NamespaceAliasDecl * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
redecl_iterator redecls_end() const
llvm::iterator_range< redecl_iterator > redecl_range
NamespaceAliasDecl * getMostRecentDecl()
Returns the most recent (re)declaration of this declaration.
bool isFirstDecl() const
True if this is the first declaration in its redeclaration chain.
redecl_iterator redecls_begin() const
redecl_range redecls() const
Returns an iterator range for all the redeclarations of the same decl.
Represents the body of a requires-expression.
static DeclContext * castToDeclContext(const RequiresExprBodyDecl *D)
static RequiresExprBodyDecl * castFromDeclContext(const DeclContext *DC)
static bool classofKind(Kind K)
static RequiresExprBodyDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classof(const Decl *D)
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.
Represents a C++11 static_assert declaration.
const Expr * getMessage() const
static bool classofKind(Kind K)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
const Expr * getAssertExpr() const
SourceLocation getRParenLoc() const
static StaticAssertDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classof(const Decl *D)
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.
Represents a declaration of a type.
SourceLocation getBeginLoc() const LLVM_READONLY
Base wrapper for a particular "section" of type source info.
SourceLocation getBeginLoc() const
Get the begin source location.
A container of type source information.
TypeLoc getTypeLoc() const
Return the TypeLoc wrapper for the type source info.
QualType getType() const
Return the type wrapped by this type source info.
The base class of the type hierarchy.
const T * castAs() const
Member-template castAs.
const T * getAs() const
Member-template getAs'.
TagDecl * getAsTagDecl() const
Retrieves the TagDecl that this type refers to, either because the type is a TagType or because it is...
An artificial decl, representing a global anonymous constant value which is uniquified by value withi...
const APValue & getValue() const
static bool classofKind(Kind K)
static bool classof(const Decl *D)
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)
void Profile(llvm::FoldingSetNodeID &ID)
The iterator over UnresolvedSets.
This node is generated when a using-declaration that was annotated with attribute((using_if_exists)) ...
static UnresolvedUsingIfExistsDecl * CreateDeserialized(ASTContext &Ctx, GlobalDeclID ID)
static bool classof(const Decl *D)
static bool classofKind(Kind K)
Represents a dependent using declaration which was marked with typename.
bool isPackExpansion() const
Determine whether this is a pack expansion.
SourceLocation getTypenameLoc() const
Returns the source location of the 'typename' keyword.
static bool classofKind(Kind K)
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
SourceLocation getUsingLoc() const
Returns the source location of the 'using' keyword.
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
static bool classof(const Decl *D)
UnresolvedUsingTypenameDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this declaration.
SourceLocation getEllipsisLoc() const
Get the location of the ellipsis if this is a pack expansion.
const UnresolvedUsingTypenameDecl * getCanonicalDecl() const
DeclarationNameInfo getNameInfo() const
static UnresolvedUsingTypenameDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
Represents a dependent using declaration which was not marked with typename.
const UnresolvedUsingValueDecl * getCanonicalDecl() const
bool isPackExpansion() const
Determine whether this is a pack expansion.
SourceLocation getUsingLoc() const
Returns the source location of the 'using' keyword.
static bool classofKind(Kind K)
bool isAccessDeclaration() const
Return true if it is a C++03 access declaration (no 'using').
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
static bool classof(const Decl *D)
DeclarationNameInfo getNameInfo() const
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
void setUsingLoc(SourceLocation L)
Set the source location of the 'using' keyword.
SourceLocation getEllipsisLoc() const
Get the location of the ellipsis if this is a pack expansion.
UnresolvedUsingValueDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this declaration.
static UnresolvedUsingValueDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
Represents a C++ using-declaration.
void setTypename(bool TN)
Sets whether the using declaration has 'typename'.
UsingDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this declaration.
bool hasTypename() const
Return true if the using declaration has 'typename'.
bool isAccessDeclaration() const
Return true if it is a C++03 access declaration (no 'using').
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
void setUsingLoc(SourceLocation L)
Set the source location of the 'using' keyword.
static UsingDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
const UsingDecl * getCanonicalDecl() const
DeclarationNameInfo getNameInfo() const
static bool classof(const Decl *D)
static bool classofKind(Kind K)
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
SourceLocation getUsingLoc() const
Return the source location of the 'using' keyword.
Represents C++ using-directive.
static UsingDirectiveDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
const NamedDecl * getNominatedNamespaceAsWritten() const
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
const DeclContext * getCommonAncestor() const
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name of the namespace.
static bool classofKind(Kind K)
SourceLocation getUsingLoc() const
Return the location of the using keyword.
NamespaceDecl * getNominatedNamespace()
Returns the namespace nominated by this using-directive.
const NamespaceDecl * getNominatedNamespace() const
static bool classof(const Decl *D)
NamedDecl * getNominatedNamespaceAsWritten()
DeclContext * getCommonAncestor()
Returns the common ancestor context of this using-directive and its nominated namespace.
SourceLocation getNamespaceKeyLocation() const
Returns the location of the namespace keyword.
SourceLocation getIdentLocation() const
Returns the location of this using declaration's identifier.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name of the namespace, with source-location inf...
Represents a C++ using-enum-declaration.
void setEnumType(TypeSourceInfo *TSI)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
void setEnumLoc(SourceLocation L)
NestedNameSpecifierLoc getQualifierLoc() const
SourceLocation getEnumLoc() const
The source location of the 'enum' keyword.
void setUsingLoc(SourceLocation L)
UsingEnumDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this declaration.
NestedNameSpecifier * getQualifier() const
EnumDecl * getEnumDecl() const
const UsingEnumDecl * getCanonicalDecl() const
TypeSourceInfo * getEnumType() const
static bool classofKind(Kind K)
static UsingEnumDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classof(const Decl *D)
TypeLoc getEnumTypeLoc() const
SourceLocation getUsingLoc() const
The source location of the 'using' keyword.
Represents a pack of using declarations that a single using-declarator pack-expanded into.
static UsingPackDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned NumExpansions)
const UsingPackDecl * getCanonicalDecl() const
UsingPackDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
NamedDecl * getInstantiatedFromUsingDecl() const
Get the using declaration from which this was instantiated.
static bool classof(const Decl *D)
static bool classofKind(Kind K)
ArrayRef< NamedDecl * > expansions() const
Get the set of using declarations that this pack expanded into.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
UsingShadowDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
redeclarable_base::redecl_range redecl_range
static UsingShadowDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation Loc, DeclarationName Name, BaseUsingDecl *Introducer, NamedDecl *Target)
UsingShadowDecl * getNextUsingShadowDecl() const
The next using shadow declaration contained in the shadow decl chain of the using declaration which i...
void setTargetDecl(NamedDecl *ND)
Sets the underlying declaration which has been brought into the local scope.
static bool classofKind(Kind K)
NamedDecl * getTargetDecl() const
Gets the underlying declaration which has been brought into the local scope.
redeclarable_base::redecl_iterator redecl_iterator
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)
friend class BaseUsingDecl
BaseUsingDecl * getIntroducer() const
Gets the (written or instantiated) using declaration that introduced this declaration.
const UsingShadowDecl * getCanonicalDecl() const
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
void setType(QualType newType)
Represents a variable declaration or definition.
The JSON file list parser is used to communicate input to InstallAPI.
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
ConstexprSpecKind
Define the kind of constexpr specifier.
LinkageSpecLanguageIDs
Represents the language in a linkage specification.
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',...
StorageClass
Storage classes.
const StreamingDiagnostic & operator<<(const StreamingDiagnostic &DB, const ASTContext::SectionInfo &Section)
Insertion operator for diagnostics.
StorageDuration
The storage duration for an object (per C++ [basic.stc]).
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.
LazyOffsetPtr< Decl, GlobalDeclID, &ExternalASTSource::GetExternalDecl > LazyDeclPtr
A lazy pointer to a declaration.
const FunctionProtoType * T
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.
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
CallingConv
CallingConv - Specifies the calling convention that a function uses.
LazyOffsetPtr< CXXBaseSpecifier, uint64_t, &ExternalASTSource::GetExternalCXXBaseSpecifiers > LazyCXXBaseSpecifiersPtr
A lazy pointer to a set of CXXBaseSpecifiers.
@ Other
Other implicit parameter.
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
Information about how a lambda is numbered within its context.
unsigned DeviceManglingNumber
bool HasKnownInternalLinkage
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.
uint16_t Part2
...-89ab-...
uint32_t Part1
{01234567-...
uint16_t Part3
...-cdef-...
uint8_t Part4And5[8]
...-0123-456789abcdef}
uint64_t getPart4And5AsUint64() const
Describes how types, statements, expressions, and declarations should be printed.