clang: include/clang/AST/ExprCXX.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_CLANG_AST_EXPRCXX_H
15#define LLVM_CLANG_AST_EXPRCXX_H
16
43#include "llvm/ADT/ArrayRef.h"
44#include "llvm/ADT/PointerUnion.h"
45#include "llvm/ADT/STLExtras.h"
46#include "llvm/ADT/StringRef.h"
47#include "llvm/ADT/iterator_range.h"
48#include "llvm/Support/Casting.h"
49#include "llvm/Support/Compiler.h"
50#include "llvm/Support/TrailingObjects.h"
51#include
52#include
53#include
54#include
55#include
56#include
57
59
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84class CXXOperatorCallExpr final : public CallExpr {
87
89
90
91
92
93 SourceRange getSourceRangeImpl() const LLVM_READONLY;
94
99
100 CXXOperatorCallExpr(unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty);
101
102public:
103 static CXXOperatorCallExpr *
108
110 unsigned NumArgs, bool HasFPFeatures,
112
113
118
120 return Opc == OO_Equal || Opc == OO_StarEqual || Opc == OO_SlashEqual ||
121 Opc == OO_PercentEqual || Opc == OO_PlusEqual ||
122 Opc == OO_MinusEqual || Opc == OO_LessLessEqual ||
123 Opc == OO_GreaterGreaterEqual || Opc == OO_AmpEqual ||
124 Opc == OO_CaretEqual || Opc == OO_PipeEqual;
125 }
127
129 switch (Opc) {
130 case OO_EqualEqual:
131 case OO_ExclaimEqual:
132 case OO_Greater:
133 case OO_GreaterEqual:
134 case OO_Less:
135 case OO_LessEqual:
136 case OO_Spaceship:
137 return true;
138 default:
139 return false;
140 }
141 }
143
144
146
147
148
149
150
151
153
156 return (Operator < OO_Plus || Operator >= OO_Arrow ||
157 Operator == OO_PlusPlus || Operator == OO_MinusMinus)
160 }
161
165
167 return T->getStmtClass() == CXXOperatorCallExprClass;
168 }
169};
170
171
172
173
174
175
176
177
178
179class CXXMemberCallExpr final : public CallExpr {
180
181
182
186
187 CXXMemberCallExpr(unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty);
188
189public:
194 unsigned MinNumArgs = 0);
195
198
199
200
201
203
204
205
206
208
209
211
212
213
214
215
216
217
219
223 return CLoc;
224
226 }
227
229 return T->getStmtClass() == CXXMemberCallExprClass;
230 }
231};
232
233
234class CUDAKernelCallExpr final : public CallExpr {
236
237 enum { CONFIG, END_PREARG };
238
239
240
241
245
247
248public:
254 unsigned MinNumArgs = 0);
255
257 unsigned NumArgs, bool HasFPFeatures,
258 EmptyShell Empty);
259
261 return cast_or_null(getPreArg(CONFIG));
262 }
264
266 return T->getStmtClass() == CUDAKernelCallExprClass;
267 }
268};
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
288
289
290 Stmt *SemanticForm;
291
292public:
294 : Expr(CXXRewrittenBinaryOperatorClass, SemanticForm->getType(),
296 SemanticForm(SemanticForm) {
299 }
301 : Expr(CXXRewrittenBinaryOperatorClass, Empty), SemanticForm() {}
302
303
306
317
318
320
321
323
334
337
342
343
344
345
346
357
358
360 return child_range(&SemanticForm, &SemanticForm + 1);
361 }
362
364 return T->getStmtClass() == CXXRewrittenBinaryOperatorClass;
365 }
366};
367
368
369
370
371
372
373
374
376private:
377
379
380
382
383
385
386protected:
388
390 Expr *op, unsigned PathSize, bool HasFPFeatures,
394 writtenTy),
395 Loc(l), RParenLoc(RParenLoc), AngleBrackets(AngleBrackets) {}
396
400
401public:
403
404
405
407
408
410
414
416 switch (T->getStmtClass()) {
417 case CXXStaticCastExprClass:
418 case CXXDynamicCastExprClass:
419 case CXXReinterpretCastExprClass:
420 case CXXConstCastExprClass:
421 case CXXAddrspaceCastExprClass:
422 return true;
423 default:
424 return false;
425 }
426 }
427};
428
429
430
431
432
433class CXXStaticCastExpr final
435 private llvm::TrailingObjects<CXXStaticCastExpr, CXXBaseSpecifier *,
436 FPOptionsOverride> {
441 : CXXNamedCastExpr(CXXStaticCastExprClass, ty, vk, kind, op, pathSize,
443 AngleBrackets) {
446 }
447
448 explicit CXXStaticCastExpr(EmptyShell Empty, unsigned PathSize,
449 bool HasFPFeatures)
451 HasFPFeatures) {}
452
453 unsigned numTrailingObjects(OverloadToken<CXXBaseSpecifier *>) const {
455 }
456
457public:
460
461 static CXXStaticCastExpr *
467 unsigned PathSize, bool hasFPFeatures);
468
470 return T->getStmtClass() == CXXStaticCastExprClass;
471 }
472};
473
474
475
476
477
478
479class CXXDynamicCastExpr final
481 private llvm::TrailingObjects<CXXDynamicCastExpr, CXXBaseSpecifier *> {
486 : CXXNamedCastExpr(CXXDynamicCastExprClass, ty, VK, kind, op, pathSize,
487 false, writtenTy, l, RParenLoc,
488 AngleBrackets) {}
489
490 explicit CXXDynamicCastExpr(EmptyShell Empty, unsigned pathSize)
492 false) {}
493
494public:
497
504
506 unsigned pathSize);
507
509
511 return T->getStmtClass() == CXXDynamicCastExprClass;
512 }
513};
514
515
516
517
518
519
520
521
522
523class CXXReinterpretCastExpr final
525 private llvm::TrailingObjects<CXXReinterpretCastExpr,
526 CXXBaseSpecifier *> {
531 : CXXNamedCastExpr(CXXReinterpretCastExprClass, ty, vk, kind, op,
532 pathSize, false, writtenTy, l,
533 RParenLoc, AngleBrackets) {}
534
535 CXXReinterpretCastExpr(EmptyShell Empty, unsigned pathSize)
537 false) {}
538
539public:
542
550 unsigned pathSize);
551
553 return T->getStmtClass() == CXXReinterpretCastExprClass;
554 }
555};
556
557
558
559
560
561
562
563
564class CXXConstCastExpr final
566 private llvm::TrailingObjects<CXXConstCastExpr, CXXBaseSpecifier *> {
571 false, writtenTy, l, RParenLoc,
572 AngleBrackets) {}
573
576 false) {}
577
578public:
581
588
590 return T->getStmtClass() == CXXConstCastExprClass;
591 }
592};
593
594
595
596
597
598
599
600
601
602class CXXAddrspaceCastExpr final
604 private llvm::TrailingObjects<CXXAddrspaceCastExpr, CXXBaseSpecifier *> {
609 false, writtenTy, l, RParenLoc,
610 AngleBrackets) {}
611
614 false) {}
615
616public:
619
620 static CXXAddrspaceCastExpr *
625
627 return T->getStmtClass() == CXXAddrspaceCastExprClass;
628 }
629};
630
631
632
633
634
635
636
637
638
639
640class UserDefinedLiteral final : public CallExpr {
643
644
646
647
648
649
653
654 UserDefinedLiteral(unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty);
655
656public:
662
664 unsigned NumArgs, bool HasFPOptions,
666
667
669
671
672
674
675
677
678
680
681
683
684
686 };
687
688
689
691
692
693
694
699
705
707
708
709
710
711
713
714
716
718 return S->getStmtClass() == UserDefinedLiteralClass;
719 }
720};
721
722
724public:
731
733 : Expr(CXXBoolLiteralExprClass, Empty) {}
734
739
742
745
748
750 return T->getStmtClass() == CXXBoolLiteralExprClass;
751 }
752
753
757
761};
762
763
764
765
766
767
769public:
775
777 : Expr(CXXNullPtrLiteralExprClass, Empty) {}
778
781
784
786 return T->getStmtClass() == CXXNullPtrLiteralExprClass;
787 }
788
792
796};
797
798
799
800class CXXStdInitializerListExpr : public Expr {
801 Stmt *SubExpr = nullptr;
802
804 : Expr(CXXStdInitializerListExprClass, Empty) {}
805
806public:
809
812 SubExpr(SubExpr) {
814 }
815
818
820 return SubExpr->getBeginLoc();
821 }
822
824 return SubExpr->getEndLoc();
825 }
826
827
829 return SubExpr->getSourceRange();
830 }
831
833 return S->getStmtClass() == CXXStdInitializerListExprClass;
834 }
835
837
841};
842
843
844
845
846
847
850
851private:
852 llvm::PointerUnion<Stmt *, TypeSourceInfo *> Operand;
854
855public:
861
867
869 : Expr(CXXTypeidExprClass, Empty) {
870 if (isExpr)
871 Operand = (Expr*)nullptr;
872 else
874 }
875
876
877
879
880
881
883
885
886
887
889
890
892 assert(isTypeOperand() && "Cannot call getTypeOperand for typeid(expr)");
894 }
896 assert(() && "Cannot call getExprOperand for typeid(type)");
898 }
899
904
906 return T->getStmtClass() == CXXTypeidExprClass;
907 }
908
909
913 auto **begin = reinterpret_cast<Stmt **>(&Operand);
915 }
916
920
921 auto **begin =
922 reinterpret_cast<Stmt **>(&const_cast<CXXTypeidExpr *>(this)->Operand);
924 }
925
926
927
929};
930
931
932
933
934
935
937 Expr *BaseExpr;
940 bool IsArrow;
942
943public:
945
949 : Expr(MSPropertyRefExprClass, ty, VK, OK_Ordinary), BaseExpr(baseExpr),
950 TheDecl(decl), MemberLoc(nameLoc), IsArrow(isArrow),
951 QualifierLoc(qualifierLoc) {
953 }
954
956
960
964
967 return BaseExpr->getBeginLoc();
968 else if (QualifierLoc)
969 return QualifierLoc.getBeginLoc();
970 else
971 return MemberLoc;
972 }
973
975
979
983
985 return T->getStmtClass() == MSPropertyRefExprClass;
986 }
987
990 bool isArrow() const { return IsArrow; }
993};
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1008
1009 enum { BASE_EXPR, IDX_EXPR, NUM_SUBEXPRS = 2 };
1010
1011 Stmt *SubExprs[NUM_SUBEXPRS];
1013
1014 void setBase(Expr *Base) { SubExprs[BASE_EXPR] = Base; }
1015 void setIdx(Expr *Idx) { SubExprs[IDX_EXPR] = Idx; }
1016
1017public:
1020 : Expr(MSPropertySubscriptExprClass, Ty, VK, OK),
1021 RBracketLoc(RBracketLoc) {
1022 SubExprs[BASE_EXPR] = Base;
1023 SubExprs[IDX_EXPR] = Idx;
1025 }
1026
1027
1029 : Expr(MSPropertySubscriptExprClass, Shell) {}
1030
1033
1036
1040
1042
1045
1049
1051 return T->getStmtClass() == MSPropertySubscriptExprClass;
1052 }
1053
1054
1056 return child_range(&SubExprs[0], &SubExprs[0] + NUM_SUBEXPRS);
1057 }
1058
1062};
1063
1064
1065
1066
1067
1070
1071private:
1072 llvm::PointerUnion<Stmt *, TypeSourceInfo *> Operand;
1075
1076public:
1080 Guid(Guid), Range(R) {
1082 }
1083
1086 Guid(Guid), Range(R) {
1088 }
1089
1091 : Expr(CXXUuidofExprClass, Empty) {
1092 if (isExpr)
1093 Operand = (Expr*)nullptr;
1094 else
1096 }
1097
1099
1100
1101
1103
1104
1106 assert(isTypeOperand() && "Cannot call getTypeOperand for __uuidof(expr)");
1108 }
1110 assert(() && "Cannot call getExprOperand for __uuidof(type)");
1112 }
1113
1115
1120
1122 return T->getStmtClass() == CXXUuidofExprClass;
1123 }
1124
1125
1129 auto **begin = reinterpret_cast<Stmt **>(&Operand);
1131 }
1132
1136 auto **begin =
1137 reinterpret_cast<Stmt **>(&const_cast<CXXUuidofExpr *>(this)->Operand);
1139 }
1140};
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154class CXXThisExpr : public Expr {
1158 CXXThisExprBits.CapturedByCopyInLambdaWithExplicitObjectParameter = false;
1161 }
1162
1164
1165public:
1167 QualType Ty, bool IsImplicit);
1168
1170
1173
1176
1179
1181 return CXXThisExprBits.CapturedByCopyInLambdaWithExplicitObjectParameter;
1182 }
1183
1188
1190 return T->getStmtClass() == CXXThisExprClass;
1191 }
1192
1193
1197
1201};
1202
1203
1204
1205
1206
1207
1210
1211
1212 Stmt *Operand;
1213
1214public:
1215
1216
1217
1218
1220 bool IsThrownVariableInScope)
1223 CXXThrowExprBits.IsThrownVariableInScope = IsThrownVariableInScope;
1225 }
1227
1228 const Expr *getSubExpr() const { return cast_or_null(Operand); }
1230
1232
1233
1234
1235
1236
1237
1241
1248
1250 return T->getStmtClass() == CXXThrowExprClass;
1251 }
1252
1253
1255 return child_range(&Operand, Operand ? &Operand + 1 : &Operand);
1256 }
1257
1261};
1262
1263
1264
1265
1266
1267
1268class CXXDefaultArgExpr final
1269 : public Expr,
1270 private llvm::TrailingObjects<CXXDefaultArgExpr, Expr *> {
1273 friend TrailingObjects;
1274
1275
1277
1278
1280
1284 Param->hasUnparsedDefaultArg()
1285 ? Param->getType().getNonReferenceType()
1286 : Param->getDefaultArg()->getType(),
1289 Param(Param), UsedContext(UsedContext) {
1292 if (RewrittenExpr)
1293 *getTrailingObjects() = RewrittenExpr;
1295 }
1296
1298 : Expr(CXXDefaultArgExprClass, Empty) {
1300 }
1301
1302public:
1304 bool HasRewrittenInit);
1305
1306
1307
1308 static CXXDefaultArgExpr *Create(const ASTContext &C, SourceLocation Loc,
1309 ParmVarDecl *Param, Expr *RewrittenExpr,
1310 DeclContext *UsedContext);
1311
1314
1318
1319
1322 return const_cast<CXXDefaultArgExpr *>(this)->getExpr();
1323 }
1324
1328
1332
1333
1334
1339
1342
1343
1345
1346
1347
1350
1352
1354 return T->getStmtClass() == CXXDefaultArgExprClass;
1355 }
1356
1357
1361
1365};
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375class CXXDefaultInitExpr final
1376 : public Expr,
1377 private llvm::TrailingObjects<CXXDefaultInitExpr, Expr *> {
1378
1381 friend TrailingObjects;
1382
1384
1385
1387
1390 Expr *RewrittenInitExpr);
1391
1392 CXXDefaultInitExpr(EmptyShell Empty, bool HasRewrittenInit)
1393 : Expr(CXXDefaultInitExprClass, Empty) {
1395 }
1396
1397public:
1399 bool HasRewrittenInit);
1400
1401
1404 Expr *RewrittenInitExpr);
1405
1409
1410
1413
1414
1417 return const_cast<CXXDefaultInitExpr *>(this)->getExpr();
1418 }
1419
1420
1421
1423 assert(hasRewrittenInit() && "expected a rewritten init expression");
1424 return *getTrailingObjects();
1425 }
1426
1427
1428
1430 assert(hasRewrittenInit() && "expected a rewritten init expression");
1431 return *getTrailingObjects();
1432 }
1433
1436
1437
1438
1440
1443
1445 return T->getStmtClass() == CXXDefaultInitExprClass;
1446 }
1447
1448
1452
1456};
1457
1458
1459class CXXTemporary {
1460
1462
1465
1466public:
1469
1471
1473 Destructor = Dtor;
1474 }
1475};
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493class CXXBindTemporaryExpr : public Expr {
1495 Stmt *SubExpr = nullptr;
1496
1498 : Expr(CXXBindTemporaryExprClass, SubExpr->getType(), VK_PRValue,
1500 Temp(temp), SubExpr(SubExpr) {
1502 }
1503
1504public:
1506 : Expr(CXXBindTemporaryExprClass, Empty) {}
1507
1509 Expr* SubExpr);
1510
1514
1518
1520 return SubExpr->getBeginLoc();
1521 }
1522
1524 return SubExpr->getEndLoc();
1525 }
1526
1527
1529 return T->getStmtClass() == CXXBindTemporaryExprClass;
1530 }
1531
1532
1534
1538};
1539
1546
1547
1550
1551
1553
1555
1556
1557 unsigned NumArgs;
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575 inline Stmt **getTrailingArgs();
1576 const Stmt *const *getTrailingArgs() const {
1577 return const_cast<CXXConstructExpr *>(this)->getTrailingArgs();
1578 }
1579
1580protected:
1581
1585 bool ListInitialization, bool StdInitListInitialization,
1588
1589
1591
1592
1593
1595 return NumArgs * sizeof(Stmt *);
1596 }
1597
1598public:
1599
1603 bool HadMultipleCandidates, bool ListInitialization,
1604 bool StdInitListInitialization, bool ZeroInitialization,
1606
1607
1609
1610
1612
1615
1616
1619
1620
1621
1628
1629
1636
1637
1638
1639
1640
1647
1648
1649
1656
1657
1658
1666
1669 using arg_range = llvm::iterator_range<arg_iterator>;
1671
1676
1681
1682 Expr **getArgs() { return reinterpret_cast<Expr **>(getTrailingArgs()); }
1684 return reinterpret_cast<const Expr *const *>(getTrailingArgs());
1685 }
1686
1687
1689
1690
1692 assert(Arg < getNumArgs() && "Arg access out of range!");
1694 }
1696 assert(Arg < getNumArgs() && "Arg access out of range!");
1698 }
1699
1700
1702 assert(Arg < getNumArgs() && "Arg access out of range!");
1703 getArgs()[Arg] = ArgExpr;
1704 }
1705
1709
1713
1714
1715
1716
1717 std::pair<const NamedDecl *, const WarnUnusedResultAttr *>
1721
1722
1726
1731
1733 return T->getStmtClass() == CXXConstructExprClass ||
1734 T->getStmtClass() == CXXTemporaryObjectExprClass;
1735 }
1736
1737
1741
1745};
1746
1747
1748
1749
1750
1752private:
1754
1755
1757
1758
1759 LLVM_PREFERRED_TYPE(bool)
1760 unsigned ConstructsVirtualBase : 1;
1761
1762
1763
1764 LLVM_PREFERRED_TYPE(bool)
1765 unsigned InheritedFromVirtualBase : 1;
1766
1767public:
1769
1770
1773 bool InheritedFromVirtualBase)
1775 Constructor(Ctor), Loc(Loc),
1776 ConstructsVirtualBase(ConstructsVirtualBase),
1777 InheritedFromVirtualBase(InheritedFromVirtualBase) {
1778 assert(->isDependentType());
1780 }
1781
1782
1784 : Expr(CXXInheritedCtorInitExprClass, Empty),
1785 ConstructsVirtualBase(false), InheritedFromVirtualBase(false) {}
1786
1787
1789
1790
1791
1797
1798
1799
1800
1801
1803
1807
1809 return T->getStmtClass() == CXXInheritedCtorInitExprClass;
1810 }
1811
1815
1819};
1820
1821
1822
1823
1824
1825
1826
1827
1828class CXXFunctionalCastExpr final
1830 private llvm::TrailingObjects<CXXFunctionalCastExpr, CXXBaseSpecifier *,
1831 FPOptionsOverride> {
1834
1842 LParenLoc(lParenLoc), RParenLoc(rParenLoc) {
1845 }
1846
1847 explicit CXXFunctionalCastExpr(EmptyShell Shell, unsigned PathSize,
1848 bool HasFPFeatures)
1849 : ExplicitCastExpr(CXXFunctionalCastExprClass, Shell, PathSize,
1850 HasFPFeatures) {}
1851
1852 unsigned numTrailingObjects(OverloadToken<CXXBaseSpecifier *>) const {
1854 }
1855
1856public:
1859
1860 static CXXFunctionalCastExpr *
1865 static CXXFunctionalCastExpr *
1867
1872
1873
1875
1878
1880 return T->getStmtClass() == CXXFunctionalCastExprClass;
1881 }
1882};
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1901
1902
1903
1904
1905
1907
1911 bool HadMultipleCandidates, bool ListInitialization,
1912 bool StdInitListInitialization,
1913 bool ZeroInitialization);
1914
1915 CXXTemporaryObjectExpr(EmptyShell Empty, unsigned NumArgs);
1916
1917public:
1918 static CXXTemporaryObjectExpr *
1921 SourceRange ParenOrBraceRange, bool HadMultipleCandidates,
1922 bool ListInitialization, bool StdInitListInitialization,
1923 bool ZeroInitialization);
1924
1926 unsigned NumArgs);
1927
1929
1932
1934 return T->getStmtClass() == CXXTemporaryObjectExprClass;
1935 }
1936};
1937
1938Stmt **CXXConstructExpr::getTrailingArgs() {
1939 if (auto *E = dyn_cast(this))
1940 return reinterpret_cast<Stmt **>(E + 1);
1941 assert((getStmtClass() == CXXConstructExprClass) &&
1942 "Unexpected class deriving from CXXConstructExpr!");
1943 return reinterpret_cast<Stmt **>(this + 1);
1944}
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967class LambdaExpr final : public Expr,
1968 private llvm::TrailingObjects<LambdaExpr, Stmt *> {
1969
1970
1971
1973
1974
1976
1977
1978
1979
1980
1981
1982
1983
1984
1986
1987
1990 SourceLocation CaptureDefaultLoc, bool ExplicitParams,
1992 SourceLocation ClosingBrace, bool ContainsUnexpandedParameterPack);
1993
1994
1996
1997 Stmt **getStoredStmts() { return getTrailingObjects(); }
1998 Stmt *const *getStoredStmts() const { return getTrailingObjects(); }
1999
2000 void initBodyIfNeeded() const;
2001
2002public:
2006
2007
2008 static LambdaExpr *
2011 bool ExplicitParams, bool ExplicitResultType,
2013 bool ContainsUnexpandedParameterPack);
2014
2015
2016
2018 unsigned NumCaptures);
2019
2020
2024
2025
2027
2028
2030
2031
2032
2034
2035
2037
2038
2040
2041
2043
2044
2045
2047
2048
2050
2051
2053
2054
2055
2057
2058
2059
2061
2062
2064
2065
2066
2068
2069
2070
2072
2073
2074
2076
2077
2078
2079
2081
2082
2086
2087
2088 llvm::iterator_range<const_capture_init_iterator> capture_inits() const {
2090 }
2091
2092
2093
2095 return reinterpret_cast<Expr **>(getStoredStmts());
2096 }
2097
2098
2099
2101 return reinterpret_cast<Expr *const *>(getStoredStmts());
2102 }
2103
2104
2105
2109
2110
2111
2115
2116
2117
2118
2120
2121
2122
2123
2124
2125
2127
2128
2129
2131
2132
2133
2135
2136
2137
2139
2140
2141
2143
2144
2146
2147
2149
2150
2151
2152
2153
2155
2156
2157
2158
2161 const auto *ConstThis = this;
2162 return const_cast<CompoundStmt *>(ConstThis->getCompoundStmtBody());
2163 }
2164
2165
2166
2168
2169
2170
2172
2173
2177
2179 return T->getStmtClass() == LambdaExprClass;
2180 }
2181
2183 return IntroducerRange.getBegin();
2184 }
2185
2187
2188
2191};
2192
2193
2194
2195
2198
2200
2201public:
2202
2203
2207 TypeInfo(TypeInfo) {
2210 }
2211
2213 : Expr(CXXScalarValueInitExprClass, Shell) {}
2214
2216 return TypeInfo;
2217 }
2218
2222
2225
2227 return T->getStmtClass() == CXXScalarValueInitExprClass;
2228 }
2229
2230
2234
2238};
2239
2241
2243
2244
2246
2247
2249};
2250
2252
2256
2257inline TypeAwareAllocationMode
2262
2264
2268
2272
2274
2278
2282
2289 if (.isNull())
2290 Type = Type.getUnqualifiedType();
2291 }
2295
2297 unsigned Count = 1;
2299 ++Count;
2301 ++Count;
2302 return Count;
2303 }
2304
2308};
2309
2317 if (.isNull())
2318 Type = Type.getUnqualifiedType();
2319 }
2320
2325
2327 unsigned Count = 1;
2329 ++Count;
2331 ++Count;
2333 ++Count;
2334 return Count;
2335 }
2336
2341};
2342
2343
2350
2351
2352
2353class CXXNewExpr final
2354 : public Expr,
2355 private llvm::TrailingObjects<CXXNewExpr, Stmt *, SourceRange> {
2358 friend TrailingObjects;
2359
2360
2362
2363
2365
2366
2368
2369
2371
2372
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390 unsigned arraySizeOffset() const { return 0; }
2391 unsigned initExprOffset() const { return arraySizeOffset() + isArray(); }
2392 unsigned placementNewArgsOffset() const {
2394 }
2395
2396 unsigned numTrailingObjects(OverloadToken<Stmt *>) const {
2398 }
2399
2400 unsigned numTrailingObjects(OverloadToken) const {
2402 }
2403
2404
2405 CXXNewExpr(bool IsGlobalNew, FunctionDecl *OperatorNew,
2406 FunctionDecl *OperatorDelete,
2407 const ImplicitAllocationParameters &IAP,
2408 bool UsualArrayDeleteWantsSize, ArrayRef<Expr *> PlacementArgs,
2409 SourceRange TypeIdParens, std::optional<Expr *> ArraySize,
2411 QualType Ty, TypeSourceInfo *AllocatedTypeInfo, SourceRange Range,
2412 SourceRange DirectInitRange);
2413
2414
2415 CXXNewExpr(EmptyShell Empty, bool IsArray, unsigned NumPlacementArgs,
2416 bool IsParenTypeId);
2417
2418public:
2419
2420 static CXXNewExpr *
2421 Create(const ASTContext &Ctx, bool IsGlobalNew, FunctionDecl *OperatorNew,
2422 FunctionDecl *OperatorDelete, const ImplicitAllocationParameters &IAP,
2423 bool UsualArrayDeleteWantsSize, ArrayRef<Expr *> PlacementArgs,
2424 SourceRange TypeIdParens, std::optional<Expr *> ArraySize,
2426 QualType Ty, TypeSourceInfo *AllocatedTypeInfo, SourceRange Range,
2427 SourceRange DirectInitRange);
2428
2429
2430 static CXXNewExpr *CreateEmpty(const ASTContext &Ctx, bool IsArray,
2431 bool HasInit, unsigned NumPlacementArgs,
2432 bool IsParenTypeId);
2433
2437
2439 return AllocatedTypeInfo;
2440 }
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2458
2463
2465
2466
2467
2468
2471 return std::nullopt;
2472
2474 cast_or_null(getTrailingObjects<Stmt *>()[arraySizeOffset()]))
2476
2477 return std::nullopt;
2478 }
2479
2480
2481
2482
2485 return std::nullopt;
2486
2488 cast_or_null(getTrailingObjects<Stmt *>()[arraySizeOffset()]))
2490
2491 return std::nullopt;
2492 }
2493
2497
2499 return reinterpret_cast<Expr **>(getTrailingObjects<Stmt *>() +
2500 placementNewArgsOffset());
2501 }
2502
2510
2514
2517 return isParenTypeId() ? getTrailingObjects()[0]
2519 }
2520
2522
2523
2525
2526
2531
2532
2535 ? cast(getTrailingObjects<Stmt *>()[initExprOffset()])
2536 : nullptr;
2537 }
2540 ? cast(getTrailingObjects<Stmt *>()[initExprOffset()])
2541 : nullptr;
2542 }
2543
2544
2546 return dyn_cast_or_null(getInitializer());
2547 }
2548
2549
2550
2552
2553
2554
2555
2559
2560
2561
2568
2571
2575
2579
2581 return getTrailingObjects<Stmt *>() + placementNewArgsOffset();
2582 }
2587 return getTrailingObjects<Stmt *>() + placementNewArgsOffset();
2588 }
2592
2594
2597 return raw_arg_begin() + numTrailingObjects(OverloadToken<Stmt *>());
2598 }
2600 return getTrailingObjects<Stmt *>();
2601 }
2603 return raw_arg_begin() + numTrailingObjects(OverloadToken<Stmt *>());
2604 }
2605
2608
2611
2613 return T->getStmtClass() == CXXNewExprClass;
2614 }
2615
2616
2618
2622};
2623
2624
2625
2628
2629
2631
2632
2633 Stmt *Argument = nullptr;
2634
2635public:
2637 bool ArrayFormAsWritten, bool UsualArrayDeleteWantsSize,
2640 OperatorDelete(OperatorDelete), Argument(Arg) {
2644 CXXDeleteExprBits.UsualArrayDeleteWantsSize = UsualArrayDeleteWantsSize;
2647 }
2648
2650
2656
2657
2658
2659
2660
2664
2666
2669
2670
2671
2672
2673
2675
2678 return Argument->getEndLoc();
2679 }
2680
2682 return T->getStmtClass() == CXXDeleteExprClass;
2683 }
2684
2685
2687
2691};
2692
2693
2695
2696
2697 llvm::PointerUnion<TypeSourceInfo *, const IdentifierInfo *> Type;
2698
2699
2701
2702public:
2704
2706 : Type(II), Location(Loc) {}
2707
2709
2713
2717
2719};
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2747
2748
2749 Stmt *Base = nullptr;
2750
2751
2752
2753 LLVM_PREFERRED_TYPE(bool)
2754 bool IsArrow : 1;
2755
2756
2758
2759
2761
2762
2763
2765
2766
2767
2769
2770
2772
2773
2774
2776
2777public:
2785
2787 : Expr(CXXPseudoDestructorExprClass, Shell), IsArrow(false) {}
2788
2790
2791
2792
2793
2794 bool hasQualifier() const { return QualifierLoc.hasQualifier(); }
2795
2796
2797
2799
2800
2801
2802
2804 return QualifierLoc.getNestedNameSpecifier();
2805 }
2806
2807
2808
2809 bool isArrow() const { return IsArrow; }
2810
2811
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2824
2825
2826
2828
2829
2831
2832
2833
2834
2835
2836
2837
2838
2840 return DestroyedType.getTypeSourceInfo();
2841 }
2842
2843
2844
2845
2847 return DestroyedType.getIdentifier();
2848 }
2849
2850
2852
2853
2855 return DestroyedType.getLocation();
2856 }
2857
2858
2859
2863
2864
2868
2870 return Base->getBeginLoc();
2871 }
2873
2875 return T->getStmtClass() == CXXPseudoDestructorExprClass;
2876 }
2877
2878
2880
2884};
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894class TypeTraitExpr final
2895 : public Expr,
2896 private llvm::TrailingObjects<TypeTraitExpr, APValue, TypeSourceInfo *> {
2897
2899
2900
2902
2905 std::variant<bool, APValue> Value);
2906
2908
2909 size_t numTrailingObjects(OverloadToken<TypeSourceInfo *>) const {
2911 }
2912
2913 size_t numTrailingObjects(OverloadToken) const {
2915 }
2916
2917public:
2921
2922
2928
2933
2935 bool IsStoredAsBool,
2936 unsigned NumArgs);
2937
2938
2942
2946
2951
2954 return *getTrailingObjects();
2955 }
2956
2957
2959
2960
2962 assert(I < getNumArgs() && "Argument out-of-range");
2964 }
2965
2966
2968 return getTrailingObjects<TypeSourceInfo *>(getNumArgs());
2969 }
2970
2973
2975 return T->getStmtClass() == TypeTraitExprClass;
2976 }
2977
2978
2982
2986};
2987
2988
2989
2990
2991
2992
2993
2994
2995
2997
2998 uint64_t Value = 0;
2999
3000
3001 Expr *Dimension;
3002
3003
3005
3006
3008
3009
3011
3012public:
3014
3019 Value(value), Dimension(dimension), Loc(loc), RParen(rparen),
3020 QueriedType(queried) {
3021 assert(att <= ATT_Last && "invalid enum value!");
3024 "ATT overflow!");
3026 }
3027
3029 : Expr(ArrayTypeTraitExprClass, Empty) {
3031 }
3032
3035
3039
3041
3043
3045
3047
3049 return T->getStmtClass() == ArrayTypeTraitExprClass;
3050 }
3051
3052
3056
3060};
3061
3062
3063
3064
3065
3066
3067
3068
3070
3072
3073
3075
3076
3077 Expr* QueriedExpression = nullptr;
3078
3079public:
3081
3085 Loc(loc), RParen(rparen), QueriedExpression(queried) {
3088
3089 assert(et <= ET_Last && "invalid enum value!");
3091 "ET overflow!");
3093 }
3094
3096 : Expr(ExpressionTraitExprClass, Empty) {
3099 }
3100
3103
3107
3109
3111
3113 return T->getStmtClass() == ExpressionTraitExprClass;
3114 }
3115
3116
3120
3124};
3125
3126
3127
3131
3132
3134
3135
3137
3138protected:
3145 bool KnownDependent, bool KnownInstantiationDependent,
3146 bool KnownContainsUnexpandedParameterPack);
3147
3149 bool HasTemplateKWAndArgsInfo);
3150
3151
3156
3157
3158
3164
3165
3166
3171
3175
3176public:
3183
3184
3185
3186
3187
3188
3191
3194
3200
3201 Result.HasFormOfMemberPointer = (E == Ovl && Ovl->getQualifier());
3202 Result.IsAddressOfOperand = true;
3203 Result.IsAddressOfOperandWithParen = HasParen;
3204 Result.Expression = Ovl;
3205 } else {
3207 }
3208
3210 }
3211
3212
3213
3218
3220
3227 llvm::iterator_range<decls_iterator> decls() const {
3229 }
3230
3231
3233
3234
3236
3237
3239
3240
3242
3243
3245 return QualifierLoc.getNestedNameSpecifier();
3246 }
3247
3248
3249
3251
3252
3253
3259
3260
3261
3267
3268
3269
3275
3276
3278
3279
3282 return false;
3283
3284
3285
3289 }
3290
3293 if (auto *TTP = dyn_cast_or_null(
3297 return true;
3298 return false;
3299 }();
3300 }
3301
3304 if (auto *TTP = dyn_cast_or_null(
3308 return true;
3309 return false;
3310 }();
3311 }
3312
3317
3320 return dyn_cast_or_null(
3322 }
3323
3326 return nullptr;
3328 }
3329
3332 return 0;
3333
3335 }
3336
3340
3341
3346
3348 return T->getStmtClass() == UnresolvedLookupExprClass ||
3349 T->getStmtClass() == UnresolvedMemberExprClass;
3350 }
3351};
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386class UnresolvedLookupExpr final
3388 private llvm::TrailingObjects<UnresolvedLookupExpr, DeclAccessPair,
3389 ASTTemplateKWAndArgsInfo,
3390 TemplateArgumentLoc> {
3393 friend TrailingObjects;
3394
3395
3396
3397
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3420 bool KnownDependent, bool KnownInstantiationDependent);
3421
3422 UnresolvedLookupExpr(EmptyShell Empty, unsigned NumResults,
3423 bool HasTemplateKWAndArgsInfo);
3424
3425 unsigned numTrailingObjects(OverloadToken) const {
3427 }
3428
3429 unsigned numTrailingObjects(OverloadToken) const {
3431 }
3432
3433public:
3434 static UnresolvedLookupExpr *
3435 Create(const ASTContext &Context, CXXRecordDecl *NamingClass,
3436 NestedNameSpecifierLoc QualifierLoc,
3437 const DeclarationNameInfo &NameInfo, bool RequiresADL,
3438 UnresolvedSetIterator Begin, UnresolvedSetIterator End,
3439 bool KnownDependent, bool KnownInstantiationDependent);
3440
3441
3442
3443
3444 static UnresolvedLookupExpr *
3445 Create(const ASTContext &Context, CXXRecordDecl *NamingClass,
3446 NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc,
3447 const DeclarationNameInfo &NameInfo, bool RequiresADL,
3448 const TemplateArgumentListInfo *Args, UnresolvedSetIterator Begin,
3449 UnresolvedSetIterator End, bool KnownDependent,
3450 bool KnownInstantiationDependent);
3451
3453 unsigned NumResults,
3454 bool HasTemplateKWAndArgsInfo,
3455 unsigned NumTemplateArgs);
3456
3457
3458
3460
3461
3462
3463
3466
3469 return l.getBeginLoc();
3471 }
3472
3478
3482
3486
3488 return T->getStmtClass() == UnresolvedLookupExprClass;
3489 }
3490};
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506class DependentScopeDeclRefExpr final
3507 : public Expr,
3508 private llvm::TrailingObjects<DependentScopeDeclRefExpr,
3509 ASTTemplateKWAndArgsInfo,
3510 TemplateArgumentLoc> {
3513 friend TrailingObjects;
3514
3515
3516
3518
3519
3521
3526
3527 size_t numTrailingObjects(OverloadToken) const {
3528 return hasTemplateKWAndArgsInfo();
3529 }
3530
3531 bool hasTemplateKWAndArgsInfo() const {
3533 }
3534
3535public:
3536 static DependentScopeDeclRefExpr *
3537 Create(const ASTContext &Context, NestedNameSpecifierLoc QualifierLoc,
3538 SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo,
3539 const TemplateArgumentListInfo *TemplateArgs);
3540
3542 bool HasTemplateKWAndArgsInfo,
3543 unsigned NumTemplateArgs);
3544
3545
3547
3548
3550
3551
3552
3553
3555
3556
3557
3559
3560
3561
3563 return QualifierLoc.getNestedNameSpecifier();
3564 }
3565
3566
3567
3569 if (!hasTemplateKWAndArgsInfo())
3571 return getTrailingObjects()->TemplateKWLoc;
3572 }
3573
3574
3575
3577 if (!hasTemplateKWAndArgsInfo())
3579 return getTrailingObjects()->LAngleLoc;
3580 }
3581
3582
3583
3585 if (!hasTemplateKWAndArgsInfo())
3587 return getTrailingObjects()->RAngleLoc;
3588 }
3589
3590
3592
3593
3595
3596
3597
3600 getTrailingObjects()->copyInto(
3601 getTrailingObjects(), List);
3602 }
3603
3606 return nullptr;
3607
3608 return getTrailingObjects();
3609 }
3610
3613 return 0;
3614
3615 return getTrailingObjects()->NumTemplateArgs;
3616 }
3617
3621
3622
3623
3625 return QualifierLoc.getBeginLoc();
3626 }
3627
3633
3635 return T->getStmtClass() == DependentScopeDeclRefExprClass;
3636 }
3637
3641
3645};
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657class ExprWithCleanups final
3659 private llvm::TrailingObjects<
3660 ExprWithCleanups,
3661 llvm::PointerUnion<BlockDecl *, CompoundLiteralExpr *>> {
3662public:
3663
3664
3665
3666
3667 using CleanupObject = llvm::PointerUnion<BlockDecl *, CompoundLiteralExpr *>;
3668
3669private:
3671 friend TrailingObjects;
3672
3673 ExprWithCleanups(EmptyShell, unsigned NumObjects);
3674 ExprWithCleanups(Expr *SubExpr, bool CleanupsHaveSideEffects,
3676
3677public:
3679 unsigned numObjects);
3680
3682 bool CleanupsHaveSideEffects,
3684
3688
3690
3695
3699
3701 return SubExpr->getBeginLoc();
3702 }
3703
3705 return SubExpr->getEndLoc();
3706 }
3707
3708
3710 return T->getStmtClass() == ExprWithCleanupsClass;
3711 }
3712
3713
3715
3719};
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742class CXXUnresolvedConstructExpr final
3743 : public Expr,
3744 private llvm::TrailingObjects<CXXUnresolvedConstructExpr, Expr *> {
3746 friend TrailingObjects;
3747
3748
3749
3750 llvm::PointerIntPair<TypeSourceInfo *, 1> TypeAndInitForm;
3751
3752
3754
3755
3757
3761
3762 CXXUnresolvedConstructExpr(EmptyShell Empty, unsigned NumArgs)
3763 : Expr(CXXUnresolvedConstructExprClass, Empty) {
3765 }
3766
3767public:
3772
3774 unsigned NumArgs);
3775
3776
3777
3779
3780
3781
3783 return TypeAndInitForm.getPointer();
3784 }
3785
3786
3787
3790
3791
3792
3795
3796
3797
3798
3800
3801
3803
3805 using arg_range = llvm::iterator_range<arg_iterator>;
3806
3810
3813
3819
3821 assert(I < getNumArgs() && "Argument index out-of-range");
3823 }
3824
3826 assert(I < getNumArgs() && "Argument index out-of-range");
3828 }
3829
3831 assert(I < getNumArgs() && "Argument index out-of-range");
3833 }
3834
3837 if (!RParenLoc.isValid() && getNumArgs() > 0)
3839 return RParenLoc;
3840 }
3841
3843 return T->getStmtClass() == CXXUnresolvedConstructExprClass;
3844 }
3845
3846
3848 auto **begin = reinterpret_cast<Stmt **>(arg_begin());
3850 }
3851
3853 auto **begin = reinterpret_cast<Stmt **>(
3854 const_cast<CXXUnresolvedConstructExpr *>(this)->arg_begin());
3856 }
3857};
3858
3859
3860
3861
3862
3863
3864
3865
3866class CXXDependentScopeMemberExpr final
3867 : public Expr,
3868 private llvm::TrailingObjects<CXXDependentScopeMemberExpr,
3869 ASTTemplateKWAndArgsInfo,
3870 TemplateArgumentLoc, NamedDecl *> {
3873 friend TrailingObjects;
3874
3875
3876
3878
3879
3880
3882
3883
3884
3885
3887
3888
3889
3890
3891
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909 bool hasTemplateKWAndArgsInfo() const {
3911 }
3912
3913 bool hasFirstQualifierFoundInScope() const {
3915 }
3916
3917 unsigned numTrailingObjects(OverloadToken) const {
3918 return hasTemplateKWAndArgsInfo();
3919 }
3920
3921 unsigned numTrailingObjects(OverloadToken) const {
3923 }
3924
3925 CXXDependentScopeMemberExpr(const ASTContext &Ctx, Expr *Base,
3926 QualType BaseType, bool IsArrow,
3927 SourceLocation OperatorLoc,
3928 NestedNameSpecifierLoc QualifierLoc,
3929 SourceLocation TemplateKWLoc,
3930 NamedDecl *FirstQualifierFoundInScope,
3931 DeclarationNameInfo MemberNameInfo,
3932 const TemplateArgumentListInfo *TemplateArgs);
3933
3934 CXXDependentScopeMemberExpr(EmptyShell Empty, bool HasTemplateKWAndArgsInfo,
3935 bool HasFirstQualifierFoundInScope);
3936
3937public:
3938 static CXXDependentScopeMemberExpr *
3939 Create(const ASTContext &Ctx, Expr *Base, QualType BaseType, bool IsArrow,
3940 SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc,
3941 SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierFoundInScope,
3942 DeclarationNameInfo MemberNameInfo,
3943 const TemplateArgumentListInfo *TemplateArgs);
3944
3945 static CXXDependentScopeMemberExpr *
3946 CreateEmpty(const ASTContext &Ctx, bool HasTemplateKWAndArgsInfo,
3947 unsigned NumTemplateArgs, bool HasFirstQualifierFoundInScope);
3948
3949
3950
3951
3953 if (!Base)
3954 return true;
3955 return cast(Base)->isImplicitCXXThis();
3956 }
3957
3958
3959
3964
3966
3967
3968
3970
3971
3975
3976
3978 return QualifierLoc.getNestedNameSpecifier();
3979 }
3980
3981
3982
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3997 if (!hasFirstQualifierFoundInScope())
3998 return nullptr;
3999 return *getTrailingObjects<NamedDecl *>();
4000 }
4001
4002
4004 return MemberNameInfo;
4005 }
4006
4007
4009
4010
4011
4013
4014
4015
4017 if (!hasTemplateKWAndArgsInfo())
4019 return getTrailingObjects()->TemplateKWLoc;
4020 }
4021
4022
4023
4025 if (!hasTemplateKWAndArgsInfo())
4027 return getTrailingObjects()->LAngleLoc;
4028 }
4029
4030
4031
4033 if (!hasTemplateKWAndArgsInfo())
4035 return getTrailingObjects()->RAngleLoc;
4036 }
4037
4038
4040
4041
4042
4044
4045
4046
4049 getTrailingObjects()->copyInto(
4050 getTrailingObjects(), List);
4051 }
4052
4053
4054
4057 return nullptr;
4058
4059 return getTrailingObjects();
4060 }
4061
4062
4063
4066 return 0;
4067
4068 return getTrailingObjects()->NumTemplateArgs;
4069 }
4070
4074
4077 return Base->getBeginLoc();
4080 return MemberNameInfo.getBeginLoc();
4081 }
4082
4086 return MemberNameInfo.getEndLoc();
4087 }
4088
4090 return T->getStmtClass() == CXXDependentScopeMemberExprClass;
4091 }
4092
4093
4099
4105};
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122class UnresolvedMemberExpr final
4124 private llvm::TrailingObjects<UnresolvedMemberExpr, DeclAccessPair,
4125 ASTTemplateKWAndArgsInfo,
4126 TemplateArgumentLoc> {
4129 friend TrailingObjects;
4130
4131
4132
4133
4134
4136
4137
4139
4140
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157 UnresolvedMemberExpr(const ASTContext &Context, bool HasUnresolvedUsing,
4158 Expr *Base, QualType BaseType, bool IsArrow,
4165
4166 UnresolvedMemberExpr(EmptyShell Empty, unsigned NumResults,
4167 bool HasTemplateKWAndArgsInfo);
4168
4169 unsigned numTrailingObjects(OverloadToken) const {
4171 }
4172
4173 unsigned numTrailingObjects(OverloadToken) const {
4175 }
4176
4177public:
4178 static UnresolvedMemberExpr *
4180 QualType BaseType, bool IsArrow, SourceLocation OperatorLoc,
4181 NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc,
4182 const DeclarationNameInfo &MemberNameInfo,
4183 const TemplateArgumentListInfo *TemplateArgs,
4184 UnresolvedSetIterator Begin, UnresolvedSetIterator End);
4185
4187 unsigned NumResults,
4188 bool HasTemplateKWAndArgsInfo,
4189 unsigned NumTemplateArgs);
4190
4191
4192
4193
4194
4196
4197
4198
4207
4209
4210
4211
4215
4216
4217
4219
4220
4222
4223
4226 return const_cast<UnresolvedMemberExpr *>(this)->getNamingClass();
4227 }
4228
4229
4230
4232
4233
4235
4236
4237
4239
4240
4241
4243
4246 return Base->getBeginLoc();
4248 return l.getBeginLoc();
4250 }
4251
4257
4259 return T->getStmtClass() == UnresolvedMemberExprClass;
4260 }
4261
4262
4268
4274};
4275
4277 if (auto *ULE = dyn_cast(this))
4280}
4281
4284 return nullptr;
4285
4286 if (auto *ULE = dyn_cast(this))
4290}
4291
4293 if (auto *ULE = dyn_cast(this))
4297}
4298
4300 if (auto *ULE = dyn_cast(this))
4301 return ULE->getNamingClass();
4303}
4304
4305
4306
4307
4308
4311
4312 Stmt *Operand;
4314
4315public:
4319 Operand(Operand), Range(Keyword, RParen) {
4322 }
4323
4325
4327
4331
4333
4335 return T->getStmtClass() == CXXNoexceptExprClass;
4336 }
4337
4338
4340
4344};
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4366
4368
4369
4370
4371
4372
4373
4374 unsigned NumExpansions;
4375
4376 Stmt *Pattern;
4377
4378public:
4381 : Expr(PackExpansionExprClass, Pattern->getType(),
4383 EllipsisLoc(EllipsisLoc),
4384 NumExpansions(NumExpansions ? *NumExpansions + 1 : 0),
4385 Pattern(Pattern) {
4387 }
4388
4390
4391
4393
4394
4396
4397
4398
4400
4401
4402
4404 if (NumExpansions)
4405 return NumExpansions - 1;
4406
4407 return std::nullopt;
4408 }
4409
4411 return Pattern->getBeginLoc();
4412 }
4413
4415
4417 return T->getStmtClass() == PackExpansionExprClass;
4418 }
4419
4420
4422 return child_range(&Pattern, &Pattern + 1);
4423 }
4424
4428};
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439class SizeOfPackExpr final
4440 : public Expr,
4441 private llvm::TrailingObjects<SizeOfPackExpr, TemplateArgument> {
4444 friend TrailingObjects;
4445
4446
4448
4449
4451
4452
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465 unsigned Length;
4466
4467
4469
4470
4471
4476 OperatorLoc(OperatorLoc), PackLoc(PackLoc), RParenLoc(RParenLoc),
4477 Length(Length ? *Length : PartialArgs.size()), Pack(Pack) {
4478 assert((!Length || PartialArgs.empty()) &&
4479 "have partial args for non-dependent sizeof... expression");
4480 auto *Args = getTrailingObjects();
4481 llvm::uninitialized_copy(PartialArgs, Args);
4483 : ExprDependence::ValueInstantiation);
4484 }
4485
4486
4488 : Expr(SizeOfPackExprClass, Empty), Length(NumPartialArgs) {}
4489
4490public:
4491 static SizeOfPackExpr *Create(ASTContext &Context, SourceLocation OperatorLoc,
4492 NamedDecl *Pack, SourceLocation PackLoc,
4493 SourceLocation RParenLoc,
4494 UnsignedOrNone Length = std::nullopt,
4497 unsigned NumPartialArgs);
4498
4499
4501
4502
4504
4505
4507
4508
4510
4511
4512
4513
4514
4517 "Cannot get the length of a value-dependent pack size expression");
4518 return Length;
4519 }
4520
4521
4522
4523
4524
4525
4529
4530
4533 return getTrailingObjects(Length);
4534 }
4535
4538
4540 return T->getStmtClass() == SizeOfPackExprClass;
4541 }
4542
4543
4547
4551};
4552
4553class PackIndexingExpr final
4554 : public Expr,
4555 private llvm::TrailingObjects<PackIndexingExpr, Expr *> {
4558 friend TrailingObjects;
4559
4561
4562
4564
4565
4566 Stmt *SubExprs[2];
4567
4571 bool FullySubstituted = false)
4573 EllipsisLoc(EllipsisLoc), RSquareLoc(RSquareLoc),
4574 SubExprs{PackIdExpr, IndexExpr} {
4577 llvm::uninitialized_copy(SubstitutedExprs, getTrailingObjects());
4578
4582 }
4583
4584
4585 PackIndexingExpr(EmptyShell Empty) : Expr(PackIndexingExprClass, Empty) {}
4586
4587 unsigned numTrailingObjects(OverloadToken<Expr *>) const {
4589 }
4590
4591public:
4592 static PackIndexingExpr *Create(ASTContext &Context,
4593 SourceLocation EllipsisLoc,
4594 SourceLocation RSquareLoc, Expr *PackIdExpr,
4595 Expr *IndexExpr, std::optional<int64_t> Index,
4596 ArrayRef<Expr *> SubstitutedExprs = {},
4597 bool FullySubstituted = false);
4599 unsigned NumTransformedExprs);
4600
4601
4605
4606
4611
4612
4614
4615
4617
4618
4620
4623
4625
4627
4629
4632 return std::nullopt;
4635 assert(Index.isNonNegative() && "Invalid index");
4636 return static_cast<unsigned>(Index.getExtValue());
4637 }
4638
4641 assert(Index && "extracting the indexed expression of a dependant pack");
4642 return getTrailingObjects()[*Index];
4643 }
4644
4645
4649
4651 return T->getStmtClass() == PackIndexingExprClass;
4652 }
4653
4654
4656
4660};
4661
4662
4663
4664class SubstNonTypeTemplateParmExpr : public Expr {
4667
4668
4669 Stmt *Replacement;
4670
4671
4672
4673
4674 llvm::PointerIntPair<Decl *, 1, bool> AssociatedDeclAndRef;
4675
4676 unsigned Index : 15;
4677 unsigned PackIndex : 15;
4678 LLVM_PREFERRED_TYPE(bool)
4679 unsigned Final : 1;
4680
4682 : Expr(SubstNonTypeTemplateParmExprClass, Empty) {}
4683
4684public:
4687 Decl *AssociatedDecl, unsigned Index,
4689 bool Final)
4690 : Expr(SubstNonTypeTemplateParmExprClass, Ty, ValueKind, OK_Ordinary),
4691 Replacement(Replacement),
4692 AssociatedDeclAndRef(AssociatedDecl, RefParam), Index(Index),
4693 PackIndex(PackIndex.toInternalRepresentation()), Final(Final) {
4694 assert(AssociatedDecl != nullptr);
4697 }
4698
4704
4706
4707
4708
4710
4711
4712
4714
4718
4719
4720
4722
4724
4726
4727
4729
4731 return s->getStmtClass() == SubstNonTypeTemplateParmExprClass;
4732 }
4733
4734
4736
4740};
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754class SubstNonTypeTemplateParmPackExpr : public Expr {
4757
4758
4759 Decl *AssociatedDecl;
4760
4761
4762
4764
4765
4766 unsigned NumArguments : 15;
4767
4768 LLVM_PREFERRED_TYPE(bool)
4769 unsigned Final : 1;
4770
4771 unsigned Index : 16;
4772
4773
4775
4776 explicit SubstNonTypeTemplateParmPackExpr(EmptyShell Empty)
4777 : Expr(SubstNonTypeTemplateParmPackExprClass, Empty) {}
4778
4779public:
4783 Decl *AssociatedDecl, unsigned Index,
4784 bool Final);
4785
4786
4787
4789
4790
4791
4793
4794
4795
4797
4798
4800
4801
4803
4804
4805
4807
4810
4812 return T->getStmtClass() == SubstNonTypeTemplateParmPackExprClass;
4813 }
4814
4815
4819
4823};
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839class FunctionParmPackExpr final
4840 : public Expr,
4841 private llvm::TrailingObjects<FunctionParmPackExpr, ValueDecl *> {
4844 friend TrailingObjects;
4845
4846
4848
4849
4851
4852
4853 unsigned NumParameters;
4854
4856 unsigned NumParams, ValueDecl *const *Params);
4857
4858public:
4864 unsigned NumParams);
4865
4866
4868
4869
4871
4872
4873
4877
4878
4880
4881
4883
4886
4888 return T->getStmtClass() == FunctionParmPackExprClass;
4889 }
4890
4894
4898};
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4921private:
4924
4925 llvm::PointerUnion<Stmt *, LifetimeExtendedTemporaryDecl *> State;
4926
4927public:
4929 bool BoundToLvalueReference,
4931
4933 : Expr(MaterializeTemporaryExprClass, Empty) {}
4934
4935
4936
4943
4944
4948 ->getStorageDuration();
4949 }
4950
4951
4952
4955 "the temporary has not been lifetime extended");
4957 MayCreate);
4958 }
4959
4967
4968
4969
4973 ->getExtendingDecl();
4974 }
4978
4980
4984 ->getManglingNumber();
4985 }
4986
4987
4988
4990
4991
4992
4994
4998
5002
5004 return T->getStmtClass() == MaterializeTemporaryExprClass;
5005 }
5006
5007
5010 ? child_range(State.getAddrOfPtr1(), State.getAddrOfPtr1() + 1)
5012 }
5013
5017 State.getAddrOfPtr1() + 1)
5020 ->childrenExpr();
5021 }
5022};
5023
5024
5025
5026
5027
5028
5029
5030
5031
5035
5036 enum SubExpr { Callee, LHS, RHS, Count };
5037
5041
5042
5044 Stmt *SubExprs[SubExpr::Count];
5045
5046public:
5051
5053
5057 Expr *getLHS() const { return static_cast<Expr*>(SubExprs[SubExpr::LHS]); }
5058 Expr *getRHS() const { return static_cast<Expr*>(SubExprs[SubExpr::RHS]); }
5059
5060
5064
5065
5067
5068
5070
5071
5073
5078
5080
5082 if (LParenLoc.isValid())
5083 return LParenLoc;
5087 }
5088
5090 if (RParenLoc.isValid())
5091 return RParenLoc;
5095 }
5096
5098 return T->getStmtClass() == CXXFoldExprClass;
5099 }
5100
5101
5103 return child_range(SubExprs, SubExprs + SubExpr::Count);
5104 }
5105
5109};
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139class CXXParenListInitExpr final
5140 : public Expr,
5141 private llvm::TrailingObjects<CXXParenListInitExpr, Expr *> {
5145
5146 unsigned NumExprs;
5147 unsigned NumUserSpecifiedExprs;
5149 llvm::PointerUnion<Expr *, FieldDecl *> ArrayFillerOrUnionFieldInit;
5150
5152 unsigned NumUserSpecifiedExprs, SourceLocation InitLoc,
5155 NumExprs(Args.size()), NumUserSpecifiedExprs(NumUserSpecifiedExprs),
5156 InitLoc(InitLoc), LParenLoc(LParenLoc), RParenLoc(RParenLoc) {
5157 llvm::copy(Args, getTrailingObjects());
5158 assert(NumExprs >= NumUserSpecifiedExprs &&
5159 "number of user specified inits is greater than the number of "
5160 "passed inits");
5162 }
5163
5164 size_t numTrailingObjects(OverloadToken<Expr *>) const { return NumExprs; }
5165
5166public:
5167 static CXXParenListInitExpr *
5169 unsigned NumUserSpecifiedExprs, SourceLocation InitLoc,
5170 SourceLocation LParenLoc, SourceLocation RParenLoc);
5171
5173 EmptyShell Empty);
5174
5176 : Expr(CXXParenListInitExprClass, Empty), NumExprs(NumExprs),
5177 NumUserSpecifiedExprs(0) {}
5178
5180
5182 return getTrailingObjects(NumExprs);
5183 }
5184
5186
5188 return getTrailingObjects(NumUserSpecifiedExprs);
5189 }
5190
5192 return getTrailingObjects(NumUserSpecifiedExprs);
5193 }
5194
5196
5198
5200
5204
5206
5208 return dyn_cast_if_present<Expr *>(ArrayFillerOrUnionFieldInit);
5209 }
5210
5212 return dyn_cast_if_present<Expr *>(ArrayFillerOrUnionFieldInit);
5213 }
5214
5216 ArrayFillerOrUnionFieldInit = FD;
5217 }
5218
5220 return dyn_cast_if_present<FieldDecl *>(ArrayFillerOrUnionFieldInit);
5221 }
5222
5224 return dyn_cast_if_present<FieldDecl *>(ArrayFillerOrUnionFieldInit);
5225 }
5226
5228 Stmt **Begin = reinterpret_cast<Stmt **>(getTrailingObjects());
5229 return child_range(Begin, Begin + NumExprs);
5230 }
5231
5233 Stmt *const *Begin = reinterpret_cast<Stmt *const *>(getTrailingObjects());
5235 }
5236
5238 return T->getStmtClass() == CXXParenListInitExprClass;
5239 }
5240};
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5257
5259
5260 enum SubExpr { Operand, Common, Ready, Suspend, Resume, Count };
5261
5262 Stmt *SubExprs[SubExpr::Count];
5264
5265public:
5266
5268
5274 KeywordLoc(KeywordLoc), OpaqueValue(OpaqueValue) {
5275 SubExprs[SubExpr::Operand] = Operand;
5276 SubExprs[SubExpr::Common] = Common;
5277 SubExprs[SubExpr::Ready] = Ready;
5278 SubExprs[SubExpr::Suspend] = Suspend;
5279 SubExprs[SubExpr::Resume] = Resume;
5281 }
5282
5284 Expr *Operand, Expr *Common)
5286 assert(Common->isTypeDependent() && Ty->isDependentType() &&
5287 "wrong constructor for non-dependent co_await/co_yield expression");
5288 SubExprs[SubExpr::Operand] = Operand;
5289 SubExprs[SubExpr::Common] = Common;
5290 SubExprs[SubExpr::Ready] = nullptr;
5291 SubExprs[SubExpr::Suspend] = nullptr;
5292 SubExprs[SubExpr::Resume] = nullptr;
5294 }
5295
5297 SubExprs[SubExpr::Operand] = nullptr;
5298 SubExprs[SubExpr::Common] = nullptr;
5299 SubExprs[SubExpr::Ready] = nullptr;
5300 SubExprs[SubExpr::Suspend] = nullptr;
5301 SubExprs[SubExpr::Resume] = nullptr;
5302 }
5303
5305 return static_cast<Expr*>(SubExprs[SubExpr::Common]);
5306 }
5307
5308
5310
5312 return static_cast<Expr*>(SubExprs[SubExpr::Ready]);
5313 }
5314
5316 return static_cast<Expr*>(SubExprs[SubExpr::Suspend]);
5317 }
5318
5320 return static_cast<Expr*>(SubExprs[SubExpr::Resume]);
5321 }
5322
5323
5325 return static_cast<Expr *>(SubExprs[SubExpr::Operand]);
5326 }
5327
5330 assert(SuspendExpr);
5331
5332 auto SuspendType = SuspendExpr->getType();
5333
5334 if (SuspendType->isVoidType())
5336 if (SuspendType->isBooleanType())
5338
5339
5340
5341
5342 assert(SuspendType->isVoidPointerType());
5344 }
5345
5347
5349
5353
5355 return child_range(SubExprs, SubExprs + SubExpr::Count);
5356 }
5357
5361
5363 return T->getStmtClass() == CoawaitExprClass ||
5364 T->getStmtClass() == CoyieldExprClass;
5365 }
5366};
5367
5368
5371
5372public:
5377 Ready, Suspend, Resume, OpaqueValue) {
5379 }
5380
5382 Expr *Common, bool IsImplicit = false)
5384 Common) {
5386 }
5387
5390
5393
5395 return T->getStmtClass() == CoawaitExprClass;
5396 }
5397};
5398
5399
5400
5403
5405 Stmt *SubExprs[2];
5406
5407public:
5411 KeywordLoc(KeywordLoc) {
5412
5413
5415 "wrong constructor for non-dependent co_await/co_yield expression");
5416 SubExprs[0] = Op;
5417 SubExprs[1] = OpCoawait;
5419 }
5420
5422 : Expr(DependentCoawaitExprClass, Empty) {}
5423
5425
5429
5431
5433
5437
5439
5443
5445 return T->getStmtClass() == DependentCoawaitExprClass;
5446 }
5447};
5448
5449
5452
5453public:
5458 Ready, Suspend, Resume, OpaqueValue) {}
5460 Expr *Common)
5462 Common) {}
5465
5467 return T->getStmtClass() == CoyieldExprClass;
5468 }
5469};
5470
5471
5472
5473
5476 private llvm::TrailingObjects<BuiltinBitCastExpr, CXXBaseSpecifier *> {
5479 friend TrailingObjects;
5480
5483
5484public:
5489 DstType),
5490 KWLoc(KWLoc), RParenLoc(RParenLoc) {}
5493
5496
5498 return T->getStmtClass() == BuiltinBitCastExprClass;
5499 }
5500};
5501
5502}
5503
5504#endif
This file provides AST data structures related to concepts.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Defines the C++ template declaration subclasses.
Defines the ExceptionSpecificationType enumeration and various utility functions.
Defines enumerations for expression traits intrinsics.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Defines several types used to describe C++ lambda expressions that are shared between the parser and ...
Defines the clang::LangOptions interface.
Defines an enumeration for C++ overloaded operators.
Defines the clang::SourceLocation class and associated facilities.
Defines various enumerations that describe declaration and type specifiers.
static QualType getPointeeType(const MemRegion *R)
Defines the clang::TemplateNameKind enum.
Defines enumerations for the type traits support.
C Language Family Type Representation.
__device__ __2f16 float __ockl_bool s
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
ArrayTypeTraitExpr(SourceLocation loc, ArrayTypeTrait att, TypeSourceInfo *queried, uint64_t value, Expr *dimension, SourceLocation rparen, QualType ty)
Definition ExprCXX.h:3015
uint64_t getValue() const
Definition ExprCXX.h:3044
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:3034
ArrayTypeTrait getTrait() const
Definition ExprCXX.h:3036
QualType getQueriedType() const
Definition ExprCXX.h:3040
Expr * getDimensionExpression() const
Definition ExprCXX.h:3046
ArrayTypeTraitExpr(EmptyShell Empty)
Definition ExprCXX.h:3028
child_range children()
Definition ExprCXX.h:3053
const_child_range children() const
Definition ExprCXX.h:3057
static bool classof(const Stmt *T)
Definition ExprCXX.h:3048
TypeSourceInfo * getQueriedTypeSourceInfo() const
Definition ExprCXX.h:3042
friend class ASTStmtReader
Definition ExprCXX.h:3013
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:3033
StringRef getOpcodeStr() const
static bool classof(const Stmt *T)
Definition ExprCXX.h:5497
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:5495
BuiltinBitCastExpr(EmptyShell Empty)
Definition ExprCXX.h:5491
BuiltinBitCastExpr(QualType T, ExprValueKind VK, CastKind CK, Expr *SrcExpr, TypeSourceInfo *DstType, SourceLocation KWLoc, SourceLocation RParenLoc)
Definition ExprCXX.h:5485
friend class CastExpr
Definition ExprCXX.h:5478
friend class ASTStmtReader
Definition ExprCXX.h:5477
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:5494
Represents a call to a CUDA kernel function.
Definition ExprCXX.h:234
const CallExpr * getConfig() const
Definition ExprCXX.h:260
static CUDAKernelCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty)
static bool classof(const Stmt *T)
Definition ExprCXX.h:265
CallExpr * getConfig()
Definition ExprCXX.h:263
friend class ASTStmtReader
Definition ExprCXX.h:235
static bool classof(const Stmt *T)
Definition ExprCXX.h:626
static CXXAddrspaceCastExpr * CreateEmpty(const ASTContext &Context)
friend class CastExpr
Definition ExprCXX.h:617
friend TrailingObjects
Definition ExprCXX.h:618
Represents binding an expression to a temporary.
Definition ExprCXX.h:1493
CXXBindTemporaryExpr(EmptyShell Empty)
Definition ExprCXX.h:1505
static bool classof(const Stmt *T)
Definition ExprCXX.h:1528
void setTemporary(CXXTemporary *T)
Definition ExprCXX.h:1513
void setSubExpr(Expr *E)
Definition ExprCXX.h:1517
Expr * getSubExpr()
Definition ExprCXX.h:1516
const_child_range children() const
Definition ExprCXX.h:1535
CXXTemporary * getTemporary()
Definition ExprCXX.h:1511
const CXXTemporary * getTemporary() const
Definition ExprCXX.h:1512
const Expr * getSubExpr() const
Definition ExprCXX.h:1515
child_range children()
Definition ExprCXX.h:1533
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:1523
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:1519
const_child_range children() const
Definition ExprCXX.h:758
CXXBoolLiteralExpr(bool Val, QualType Ty, SourceLocation Loc)
Definition ExprCXX.h:725
SourceLocation getEndLoc() const
Definition ExprCXX.h:744
static bool classof(const Stmt *T)
Definition ExprCXX.h:749
static CXXBoolLiteralExpr * Create(const ASTContext &C, bool Val, QualType Ty, SourceLocation Loc)
Definition ExprCXX.h:735
bool getValue() const
Definition ExprCXX.h:740
CXXBoolLiteralExpr(EmptyShell Empty)
Definition ExprCXX.h:732
SourceLocation getBeginLoc() const
Definition ExprCXX.h:743
void setValue(bool V)
Definition ExprCXX.h:741
SourceLocation getLocation() const
Definition ExprCXX.h:746
void setLocation(SourceLocation L)
Definition ExprCXX.h:747
child_range children()
Definition ExprCXX.h:754
static bool classof(const Stmt *T)
Definition ExprCXX.h:589
friend class CastExpr
Definition ExprCXX.h:579
static CXXConstCastExpr * CreateEmpty(const ASTContext &Context)
friend TrailingObjects
Definition ExprCXX.h:580
Represents a call to a C++ constructor.
Definition ExprCXX.h:1548
arg_iterator arg_begin()
Definition ExprCXX.h:1677
bool hasUnusedResultAttr(const ASTContext &Ctx) const
Returns true if this call expression should warn on unused results.
Definition ExprCXX.h:1723
SourceRange getParenOrBraceRange() const
Definition ExprCXX.h:1729
void setElidable(bool E)
Definition ExprCXX.h:1618
const_arg_iterator arg_end() const
Definition ExprCXX.h:1680
void setStdInitListInitialization(bool V)
Definition ExprCXX.h:1644
void setConstructionKind(CXXConstructionKind CK)
Definition ExprCXX.h:1663
ExprIterator arg_iterator
Definition ExprCXX.h:1667
void setIsImmediateEscalating(bool Set)
Definition ExprCXX.h:1710
llvm::iterator_range< arg_iterator > arg_range
Definition ExprCXX.h:1669
bool isElidable() const
Whether this construction is elidable.
Definition ExprCXX.h:1617
Expr ** getArgs()
Definition ExprCXX.h:1682
bool hadMultipleCandidates() const
Whether the referred constructor was resolved from an overloaded set having size greater than 1.
Definition ExprCXX.h:1622
ConstExprIterator const_arg_iterator
Definition ExprCXX.h:1668
std::pair< const NamedDecl *, const WarnUnusedResultAttr * > getUnusedResultAttr(const ASTContext &Ctx) const
Returns the WarnUnusedResultAttr that is declared on the callee or its return type declaration,...
Definition ExprCXX.h:1718
child_range children()
Definition ExprCXX.h:1738
Expr * getArg(unsigned Arg)
Return the specified argument.
Definition ExprCXX.h:1691
CXXConstructExpr(StmtClass SC, QualType Ty, SourceLocation Loc, CXXConstructorDecl *Ctor, bool Elidable, ArrayRef< Expr * > Args, bool HadMultipleCandidates, bool ListInitialization, bool StdInitListInitialization, bool ZeroInitialization, CXXConstructionKind ConstructKind, SourceRange ParenOrBraceRange)
Build a C++ construction expression.
arg_range arguments()
Definition ExprCXX.h:1672
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
Definition ExprCXX.h:1641
void setListInitialization(bool V)
Definition ExprCXX.h:1633
bool isImmediateEscalating() const
Definition ExprCXX.h:1706
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called.
Definition ExprCXX.h:1650
void setRequiresZeroInitialization(bool ZeroInit)
Definition ExprCXX.h:1653
SourceLocation getLocation() const
Definition ExprCXX.h:1613
const_arg_range arguments() const
Definition ExprCXX.h:1673
arg_iterator arg_end()
Definition ExprCXX.h:1678
static unsigned sizeOfTrailingObjects(unsigned NumArgs)
Return the size in bytes of the trailing objects.
Definition ExprCXX.h:1594
void setArg(unsigned Arg, Expr *ArgExpr)
Set the specified argument.
Definition ExprCXX.h:1701
SourceLocation getEndLoc() const LLVM_READONLY
llvm::iterator_range< const_arg_iterator > const_arg_range
Definition ExprCXX.h:1670
SourceLocation getBeginLoc() const LLVM_READONLY
void setParenOrBraceRange(SourceRange Range)
Definition ExprCXX.h:1730
const_arg_iterator arg_begin() const
Definition ExprCXX.h:1679
const_child_range children() const
Definition ExprCXX.h:1742
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
Definition ExprCXX.h:1611
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
Definition ExprCXX.h:1630
unsigned getNumArgs() const
Return the number of arguments to the constructor call.
Definition ExprCXX.h:1688
CXXConstructionKind getConstructionKind() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
Definition ExprCXX.h:1659
void setHadMultipleCandidates(bool V)
Definition ExprCXX.h:1625
void setLocation(SourceLocation Loc)
Definition ExprCXX.h:1614
friend class ASTStmtReader
Definition ExprCXX.h:1549
const Expr * getArg(unsigned Arg) const
Definition ExprCXX.h:1695
const Expr *const * getArgs() const
Definition ExprCXX.h:1683
static bool classof(const Stmt *T)
Definition ExprCXX.h:1732
static CXXConstructExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs)
Create an empty C++ construction expression.
Represents a C++ constructor within a class.
A default argument (C++ [dcl.fct.default]).
Definition ExprCXX.h:1270
SourceLocation getEndLoc() const
Definition ExprCXX.h:1349
const_child_range children() const
Definition ExprCXX.h:1362
SourceLocation getBeginLoc() const
Default argument expressions have no representation in the source, so they have an empty source range...
Definition ExprCXX.h:1348
SourceLocation getUsedLocation() const
Retrieve the location where this default argument was actually used.
Definition ExprCXX.h:1344
ParmVarDecl * getParam()
Definition ExprCXX.h:1313
const ParmVarDecl * getParam() const
Definition ExprCXX.h:1312
friend class ASTReader
Definition ExprCXX.h:1272
const Expr * getExpr() const
Definition ExprCXX.h:1321
Expr * getRewrittenExpr()
Definition ExprCXX.h:1325
Expr * getAdjustedRewrittenExpr()
const Expr * getAdjustedRewrittenExpr() const
Definition ExprCXX.h:1336
DeclContext * getUsedContext()
Definition ExprCXX.h:1341
SourceLocation getExprLoc() const
Definition ExprCXX.h:1351
const DeclContext * getUsedContext() const
Definition ExprCXX.h:1340
const Expr * getRewrittenExpr() const
Definition ExprCXX.h:1329
static bool classof(const Stmt *T)
Definition ExprCXX.h:1353
static CXXDefaultArgExpr * CreateEmpty(const ASTContext &C, bool HasRewrittenInit)
child_range children()
Definition ExprCXX.h:1358
friend class ASTStmtReader
Definition ExprCXX.h:1271
bool hasRewrittenInit() const
Definition ExprCXX.h:1315
A use of a default initializer in a constructor or in aggregate initialization.
Definition ExprCXX.h:1377
static bool classof(const Stmt *T)
Definition ExprCXX.h:1444
const DeclContext * getUsedContext() const
Definition ExprCXX.h:1434
child_range children()
Definition ExprCXX.h:1449
const FieldDecl * getField() const
Definition ExprCXX.h:1412
const Expr * getRewrittenExpr() const
Retrieve the initializing expression with evaluated immediate calls, if any.
Definition ExprCXX.h:1422
const Expr * getExpr() const
Definition ExprCXX.h:1416
bool hasRewrittenInit() const
Definition ExprCXX.h:1406
Expr * getExpr()
Get the initialization expression that will be used.
FieldDecl * getField()
Get the field whose initializer will be used.
Definition ExprCXX.h:1411
static CXXDefaultInitExpr * CreateEmpty(const ASTContext &C, bool HasRewrittenInit)
Expr * getRewrittenExpr()
Retrieve the initializing expression with evaluated immediate calls, if any.
Definition ExprCXX.h:1429
friend class ASTReader
Definition ExprCXX.h:1380
SourceLocation getBeginLoc() const
Definition ExprCXX.h:1441
SourceLocation getEndLoc() const
Definition ExprCXX.h:1442
const_child_range children() const
Definition ExprCXX.h:1453
DeclContext * getUsedContext()
Definition ExprCXX.h:1435
SourceLocation getUsedLocation() const
Retrieve the location where this default initializer expression was actually used.
Definition ExprCXX.h:1439
friend class ASTStmtReader
Definition ExprCXX.h:1379
static bool classof(const Stmt *T)
Definition ExprCXX.h:2681
child_range children()
Definition ExprCXX.h:2686
FunctionDecl * getOperatorDelete() const
Definition ExprCXX.h:2665
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:2677
bool isArrayForm() const
Definition ExprCXX.h:2652
CXXDeleteExpr(EmptyShell Shell)
Definition ExprCXX.h:2649
const_child_range children() const
Definition ExprCXX.h:2688
SourceLocation getBeginLoc() const
Definition ExprCXX.h:2676
const Expr * getArgument() const
Definition ExprCXX.h:2668
bool isGlobalDelete() const
Definition ExprCXX.h:2651
friend class ASTStmtReader
Definition ExprCXX.h:2627
Expr * getArgument()
Definition ExprCXX.h:2667
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
Definition ExprCXX.h:2661
QualType getDestroyedType() const
Retrieve the type being destroyed.
bool isArrayFormAsWritten() const
Definition ExprCXX.h:2653
CXXDeleteExpr(QualType Ty, bool GlobalDelete, bool ArrayForm, bool ArrayFormAsWritten, bool UsualArrayDeleteWantsSize, FunctionDecl *OperatorDelete, Expr *Arg, SourceLocation Loc)
Definition ExprCXX.h:2636
child_range children()
Definition ExprCXX.h:4094
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '.
Definition ExprCXX.h:3969
SourceLocation getOperatorLoc() const
Retrieve the location of the '->' or '.' operator.
Definition ExprCXX.h:3972
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the member name.
Definition ExprCXX.h:3977
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
Definition ExprCXX.h:4024
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding the member name, if any.
Definition ExprCXX.h:4016
const DeclarationNameInfo & getMemberNameInfo() const
Retrieve the name of the member that this expression refers to.
Definition ExprCXX.h:4003
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:4075
void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const
Copies the template arguments (if present) into the given structure.
Definition ExprCXX.h:4047
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Definition ExprCXX.h:4064
const TemplateArgumentLoc * getTemplateArgs() const
Retrieve the template arguments provided as part of this template-id.
Definition ExprCXX.h:4055
bool hasExplicitTemplateArgs() const
Determines whether this member expression actually had a C++ template argument list explicitly specif...
Definition ExprCXX.h:4043
static CXXDependentScopeMemberExpr * CreateEmpty(const ASTContext &Ctx, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs, bool HasFirstQualifierFoundInScope)
SourceLocation getMemberLoc() const
Definition ExprCXX.h:4012
static bool classof(const Stmt *T)
Definition ExprCXX.h:4089
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
Definition ExprCXX.h:4032
QualType getBaseType() const
Definition ExprCXX.h:3965
DeclarationName getMember() const
Retrieve the name of the member that this expression refers to.
Definition ExprCXX.h:4008
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:4083
NamedDecl * getFirstQualifierFoundInScope() const
Retrieve the first part of the nested-name-specifier that was found in the scope of the member access...
Definition ExprCXX.h:3996
Expr * getBase() const
Retrieve the base object of this member expressions, e.g., the x in x.m.
Definition ExprCXX.h:3960
friend class ASTStmtWriter
Definition ExprCXX.h:3872
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the member name, with source location information.
Definition ExprCXX.h:3983
const_child_range children() const
Definition ExprCXX.h:4100
friend class ASTStmtReader
Definition ExprCXX.h:3871
bool hasTemplateKeyword() const
Determines whether the member name was preceded by the template keyword.
Definition ExprCXX.h:4039
bool isImplicitAccess() const
True if this is an implicit access, i.e.
Definition ExprCXX.h:3952
ArrayRef< TemplateArgumentLoc > template_arguments() const
Definition ExprCXX.h:4071
Represents a C++ destructor within a class.
friend TrailingObjects
Definition ExprCXX.h:496
static bool classof(const Stmt *T)
Definition ExprCXX.h:510
friend class CastExpr
Definition ExprCXX.h:495
static CXXDynamicCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
bool isAlwaysNull() const
isAlwaysNull - Return whether the result of the dynamic_cast is proven to always be null.
static bool classof(const Stmt *T)
Definition ExprCXX.h:5097
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:5081
UnresolvedLookupExpr * getCallee() const
Definition ExprCXX.h:5054
Expr * getInit() const
Get the operand that doesn't contain a pack, for a binary fold.
Definition ExprCXX.h:5072
CXXFoldExpr(EmptyShell Empty)
Definition ExprCXX.h:5052
CXXFoldExpr(QualType T, UnresolvedLookupExpr *Callee, SourceLocation LParenLoc, Expr *LHS, BinaryOperatorKind Opcode, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc, UnsignedOrNone NumExpansions)
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:5089
Expr * getRHS() const
Definition ExprCXX.h:5058
const_child_range children() const
Definition ExprCXX.h:5106
SourceLocation getLParenLoc() const
Definition ExprCXX.h:5074
SourceLocation getEllipsisLoc() const
Definition ExprCXX.h:5076
bool isLeftFold() const
Does this produce a left-associated sequence of operators?
Definition ExprCXX.h:5066
UnsignedOrNone getNumExpansions() const
Definition ExprCXX.h:5079
child_range children()
Definition ExprCXX.h:5102
bool isRightFold() const
Does this produce a right-associated sequence of operators?
Definition ExprCXX.h:5061
friend class ASTStmtWriter
Definition ExprCXX.h:5034
Expr * getPattern() const
Get the pattern, that is, the operand that contains an unexpanded pack.
Definition ExprCXX.h:5069
Expr * getLHS() const
Definition ExprCXX.h:5057
friend class ASTStmtReader
Definition ExprCXX.h:5033
SourceLocation getRParenLoc() const
Definition ExprCXX.h:5075
BinaryOperatorKind getOperator() const
Definition ExprCXX.h:5077
void setLParenLoc(SourceLocation L)
Definition ExprCXX.h:1869
SourceLocation getLParenLoc() const
Definition ExprCXX.h:1868
static CXXFunctionalCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize, bool HasFPFeatures)
SourceLocation getRParenLoc() const
Definition ExprCXX.h:1870
SourceLocation getBeginLoc() const LLVM_READONLY
void setRParenLoc(SourceLocation L)
Definition ExprCXX.h:1871
static bool classof(const Stmt *T)
Definition ExprCXX.h:1879
bool isListInitialization() const
Determine whether this expression models list-initialization.
Definition ExprCXX.h:1874
SourceLocation getEndLoc() const LLVM_READONLY
friend class CastExpr
Definition ExprCXX.h:1857
friend TrailingObjects
Definition ExprCXX.h:1858
CXXInheritedCtorInitExpr(EmptyShell Empty)
Construct an empty C++ inheriting construction expression.
Definition ExprCXX.h:1783
const_child_range children() const
Definition ExprCXX.h:1816
CXXConstructionKind getConstructionKind() const
Definition ExprCXX.h:1793
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:1805
child_range children()
Definition ExprCXX.h:1812
static bool classof(const Stmt *T)
Definition ExprCXX.h:1808
bool constructsVBase() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
Definition ExprCXX.h:1792
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will call.
Definition ExprCXX.h:1788
CXXInheritedCtorInitExpr(SourceLocation Loc, QualType T, CXXConstructorDecl *Ctor, bool ConstructsVirtualBase, bool InheritedFromVirtualBase)
Construct a C++ inheriting construction expression.
Definition ExprCXX.h:1771
SourceLocation getLocation() const LLVM_READONLY
Definition ExprCXX.h:1804
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:1806
friend class ASTStmtReader
Definition ExprCXX.h:1768
bool inheritedFromVBase() const
Determine whether the inherited constructor is inherited from a virtual base of the object we constru...
Definition ExprCXX.h:1802
CXXMethodDecl * getMethodDecl() const
Retrieve the declaration of the called method.
Expr * getImplicitObjectArgument() const
Retrieve the implicit object argument for the member call.
static CXXMemberCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty)
QualType getObjectType() const
Retrieve the type of the object argument.
SourceLocation getExprLoc() const LLVM_READONLY
Definition ExprCXX.h:220
static bool classof(const Stmt *T)
Definition ExprCXX.h:228
CXXRecordDecl * getRecordDecl() const
Retrieve the CXXRecordDecl for the underlying type of the implicit object argument.
Represents a static or instance method of a struct/union/class.
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:411
SourceLocation getOperatorLoc() const
Retrieve the location of the cast operator keyword, e.g., static_cast.
Definition ExprCXX.h:406
const char * getCastName() const
getCastName - Get the name of the C++ cast being used, e.g., "static_cast", "dynamic_cast",...
CXXNamedCastExpr(StmtClass SC, QualType ty, ExprValueKind VK, CastKind kind, Expr *op, unsigned PathSize, bool HasFPFeatures, TypeSourceInfo *writtenTy, SourceLocation l, SourceLocation RParenLoc, SourceRange AngleBrackets)
Definition ExprCXX.h:389
static bool classof(const Stmt *T)
Definition ExprCXX.h:415
CXXNamedCastExpr(StmtClass SC, EmptyShell Shell, unsigned PathSize, bool HasFPFeatures)
Definition ExprCXX.h:397
SourceRange getAngleBrackets() const LLVM_READONLY
Definition ExprCXX.h:413
friend class ASTStmtReader
Definition ExprCXX.h:387
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:412
SourceLocation getRParenLoc() const
Retrieve the location of the closing parenthesis.
Definition ExprCXX.h:409
static CXXNewExpr * CreateEmpty(const ASTContext &Ctx, bool IsArray, bool HasInit, unsigned NumPlacementArgs, bool IsParenTypeId)
Create an empty c++ new expression.
bool isArray() const
Definition ExprCXX.h:2464
SourceRange getDirectInitRange() const
Definition ExprCXX.h:2609
llvm::iterator_range< arg_iterator > placement_arguments()
Definition ExprCXX.h:2572
ExprIterator arg_iterator
Definition ExprCXX.h:2569
QualType getAllocatedType() const
Definition ExprCXX.h:2434
unsigned getNumImplicitArgs() const
Definition ExprCXX.h:2511
arg_iterator placement_arg_end()
Definition ExprCXX.h:2583
std::optional< const Expr * > getArraySize() const
This might return std::nullopt even if isArray() returns true, since there might not be an array size...
Definition ExprCXX.h:2483
const_arg_iterator placement_arg_begin() const
Definition ExprCXX.h:2586
std::optional< Expr * > getArraySize()
This might return std::nullopt even if isArray() returns true, since there might not be an array size...
Definition ExprCXX.h:2469
SourceLocation getEndLoc() const
Definition ExprCXX.h:2607
CXXNewInitializationStyle getInitializationStyle() const
The kind of initializer this new-expression has.
Definition ExprCXX.h:2527
ImplicitAllocationParameters implicitAllocationParameters() const
Provides the full set of information about expected implicit parameters in this call.
Definition ExprCXX.h:2562
Expr * getPlacementArg(unsigned I)
Definition ExprCXX.h:2503
bool hasInitializer() const
Whether this new-expression has any initializer at all.
Definition ExprCXX.h:2524
const Expr * getInitializer() const
Definition ExprCXX.h:2538
bool shouldNullCheckAllocation() const
True if the allocation result needs to be null-checked.
const Expr * getPlacementArg(unsigned I) const
Definition ExprCXX.h:2507
static bool classof(const Stmt *T)
Definition ExprCXX.h:2612
SourceLocation getBeginLoc() const
Definition ExprCXX.h:2606
Stmt ** raw_arg_iterator
Definition ExprCXX.h:2593
void setOperatorDelete(FunctionDecl *D)
Definition ExprCXX.h:2462
bool passAlignment() const
Indicates whether the required alignment should be implicitly passed to the allocation function.
Definition ExprCXX.h:2551
FunctionDecl * getOperatorDelete() const
Definition ExprCXX.h:2461
unsigned getNumPlacementArgs() const
Definition ExprCXX.h:2494
const CXXConstructExpr * getConstructExpr() const
Returns the CXXConstructExpr from this new-expression, or null.
Definition ExprCXX.h:2545
llvm::iterator_range< const_arg_iterator > placement_arguments() const
Definition ExprCXX.h:2576
const_arg_iterator placement_arg_end() const
Definition ExprCXX.h:2589
TypeSourceInfo * getAllocatedTypeSourceInfo() const
Definition ExprCXX.h:2438
SourceRange getSourceRange() const
Definition ExprCXX.h:2610
SourceRange getTypeIdParens() const
Definition ExprCXX.h:2516
Expr ** getPlacementArgs()
Definition ExprCXX.h:2498
bool isParenTypeId() const
Definition ExprCXX.h:2515
raw_arg_iterator raw_arg_end()
Definition ExprCXX.h:2596
child_range children()
Definition ExprCXX.h:2617
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
Definition ExprCXX.h:2556
const_arg_iterator raw_arg_end() const
Definition ExprCXX.h:2602
const_child_range children() const
Definition ExprCXX.h:2619
friend class ASTStmtWriter
Definition ExprCXX.h:2357
arg_iterator placement_arg_begin()
Definition ExprCXX.h:2580
raw_arg_iterator raw_arg_begin()
Definition ExprCXX.h:2595
void setOperatorNew(FunctionDecl *D)
Definition ExprCXX.h:2460
friend class ASTStmtReader
Definition ExprCXX.h:2356
FunctionDecl * getOperatorNew() const
Definition ExprCXX.h:2459
const_arg_iterator raw_arg_begin() const
Definition ExprCXX.h:2599
ConstExprIterator const_arg_iterator
Definition ExprCXX.h:2570
bool isGlobalNew() const
Definition ExprCXX.h:2521
Expr * getInitializer()
The initializer of this new-expression.
Definition ExprCXX.h:2533
bool getValue() const
Definition ExprCXX.h:4332
static bool classof(const Stmt *T)
Definition ExprCXX.h:4334
const_child_range children() const
Definition ExprCXX.h:4341
SourceLocation getEndLoc() const
Definition ExprCXX.h:4329
Expr * getOperand() const
Definition ExprCXX.h:4326
SourceLocation getBeginLoc() const
Definition ExprCXX.h:4328
SourceRange getSourceRange() const
Definition ExprCXX.h:4330
CXXNoexceptExpr(EmptyShell Empty)
Definition ExprCXX.h:4324
CXXNoexceptExpr(QualType Ty, Expr *Operand, CanThrowResult Val, SourceLocation Keyword, SourceLocation RParen)
Definition ExprCXX.h:4316
child_range children()
Definition ExprCXX.h:4339
friend class ASTStmtReader
Definition ExprCXX.h:4310
const_child_range children() const
Definition ExprCXX.h:793
CXXNullPtrLiteralExpr(EmptyShell Empty)
Definition ExprCXX.h:776
void setLocation(SourceLocation L)
Definition ExprCXX.h:783
SourceLocation getEndLoc() const
Definition ExprCXX.h:780
static bool classof(const Stmt *T)
Definition ExprCXX.h:785
CXXNullPtrLiteralExpr(QualType Ty, SourceLocation Loc)
Definition ExprCXX.h:770
SourceLocation getLocation() const
Definition ExprCXX.h:782
child_range children()
Definition ExprCXX.h:789
SourceLocation getBeginLoc() const
Definition ExprCXX.h:779
bool isInfixBinaryOp() const
Is this written as an infix binary operator?
bool isAssignmentOp() const
Definition ExprCXX.h:126
static bool classof(const Stmt *T)
Definition ExprCXX.h:166
SourceLocation getOperatorLoc() const
Returns the location of the operator symbol in the expression.
Definition ExprCXX.h:152
SourceLocation getEndLoc() const
Definition ExprCXX.h:163
SourceLocation getExprLoc() const LLVM_READONLY
Definition ExprCXX.h:154
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
Definition ExprCXX.h:114
static CXXOperatorCallExpr * Create(const ASTContext &Ctx, OverloadedOperatorKind OpKind, Expr *Fn, ArrayRef< Expr * > Args, QualType Ty, ExprValueKind VK, SourceLocation OperatorLoc, FPOptionsOverride FPFeatures, ADLCallKind UsesADL=NotADL)
friend class ASTStmtWriter
Definition ExprCXX.h:86
static CXXOperatorCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty)
friend class ASTStmtReader
Definition ExprCXX.h:85
SourceLocation getBeginLoc() const
Definition ExprCXX.h:162
static bool isComparisonOp(OverloadedOperatorKind Opc)
Definition ExprCXX.h:128
static bool isAssignmentOp(OverloadedOperatorKind Opc)
Definition ExprCXX.h:119
bool isComparisonOp() const
Definition ExprCXX.h:142
SourceRange getSourceRange() const
Definition ExprCXX.h:164
ArrayRef< Expr * > getInitExprs() const
Definition ExprCXX.h:5185
SourceRange getSourceRange() const LLVM_READONLY
Definition ExprCXX.h:5201
void updateDependence()
Definition ExprCXX.h:5179
const_child_range children() const
Definition ExprCXX.h:5232
void setInitializedFieldInUnion(FieldDecl *FD)
Definition ExprCXX.h:5215
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:5197
SourceLocation getInitLoc() const LLVM_READONLY
Definition ExprCXX.h:5199
MutableArrayRef< Expr * > getInitExprs()
Definition ExprCXX.h:5181
ArrayRef< Expr * > getUserSpecifiedInitExprs()
Definition ExprCXX.h:5187
ArrayRef< Expr * > getUserSpecifiedInitExprs() const
Definition ExprCXX.h:5191
CXXParenListInitExpr(EmptyShell Empty, unsigned NumExprs)
Definition ExprCXX.h:5175
friend class TrailingObjects
Definition ExprCXX.h:5142
static CXXParenListInitExpr * CreateEmpty(ASTContext &C, unsigned numExprs, EmptyShell Empty)
const FieldDecl * getInitializedFieldInUnion() const
Definition ExprCXX.h:5223
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:5195
static bool classof(const Stmt *T)
Definition ExprCXX.h:5237
friend class ASTStmtWriter
Definition ExprCXX.h:5144
Expr * getArrayFiller()
Definition ExprCXX.h:5207
friend class ASTStmtReader
Definition ExprCXX.h:5143
FieldDecl * getInitializedFieldInUnion()
Definition ExprCXX.h:5219
const Expr * getArrayFiller() const
Definition ExprCXX.h:5211
child_range children()
Definition ExprCXX.h:5227
void setArrayFiller(Expr *E)
Definition ExprCXX.h:5205
TypeSourceInfo * getDestroyedTypeInfo() const
Retrieve the source location information for the type being destroyed.
Definition ExprCXX.h:2839
Expr * getBase() const
Definition ExprCXX.h:2789
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:2869
bool isArrow() const
Determine whether this pseudo-destructor expression was written using an '->' (otherwise,...
Definition ExprCXX.h:2809
TypeSourceInfo * getScopeTypeInfo() const
Retrieve the scope type in a qualified pseudo-destructor expression.
Definition ExprCXX.h:2823
CXXPseudoDestructorExpr(const ASTContext &Context, Expr *Base, bool isArrow, SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc, TypeSourceInfo *ScopeType, SourceLocation ColonColonLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage DestroyedType)
static bool classof(const Stmt *T)
Definition ExprCXX.h:2874
child_range children()
Definition ExprCXX.h:2879
SourceLocation getTildeLoc() const
Retrieve the location of the '~'.
Definition ExprCXX.h:2830
NestedNameSpecifierLoc getQualifierLoc() const
Retrieves the nested-name-specifier that qualifies the type name, with source-location information.
Definition ExprCXX.h:2798
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getDestroyedTypeLoc() const
Retrieve the starting location of the type being destroyed.
Definition ExprCXX.h:2854
SourceLocation getColonColonLoc() const
Retrieve the location of the '::' in a qualified pseudo-destructor expression.
Definition ExprCXX.h:2827
const_child_range children() const
Definition ExprCXX.h:2881
QualType getDestroyedType() const
Retrieve the type being destroyed.
SourceLocation getOperatorLoc() const
Retrieve the location of the '.' or '->' operator.
Definition ExprCXX.h:2812
NestedNameSpecifier getQualifier() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name.
Definition ExprCXX.h:2803
void setDestroyedType(IdentifierInfo *II, SourceLocation Loc)
Set the name of destroyed type for a dependent pseudo-destructor expression.
Definition ExprCXX.h:2860
const IdentifierInfo * getDestroyedTypeIdentifier() const
In a dependent pseudo-destructor expression for which we do not have full type information on the des...
Definition ExprCXX.h:2846
void setDestroyedType(TypeSourceInfo *Info)
Set the destroyed type.
Definition ExprCXX.h:2865
bool hasQualifier() const
Determines whether this member expression actually had a C++ nested-name-specifier prior to the name ...
Definition ExprCXX.h:2794
friend class ASTStmtReader
Definition ExprCXX.h:2746
CXXPseudoDestructorExpr(EmptyShell Shell)
Definition ExprCXX.h:2786
Represents a C++ struct/union/class.
friend TrailingObjects
Definition ExprCXX.h:541
static bool classof(const Stmt *T)
Definition ExprCXX.h:552
friend class CastExpr
Definition ExprCXX.h:540
static CXXReinterpretCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
Expr * getSemanticForm()
Get an equivalent semantic form for this expression.
Definition ExprCXX.h:304
SourceLocation getOperatorLoc() const LLVM_READONLY
Definition ExprCXX.h:338
BinaryOperatorKind getOperator() const
Definition ExprCXX.h:324
bool isComparisonOp() const
Definition ExprCXX.h:332
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:350
SourceRange getSourceRange() const LLVM_READONLY
Definition ExprCXX.h:353
bool isReversed() const
Determine whether this expression was rewritten in reverse form.
Definition ExprCXX.h:322
child_range children()
Definition ExprCXX.h:359
CXXRewrittenBinaryOperator(Expr *SemanticForm, bool IsReversed)
Definition ExprCXX.h:293
const Expr * getLHS() const
Definition ExprCXX.h:335
StringRef getOpcodeStr() const
Definition ExprCXX.h:329
CXXRewrittenBinaryOperator(EmptyShell Empty)
Definition ExprCXX.h:300
SourceLocation getBeginLoc() const LLVM_READONLY
Compute the begin and end locations from the decomposed form.
Definition ExprCXX.h:347
SourceLocation getExprLoc() const LLVM_READONLY
Definition ExprCXX.h:341
const Expr * getRHS() const
Definition ExprCXX.h:336
static bool classof(const Stmt *T)
Definition ExprCXX.h:363
BinaryOperatorKind getOpcode() const
Definition ExprCXX.h:325
friend class ASTStmtReader
Definition ExprCXX.h:287
bool isAssignmentOp() const
Definition ExprCXX.h:333
static StringRef getOpcodeStr(BinaryOperatorKind Op)
Definition ExprCXX.h:326
DecomposedForm getDecomposedForm() const LLVM_READONLY
Decompose this operator into its syntactic form.
const Expr * getSemanticForm() const
Definition ExprCXX.h:305
CXXScalarValueInitExpr(EmptyShell Shell)
Definition ExprCXX.h:2212
const_child_range children() const
Definition ExprCXX.h:2235
TypeSourceInfo * getTypeSourceInfo() const
Definition ExprCXX.h:2215
SourceLocation getBeginLoc() const LLVM_READONLY
static bool classof(const Stmt *T)
Definition ExprCXX.h:2226
child_range children()
Definition ExprCXX.h:2231
friend class ASTStmtReader
Definition ExprCXX.h:2197
SourceLocation getEndLoc() const
Definition ExprCXX.h:2224
SourceLocation getRParenLoc() const
Definition ExprCXX.h:2219
CXXScalarValueInitExpr(QualType Type, TypeSourceInfo *TypeInfo, SourceLocation RParenLoc)
Create an explicitly-written scalar-value initialization expression.
Definition ExprCXX.h:2204
static CXXStaticCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize, bool hasFPFeatures)
friend TrailingObjects
Definition ExprCXX.h:459
friend class CastExpr
Definition ExprCXX.h:458
static bool classof(const Stmt *T)
Definition ExprCXX.h:469
child_range children()
Definition ExprCXX.h:836
SourceRange getSourceRange() const LLVM_READONLY
Retrieve the source range of the expression.
Definition ExprCXX.h:828
friend class ASTReader
Definition ExprCXX.h:807
const_child_range children() const
Definition ExprCXX.h:838
CXXStdInitializerListExpr(QualType Ty, Expr *SubExpr)
Definition ExprCXX.h:810
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:823
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:819
const Expr * getSubExpr() const
Definition ExprCXX.h:817
friend class ASTStmtReader
Definition ExprCXX.h:808
Expr * getSubExpr()
Definition ExprCXX.h:816
static bool classof(const Stmt *S)
Definition ExprCXX.h:832
TypeSourceInfo * getTypeSourceInfo() const
Definition ExprCXX.h:1928
SourceLocation getEndLoc() const LLVM_READONLY
static CXXTemporaryObjectExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs)
static bool classof(const Stmt *T)
Definition ExprCXX.h:1933
SourceLocation getBeginLoc() const LLVM_READONLY
friend class ASTStmtReader
Definition ExprCXX.h:1900
Represents a C++ temporary.
Definition ExprCXX.h:1459
const CXXDestructorDecl * getDestructor() const
Definition ExprCXX.h:1470
void setDestructor(const CXXDestructorDecl *Dtor)
Definition ExprCXX.h:1472
void setCapturedByCopyInLambdaWithExplicitObjectParameter(bool Set)
Definition ExprCXX.h:1184
SourceLocation getBeginLoc() const
Definition ExprCXX.h:1174
void setLocation(SourceLocation L)
Definition ExprCXX.h:1172
SourceLocation getEndLoc() const
Definition ExprCXX.h:1175
bool isCapturedByCopyInLambdaWithExplicitObjectParameter() const
Definition ExprCXX.h:1180
static CXXThisExpr * CreateEmpty(const ASTContext &Ctx)
void setImplicit(bool I)
Definition ExprCXX.h:1178
child_range children()
Definition ExprCXX.h:1194
bool isImplicit() const
Definition ExprCXX.h:1177
static bool classof(const Stmt *T)
Definition ExprCXX.h:1189
const_child_range children() const
Definition ExprCXX.h:1198
SourceLocation getLocation() const
Definition ExprCXX.h:1171
CXXThrowExpr(EmptyShell Empty)
Definition ExprCXX.h:1226
const_child_range children() const
Definition ExprCXX.h:1258
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:1243
const Expr * getSubExpr() const
Definition ExprCXX.h:1228
CXXThrowExpr(Expr *Operand, QualType Ty, SourceLocation Loc, bool IsThrownVariableInScope)
Definition ExprCXX.h:1219
SourceLocation getThrowLoc() const
Definition ExprCXX.h:1231
Expr * getSubExpr()
Definition ExprCXX.h:1229
SourceLocation getBeginLoc() const
Definition ExprCXX.h:1242
bool isThrownVariableInScope() const
Determines whether the variable thrown by this expression (if any!) is within the innermost try block...
Definition ExprCXX.h:1238
static bool classof(const Stmt *T)
Definition ExprCXX.h:1249
child_range children()
Definition ExprCXX.h:1254
friend class ASTStmtReader
Definition ExprCXX.h:1209
CXXTypeidExpr(QualType Ty, Expr *Operand, SourceRange R)
Definition ExprCXX.h:862
static bool classof(const Stmt *T)
Definition ExprCXX.h:905
CXXTypeidExpr(QualType Ty, TypeSourceInfo *Operand, SourceRange R)
Definition ExprCXX.h:856
bool isTypeOperand() const
Definition ExprCXX.h:884
QualType getTypeOperand(const ASTContext &Context) const
Retrieves the type operand of this typeid() expression after various required adjustments (removing r...
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Definition ExprCXX.h:891
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:900
Expr * getExprOperand() const
Definition ExprCXX.h:895
child_range children()
Definition ExprCXX.h:910
SourceRange getSourceRange() const LLVM_READONLY
Definition ExprCXX.h:902
bool isMostDerived(const ASTContext &Context) const
Best-effort check if the expression operand refers to a most derived object.
void setSourceRange(SourceRange R)
Definition ExprCXX.h:903
const_child_range children() const
Definition ExprCXX.h:917
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:901
friend class ASTStmtReader
Definition ExprCXX.h:849
bool isPotentiallyEvaluated() const
Determine whether this typeid has a type operand which is potentially evaluated, per C++11 [expr....
CXXTypeidExpr(EmptyShell Empty, bool isExpr)
Definition ExprCXX.h:868
bool hasNullCheck() const
Whether this is of a form like "typeid(*ptr)" that can throw a std::bad_typeid if a pointer is a null...
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Definition ExprCXX.h:3744
const_child_range children() const
Definition ExprCXX.h:3852
arg_range arguments()
Definition ExprCXX.h:3809
const Expr *const * const_arg_iterator
Definition ExprCXX.h:3811
void setRParenLoc(SourceLocation L)
Definition ExprCXX.h:3794
void setArg(unsigned I, Expr *E)
Definition ExprCXX.h:3830
SourceLocation getLParenLoc() const
Retrieve the location of the left parentheses ('(') that precedes the argument list.
Definition ExprCXX.h:3788
bool isListInitialization() const
Determine whether this expression models list-initialization.
Definition ExprCXX.h:3799
TypeSourceInfo * getTypeSourceInfo() const
Retrieve the type source information for the type being constructed.
Definition ExprCXX.h:3782
const_arg_range arguments() const
Definition ExprCXX.h:3816
QualType getTypeAsWritten() const
Retrieve the type that is being constructed, as specified in the source code.
Definition ExprCXX.h:3778
const_arg_iterator arg_end() const
Definition ExprCXX.h:3815
child_range children()
Definition ExprCXX.h:3847
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:3836
llvm::iterator_range< const_arg_iterator > const_arg_range
Definition ExprCXX.h:3812
void setLParenLoc(SourceLocation L)
Definition ExprCXX.h:3789
Expr ** arg_iterator
Definition ExprCXX.h:3804
const Expr * getArg(unsigned I) const
Definition ExprCXX.h:3825
Expr * getArg(unsigned I)
Definition ExprCXX.h:3820
SourceLocation getRParenLoc() const
Retrieve the location of the right parentheses (')') that follows the argument list.
Definition ExprCXX.h:3793
arg_iterator arg_begin()
Definition ExprCXX.h:3807
SourceLocation getBeginLoc() const LLVM_READONLY
friend class ASTStmtReader
Definition ExprCXX.h:3745
unsigned getNumArgs() const
Retrieve the number of arguments.
Definition ExprCXX.h:3802
static bool classof(const Stmt *T)
Definition ExprCXX.h:3842
static CXXUnresolvedConstructExpr * CreateEmpty(const ASTContext &Context, unsigned NumArgs)
llvm::iterator_range< arg_iterator > arg_range
Definition ExprCXX.h:3805
const_arg_iterator arg_begin() const
Definition ExprCXX.h:3814
arg_iterator arg_end()
Definition ExprCXX.h:3808
child_range children()
Definition ExprCXX.h:1126
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:1116
static bool classof(const Stmt *T)
Definition ExprCXX.h:1121
const_child_range children() const
Definition ExprCXX.h:1133
Expr * getExprOperand() const
Definition ExprCXX.h:1109
CXXUuidofExpr(QualType Ty, TypeSourceInfo *Operand, MSGuidDecl *Guid, SourceRange R)
Definition ExprCXX.h:1077
MSGuidDecl * getGuidDecl() const
Definition ExprCXX.h:1114
QualType getTypeOperand(ASTContext &Context) const
Retrieves the type operand of this __uuidof() expression after various required adjustments (removing...
bool isTypeOperand() const
Definition ExprCXX.h:1098
CXXUuidofExpr(QualType Ty, Expr *Operand, MSGuidDecl *Guid, SourceRange R)
Definition ExprCXX.h:1084
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Definition ExprCXX.h:1105
void setSourceRange(SourceRange R)
Definition ExprCXX.h:1119
friend class ASTStmtReader
Definition ExprCXX.h:1069
SourceRange getSourceRange() const LLVM_READONLY
Definition ExprCXX.h:1118
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:1117
CXXUuidofExpr(EmptyShell Empty, bool isExpr)
Definition ExprCXX.h:1090
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Expr * getArg(unsigned Arg)
getArg - Return the specified argument.
static constexpr ADLCallKind NotADL
SourceLocation getBeginLoc() const
CallExpr(StmtClass SC, Expr *Fn, ArrayRef< Expr * > PreArgs, ArrayRef< Expr * > Args, QualType Ty, ExprValueKind VK, SourceLocation RParenLoc, FPOptionsOverride FPFeatures, unsigned MinNumArgs, ADLCallKind UsesADL)
Build a call expression, assuming that appropriate storage has been allocated for the trailing object...
SourceLocation getRParenLoc() const
static constexpr ADLCallKind UsesADL
Stmt * getPreArg(unsigned I)
FPOptionsOverride * getTrailingFPFeatures()
Return a pointer to the trailing FPOptions.
unsigned path_size() const
bool hasStoredFPFeatures() const
void setIsImplicit(bool value=true)
Definition ExprCXX.h:5392
bool isImplicit() const
Definition ExprCXX.h:5391
static bool classof(const Stmt *T)
Definition ExprCXX.h:5394
CoawaitExpr(EmptyShell Empty)
Definition ExprCXX.h:5388
friend class ASTStmtReader
Definition ExprCXX.h:5370
CoawaitExpr(SourceLocation CoawaitLoc, QualType Ty, Expr *Operand, Expr *Common, bool IsImplicit=false)
Definition ExprCXX.h:5381
CoawaitExpr(SourceLocation CoawaitLoc, Expr *Operand, Expr *Common, Expr *Ready, Expr *Suspend, Expr *Resume, OpaqueValueExpr *OpaqueValue, bool IsImplicit=false)
Definition ExprCXX.h:5373
CompoundStmt - This represents a group of statements like { stmt stmt }.
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
llvm::APSInt getResultAsAPSInt() const
SuspendReturnType getSuspendReturnType() const
Definition ExprCXX.h:5328
CoroutineSuspendExpr(StmtClass SC, SourceLocation KeywordLoc, Expr *Operand, Expr *Common, Expr *Ready, Expr *Suspend, Expr *Resume, OpaqueValueExpr *OpaqueValue)
Definition ExprCXX.h:5269
Expr * getReadyExpr() const
Definition ExprCXX.h:5311
SourceLocation getKeywordLoc() const
Definition ExprCXX.h:5346
Expr * getResumeExpr() const
Definition ExprCXX.h:5319
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:5348
Expr * getSuspendExpr() const
Definition ExprCXX.h:5315
CoroutineSuspendExpr(StmtClass SC, SourceLocation KeywordLoc, QualType Ty, Expr *Operand, Expr *Common)
Definition ExprCXX.h:5283
SuspendReturnType
Definition ExprCXX.h:5267
@ SuspendBool
Definition ExprCXX.h:5267
@ SuspendHandle
Definition ExprCXX.h:5267
@ SuspendVoid
Definition ExprCXX.h:5267
static bool classof(const Stmt *T)
Definition ExprCXX.h:5362
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
Definition ExprCXX.h:5309
Expr * getCommonExpr() const
Definition ExprCXX.h:5304
Expr * getOperand() const
Definition ExprCXX.h:5324
const_child_range children() const
Definition ExprCXX.h:5358
child_range children()
Definition ExprCXX.h:5354
CoroutineSuspendExpr(StmtClass SC, EmptyShell Empty)
Definition ExprCXX.h:5296
friend class ASTStmtReader
Definition ExprCXX.h:5256
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:5350
CoyieldExpr(EmptyShell Empty)
Definition ExprCXX.h:5463
CoyieldExpr(SourceLocation CoyieldLoc, Expr *Operand, Expr *Common, Expr *Ready, Expr *Suspend, Expr *Resume, OpaqueValueExpr *OpaqueValue)
Definition ExprCXX.h:5454
static bool classof(const Stmt *T)
Definition ExprCXX.h:5466
CoyieldExpr(SourceLocation CoyieldLoc, QualType Ty, Expr *Operand, Expr *Common)
Definition ExprCXX.h:5459
friend class ASTStmtReader
Definition ExprCXX.h:5451
A POD class for pairing a NamedDecl* with an access specifier.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Decl - This represents one declaration (or definition), e.g.
The name of a declaration.
static bool classof(const Stmt *T)
Definition ExprCXX.h:5444
DependentCoawaitExpr(EmptyShell Empty)
Definition ExprCXX.h:5421
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:5434
const_child_range children() const
Definition ExprCXX.h:5440
Expr * getOperand() const
Definition ExprCXX.h:5424
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:5432
DependentCoawaitExpr(SourceLocation KeywordLoc, QualType Ty, Expr *Op, UnresolvedLookupExpr *OpCoawait)
Definition ExprCXX.h:5408
friend class ASTStmtReader
Definition ExprCXX.h:5402
SourceLocation getKeywordLoc() const
Definition ExprCXX.h:5430
child_range children()
Definition ExprCXX.h:5438
UnresolvedLookupExpr * getOperatorCoawaitLookup() const
Definition ExprCXX.h:5426
child_range children()
Definition ExprCXX.h:3638
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
Definition ExprCXX.h:3584
static DependentScopeDeclRefExpr * CreateEmpty(const ASTContext &Context, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source location information.
Definition ExprCXX.h:3558
SourceLocation getLocation() const
Retrieve the location of the name within the expression.
Definition ExprCXX.h:3554
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
Definition ExprCXX.h:3576
ArrayRef< TemplateArgumentLoc > template_arguments() const
Definition ExprCXX.h:3618
const_child_range children() const
Definition ExprCXX.h:3642
static bool classof(const Stmt *T)
Definition ExprCXX.h:3634
bool hasExplicitTemplateArgs() const
Determines whether this lookup had explicit template arguments.
Definition ExprCXX.h:3594
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:3628
SourceLocation getBeginLoc() const LLVM_READONLY
Note: getBeginLoc() is the start of the whole DependentScopeDeclRefExpr, and differs from getLocation...
Definition ExprCXX.h:3624
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies this declaration.
Definition ExprCXX.h:3562
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding this name, if any.
Definition ExprCXX.h:3568
bool hasTemplateKeyword() const
Determines whether the name was preceded by the template keyword.
Definition ExprCXX.h:3591
friend class ASTStmtWriter
Definition ExprCXX.h:3512
unsigned getNumTemplateArgs() const
Definition ExprCXX.h:3611
DeclarationName getDeclName() const
Retrieve the name that this expression refers to.
Definition ExprCXX.h:3549
TemplateArgumentLoc const * getTemplateArgs() const
Definition ExprCXX.h:3604
void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const
Copies the template arguments (if present) into the given structure.
Definition ExprCXX.h:3598
friend class ASTStmtReader
Definition ExprCXX.h:3511
const DeclarationNameInfo & getNameInfo() const
Retrieve the name that this expression refers to.
Definition ExprCXX.h:3546
ExplicitCastExpr(StmtClass SC, QualType exprTy, ExprValueKind VK, CastKind kind, Expr *op, unsigned PathSize, bool HasFPFeatures, TypeSourceInfo *writtenTy)
bool cleanupsHaveSideEffects() const
Definition ExprCXX.h:3696
static bool classof(const Stmt *T)
Definition ExprCXX.h:3709
CleanupObject getObject(unsigned i) const
Definition ExprCXX.h:3691
child_range children()
Definition ExprCXX.h:3714
ArrayRef< CleanupObject > getObjects() const
Definition ExprCXX.h:3685
unsigned getNumObjects() const
Definition ExprCXX.h:3689
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:3704
friend class ASTStmtReader
Definition ExprCXX.h:3670
const_child_range children() const
Definition ExprCXX.h:3716
llvm::PointerUnion< BlockDecl *, CompoundLiteralExpr * > CleanupObject
The type of objects that are kept in the cleanup.
Definition ExprCXX.h:3667
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:3700
This represents one expression.
static std::pair< const NamedDecl *, const WarnUnusedResultAttr * > getUnusedResultAttrImpl(const Decl *Callee, QualType ReturnType)
Returns the WarnUnusedResultAttr that is declared on the callee or its return type declaration,...
bool isImplicitCXXThis() const
Whether this expression is an implicit reference to 'this' in C++.
bool isValueDependent() const
Determines whether the value of this expression depends on.
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
bool isTypeDependent() const
Determines whether the type of this expression depends on.
bool containsUnexpandedParameterPack() const
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates).
Expr * IgnoreParens() LLVM_READONLY
Skip past any parentheses which might surround this expression until reaching a fixed point.
bool isLValue() const
isLValue - True if this expression is an "l-value" according to the rules of the current language.
ExprObjectKind getObjectKind() const
getObjectKind - The object kind that this expression produces.
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on.
void setValueKind(ExprValueKind Cat)
setValueKind - Set the value kind produced by this expression.
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
static ExprValueKind getValueKindForType(QualType T)
getValueKindForType - Given a formal return or parameter type, give its value kind.
void setDependence(ExprDependence Deps)
Each concrete expr subclass is expected to compute its dependence and call this in the constructor.
ExpressionTraitExpr(SourceLocation loc, ExpressionTrait et, Expr *queried, bool value, SourceLocation rparen, QualType resultType)
Definition ExprCXX.h:3082
static bool classof(const Stmt *T)
Definition ExprCXX.h:3112
ExpressionTraitExpr(EmptyShell Empty)
Definition ExprCXX.h:3095
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:3101
Expr * getQueriedExpression() const
Definition ExprCXX.h:3108
ExpressionTrait getTrait() const
Definition ExprCXX.h:3104
bool getValue() const
Definition ExprCXX.h:3110
friend class ASTStmtReader
Definition ExprCXX.h:3080
child_range children()
Definition ExprCXX.h:3117
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:3102
const_child_range children() const
Definition ExprCXX.h:3121
Represents difference between two FPOptions values.
bool requiresTrailingStorage() const
Represents a member of a struct/union/class.
FullExpr(StmtClass SC, Expr *subexpr)
Represents a function declaration or definition.
const_child_range children() const
Definition ExprCXX.h:4895
ValueDecl * getExpansion(unsigned I) const
Get an expansion of the parameter pack by index.
Definition ExprCXX.h:4882
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:4885
ValueDecl *const * iterator
Iterators over the parameters which the parameter pack expanded into.
Definition ExprCXX.h:4874
ValueDecl * getParameterPack() const
Get the parameter pack which this expression refers to.
Definition ExprCXX.h:4867
friend class ASTReader
Definition ExprCXX.h:4842
iterator end() const
Definition ExprCXX.h:4876
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:4884
unsigned getNumExpansions() const
Get the number of parameters in this parameter pack.
Definition ExprCXX.h:4879
static bool classof(const Stmt *T)
Definition ExprCXX.h:4887
SourceLocation getParameterPackLocation() const
Get the location of the parameter pack.
Definition ExprCXX.h:4870
friend class ASTStmtReader
Definition ExprCXX.h:4843
child_range children()
Definition ExprCXX.h:4891
static FunctionParmPackExpr * CreateEmpty(const ASTContext &Context, unsigned NumParams)
iterator begin() const
Definition ExprCXX.h:4875
Declaration of a template function.
One of these records is kept for each identifier that is lexed.
Describes the capture of a variable or of this, or of a C++1y init-capture.
llvm::iterator_range< const_capture_init_iterator > capture_inits() const
Retrieve the initialization expressions for this lambda's captures.
Definition ExprCXX.h:2088
Expr ** capture_init_iterator
Iterator that walks over the capture initialization arguments.
Definition ExprCXX.h:2075
capture_iterator capture_begin() const
Retrieve an iterator pointing to the first lambda capture.
static LambdaExpr * CreateDeserialized(const ASTContext &C, unsigned NumCaptures)
Construct a new lambda expression that will be deserialized from an external source.
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:2186
Stmt * getBody() const
Retrieve the body of the lambda.
bool hasExplicitParameters() const
Determine whether this lambda has an explicit parameter list vs.
Definition ExprCXX.h:2171
const_capture_init_iterator capture_init_begin() const
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
Definition ExprCXX.h:2100
bool isGenericLambda() const
Whether this is a generic lambda.
Definition ExprCXX.h:2148
SourceRange getIntroducerRange() const
Retrieve the source range covering the lambda introducer, which contains the explicit capture list su...
Definition ExprCXX.h:2119
bool isMutable() const
Determine whether the lambda is mutable, meaning that any captures values can be modified.
capture_iterator implicit_capture_end() const
Retrieve an iterator pointing past the end of the sequence of implicit lambda captures.
friend TrailingObjects
Definition ExprCXX.h:2005
CompoundStmt * getCompoundStmtBody()
Definition ExprCXX.h:2160
unsigned capture_size() const
Determine the number of captures in this lambda.
Definition ExprCXX.h:2049
capture_range explicit_captures() const
Retrieve this lambda's explicit captures.
bool isInitCapture(const LambdaCapture *Capture) const
Determine whether one of this lambda's captures is an init-capture.
const_capture_init_iterator capture_init_end() const
Retrieve the iterator pointing one past the last initialization argument for this lambda expression.
Definition ExprCXX.h:2112
CXXMethodDecl * getCallOperator() const
Retrieve the function call operator associated with this lambda expression.
const CompoundStmt * getCompoundStmtBody() const
Retrieve the CompoundStmt representing the body of the lambda.
bool hasExplicitResultType() const
Whether this lambda had its result type explicitly specified.
Definition ExprCXX.h:2174
capture_range implicit_captures() const
Retrieve this lambda's implicit captures.
const AssociatedConstraint & getTrailingRequiresClause() const
Get the trailing requires clause, if any.
TemplateParameterList * getTemplateParameterList() const
If this is a generic lambda expression, retrieve the template parameter list associated with it,...
ArrayRef< NamedDecl * > getExplicitTemplateParameters() const
Get the template parameters were explicitly specified (as opposed to being invented by use of an auto...
capture_iterator implicit_capture_begin() const
Retrieve an iterator pointing to the first implicit lambda capture.
capture_iterator explicit_capture_end() const
Retrieve an iterator pointing past the end of the sequence of explicit lambda captures.
capture_iterator capture_end() const
Retrieve an iterator pointing past the end of the sequence of lambda captures.
llvm::iterator_range< capture_iterator > capture_range
An iterator over a range of lambda captures.
Definition ExprCXX.h:2036
SourceLocation getCaptureDefaultLoc() const
Retrieve the location of this lambda's capture-default, if any.
Definition ExprCXX.h:2026
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument for this lambda expression.
Definition ExprCXX.h:2106
friend class ASTStmtWriter
Definition ExprCXX.h:2004
const LambdaCapture * capture_iterator
An iterator that walks over the captures of the lambda, both implicit and explicit.
Definition ExprCXX.h:2033
Expr *const * const_capture_init_iterator
Const iterator that walks over the capture initialization arguments.
Definition ExprCXX.h:2080
capture_iterator explicit_capture_begin() const
Retrieve an iterator pointing to the first explicit lambda capture.
llvm::iterator_range< capture_init_iterator > capture_inits()
Retrieve the initialization expressions for this lambda's captures.
Definition ExprCXX.h:2083
friend class ASTStmtReader
Definition ExprCXX.h:2003
child_range children()
Includes the captures and the body of the lambda.
FunctionTemplateDecl * getDependentCallOperator() const
Retrieve the function template call operator associated with this lambda expression.
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:2182
static bool classof(const Stmt *T)
Definition ExprCXX.h:2178
capture_range captures() const
Retrieve this lambda's captures.
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
Definition ExprCXX.h:2094
LambdaCaptureDefault getCaptureDefault() const
Determine the default capture kind for this lambda.
Definition ExprCXX.h:2021
CXXRecordDecl * getLambdaClass() const
Retrieve the class that corresponds to the lambda.
Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-...
An instance of this class represents the declaration of a property member.
const_child_range children() const
Definition ExprCXX.h:980
NestedNameSpecifierLoc getQualifierLoc() const
Definition ExprCXX.h:992
MSPropertyRefExpr(EmptyShell Empty)
Definition ExprCXX.h:955
bool isArrow() const
Definition ExprCXX.h:990
bool isImplicitAccess() const
Definition ExprCXX.h:961
SourceRange getSourceRange() const LLVM_READONLY
Definition ExprCXX.h:957
SourceLocation getEndLoc() const
Definition ExprCXX.h:974
MSPropertyDecl * getPropertyDecl() const
Definition ExprCXX.h:989
Expr * getBaseExpr() const
Definition ExprCXX.h:988
child_range children()
Definition ExprCXX.h:976
MSPropertyRefExpr(Expr *baseExpr, MSPropertyDecl *decl, bool isArrow, QualType ty, ExprValueKind VK, NestedNameSpecifierLoc qualifierLoc, SourceLocation nameLoc)
Definition ExprCXX.h:946
static bool classof(const Stmt *T)
Definition ExprCXX.h:984
SourceLocation getBeginLoc() const
Definition ExprCXX.h:965
friend class ASTStmtReader
Definition ExprCXX.h:944
SourceLocation getMemberLoc() const
Definition ExprCXX.h:991
static bool classof(const Stmt *T)
Definition ExprCXX.h:1050
const Expr * getIdx() const
Definition ExprCXX.h:1035
void setRBracketLoc(SourceLocation L)
Definition ExprCXX.h:1044
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:1041
MSPropertySubscriptExpr(Expr *Base, Expr *Idx, QualType Ty, ExprValueKind VK, ExprObjectKind OK, SourceLocation RBracketLoc)
Definition ExprCXX.h:1018
child_range children()
Definition ExprCXX.h:1055
SourceLocation getExprLoc() const LLVM_READONLY
Definition ExprCXX.h:1046
const_child_range children() const
Definition ExprCXX.h:1059
MSPropertySubscriptExpr(EmptyShell Shell)
Create an empty array subscript expression.
Definition ExprCXX.h:1028
const Expr * getBase() const
Definition ExprCXX.h:1032
Expr * getBase()
Definition ExprCXX.h:1031
Expr * getIdx()
Definition ExprCXX.h:1034
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:1037
friend class ASTStmtReader
Definition ExprCXX.h:1007
SourceLocation getRBracketLoc() const
Definition ExprCXX.h:1043
MaterializeTemporaryExpr(QualType T, Expr *Temporary, bool BoundToLvalueReference, LifetimeExtendedTemporaryDecl *MTD=nullptr)
const LifetimeExtendedTemporaryDecl * getLifetimeExtendedTemporaryDecl() const
Definition ExprCXX.h:4964
StorageDuration getStorageDuration() const
Retrieve the storage duration for the materialized temporary.
Definition ExprCXX.h:4945
Expr * getSubExpr() const
Retrieve the temporary-generating subexpression whose value will be materialized into a glvalue.
Definition ExprCXX.h:4937
APValue * getOrCreateValue(bool MayCreate) const
Get the storage for the constant value of a materialized temporary of static storage duration.
Definition ExprCXX.h:4953
bool isBoundToLvalueReference() const
Determine whether this materialized temporary is bound to an lvalue reference; otherwise,...
Definition ExprCXX.h:4989
ValueDecl * getExtendingDecl()
Get the declaration which triggered the lifetime-extension of this temporary, if any.
Definition ExprCXX.h:4970
bool isUsableInConstantExpressions(const ASTContext &Context) const
Determine whether this temporary object is usable in constant expressions, as specified in C++20 [exp...
MaterializeTemporaryExpr(EmptyShell Empty)
Definition ExprCXX.h:4932
LifetimeExtendedTemporaryDecl * getLifetimeExtendedTemporaryDecl()
Definition ExprCXX.h:4960
child_range children()
Definition ExprCXX.h:5008
friend class ASTStmtWriter
Definition ExprCXX.h:4923
void setExtendingDecl(ValueDecl *ExtendedBy, unsigned ManglingNumber)
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:4999
friend class ASTStmtReader
Definition ExprCXX.h:4922
const ValueDecl * getExtendingDecl() const
Definition ExprCXX.h:4975
static bool classof(const Stmt *T)
Definition ExprCXX.h:5003
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:4995
unsigned getManglingNumber() const
Definition ExprCXX.h:4981
const_child_range children() const
Definition ExprCXX.h:5014
This represents a decl that may have a name.
A C++ nested-name-specifier augmented with source location information.
SourceLocation getBeginLoc() const
Retrieve the location of the beginning of this nested-name-specifier.
Represents a C++ nested name specifier, such as "\::std::vector::".
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class.
static bool classof(const Stmt *T)
Definition ExprCXX.h:3347
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
Definition ExprCXX.h:4282
bool isVarDeclReference() const
Definition ExprCXX.h:3302
bool hasExplicitTemplateArgs() const
Determines whether this expression had explicit template arguments.
Definition ExprCXX.h:3280
static FindResult find(Expr *E)
Finds the overloaded expression in the given expression E of OverloadTy.
Definition ExprCXX.h:3189
NestedNameSpecifier getQualifier() const
Fetches the nested-name qualifier, if one was given.
Definition ExprCXX.h:3244
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
Definition ExprCXX.h:3262
const DeclarationNameInfo & getNameInfo() const
Gets the full name info.
Definition ExprCXX.h:3235
const CXXRecordDecl * getNamingClass() const
Definition ExprCXX.h:3215
SourceLocation getNameLoc() const
Gets the location of the name.
Definition ExprCXX.h:3241
UnresolvedSetImpl::iterator decls_iterator
Definition ExprCXX.h:3219
decls_iterator decls_begin() const
Definition ExprCXX.h:3221
CXXRecordDecl * getNamingClass()
Gets the naming class of this lookup, if any.
Definition ExprCXX.h:4299
unsigned getNumDecls() const
Gets the number of declarations in the unresolved set.
Definition ExprCXX.h:3232
TemplateDecl * getTemplateDecl() const
Definition ExprCXX.h:3313
TemplateTemplateParmDecl * getTemplateTemplateDecl() const
Definition ExprCXX.h:3318
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding this name, if any.
Definition ExprCXX.h:3254
NestedNameSpecifierLoc getQualifierLoc() const
Fetches the nested-name qualifier with source-location information, if one was given.
Definition ExprCXX.h:3250
const ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo() const
Definition ExprCXX.h:3160
TemplateArgumentLoc const * getTemplateArgs() const
Definition ExprCXX.h:3324
llvm::iterator_range< decls_iterator > decls() const
Definition ExprCXX.h:3227
friend class ASTStmtWriter
Definition ExprCXX.h:3130
void copyTemplateArgumentsInto(TemplateArgumentListInfo &List) const
Copies the template arguments into the given structure.
Definition ExprCXX.h:3342
TemplateArgumentLoc * getTrailingTemplateArgumentLoc()
Return the optional template arguments.
Definition ExprCXX.h:4292
DeclAccessPair * getTrailingResults()
Return the results. Defined after UnresolvedMemberExpr.
Definition ExprCXX.h:4276
OverloadExpr(StmtClass SC, const ASTContext &Context, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs, UnresolvedSetIterator Begin, UnresolvedSetIterator End, bool KnownDependent, bool KnownInstantiationDependent, bool KnownContainsUnexpandedParameterPack)
const DeclAccessPair * getTrailingResults() const
Definition ExprCXX.h:3153
bool isConceptReference() const
Definition ExprCXX.h:3291
friend class ASTStmtReader
Definition ExprCXX.h:3129
bool hasTemplateKWAndArgsInfo() const
Definition ExprCXX.h:3172
decls_iterator decls_end() const
Definition ExprCXX.h:3224
unsigned getNumTemplateArgs() const
Definition ExprCXX.h:3330
const TemplateArgumentLoc * getTrailingTemplateArgumentLoc() const
Definition ExprCXX.h:3168
DeclarationName getName() const
Gets the name looked up.
Definition ExprCXX.h:3238
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
Definition ExprCXX.h:3270
bool hasTemplateKeyword() const
Determines whether the name was preceded by the template keyword.
Definition ExprCXX.h:3277
ArrayRef< TemplateArgumentLoc > template_arguments() const
Definition ExprCXX.h:3337
Expr * getPattern()
Retrieve the pattern of the pack expansion.
Definition ExprCXX.h:4392
const Expr * getPattern() const
Retrieve the pattern of the pack expansion.
Definition ExprCXX.h:4395
UnsignedOrNone getNumExpansions() const
Determine the number of expansions that will be produced when this pack expansion is instantiated,...
Definition ExprCXX.h:4403
child_range children()
Definition ExprCXX.h:4421
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:4410
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:4414
friend class ASTStmtWriter
Definition ExprCXX.h:4365
PackExpansionExpr(Expr *Pattern, SourceLocation EllipsisLoc, UnsignedOrNone NumExpansions)
Definition ExprCXX.h:4379
const_child_range children() const
Definition ExprCXX.h:4425
friend class ASTStmtReader
Definition ExprCXX.h:4364
SourceLocation getEllipsisLoc() const
Retrieve the location of the ellipsis that describes this pack expansion.
Definition ExprCXX.h:4399
PackExpansionExpr(EmptyShell Empty)
Definition ExprCXX.h:4389
static bool classof(const Stmt *T)
Definition ExprCXX.h:4416
NamedDecl * getPackDecl() const
static PackIndexingExpr * CreateDeserialized(ASTContext &Context, unsigned NumTransformedExprs)
SourceLocation getEllipsisLoc() const
Determine the location of the 'sizeof' keyword.
Definition ExprCXX.h:4613
Expr * getIndexExpr() const
Definition ExprCXX.h:4628
child_range children()
Definition ExprCXX.h:4655
ArrayRef< Expr * > getExpressions() const
Return the trailing expressions, regardless of the expansion.
Definition ExprCXX.h:4646
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:4622
SourceLocation getPackLoc() const
Determine the location of the parameter pack.
Definition ExprCXX.h:4616
SourceLocation getRSquareLoc() const
Determine the location of the right parenthesis.
Definition ExprCXX.h:4619
bool expandsToEmptyPack() const
Determine if the expression was expanded to empty.
Definition ExprCXX.h:4607
Expr * getPackIdExpression() const
Definition ExprCXX.h:4624
friend class ASTStmtWriter
Definition ExprCXX.h:4557
Expr * getSelectedExpr() const
Definition ExprCXX.h:4639
static bool classof(const Stmt *T)
Definition ExprCXX.h:4650
bool isFullySubstituted() const
Definition ExprCXX.h:4602
UnsignedOrNone getSelectedIndex() const
Definition ExprCXX.h:4630
friend class ASTStmtReader
Definition ExprCXX.h:4556
const_child_range children() const
Definition ExprCXX.h:4657
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:4621
Represents a parameter to a function.
PointerType - C99 6.7.5.1 - Pointer Declarators.
Stores the type being destroyed by a pseudo-destructor expression.
Definition ExprCXX.h:2694
PseudoDestructorTypeStorage(const IdentifierInfo *II, SourceLocation Loc)
Definition ExprCXX.h:2705
const IdentifierInfo * getIdentifier() const
Definition ExprCXX.h:2714
PseudoDestructorTypeStorage()=default
SourceLocation getLocation() const
Definition ExprCXX.h:2718
TypeSourceInfo * getTypeSourceInfo() const
Definition ExprCXX.h:2710
A (possibly-)qualified type.
Represents an expression that computes the length of a parameter pack.
Definition ExprCXX.h:4441
SourceLocation getPackLoc() const
Determine the location of the parameter pack.
Definition ExprCXX.h:4503
child_range children()
Definition ExprCXX.h:4544
static bool classof(const Stmt *T)
Definition ExprCXX.h:4539
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:4537
static SizeOfPackExpr * CreateDeserialized(ASTContext &Context, unsigned NumPartialArgs)
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof... expression, such as is produced f...
Definition ExprCXX.h:4526
const_child_range children() const
Definition ExprCXX.h:4548
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:4536
ArrayRef< TemplateArgument > getPartialArguments() const
Get.
Definition ExprCXX.h:4531
SourceLocation getOperatorLoc() const
Determine the location of the 'sizeof' keyword.
Definition ExprCXX.h:4500
friend class ASTStmtWriter
Definition ExprCXX.h:4443
SourceLocation getRParenLoc() const
Determine the location of the right parenthesis.
Definition ExprCXX.h:4506
NamedDecl * getPack() const
Retrieve the parameter pack.
Definition ExprCXX.h:4509
friend class ASTStmtReader
Definition ExprCXX.h:4442
unsigned getPackLength() const
Retrieve the length of the parameter pack.
Definition ExprCXX.h:4515
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.
Stmt - This represents one statement.
ExpressionTraitExprBitfields ExpressionTraitExprBits
SourceLocation getEndLoc() const LLVM_READONLY
CXXUnresolvedConstructExprBitfields CXXUnresolvedConstructExprBits
LambdaExprBitfields LambdaExprBits
UnresolvedLookupExprBitfields UnresolvedLookupExprBits
SubstNonTypeTemplateParmExprBitfields SubstNonTypeTemplateParmExprBits
CXXNoexceptExprBitfields CXXNoexceptExprBits
StmtIterator child_iterator
Child Iterators: All subclasses must implement 'children' to permit easy iteration over the substatem...
CXXRewrittenBinaryOperatorBitfields CXXRewrittenBinaryOperatorBits
ExprWithCleanupsBitfields ExprWithCleanupsBits
StmtClass getStmtClass() const
CXXScalarValueInitExprBitfields CXXScalarValueInitExprBits
OverloadExprBitfields OverloadExprBits
CXXConstructExprBitfields CXXConstructExprBits
CXXDependentScopeMemberExprBitfields CXXDependentScopeMemberExprBits
ConstCastIterator< Expr > ConstExprIterator
TypeTraitExprBitfields TypeTraitExprBits
CXXNewExprBitfields CXXNewExprBits
CXXNullPtrLiteralExprBitfields CXXNullPtrLiteralExprBits
CoawaitExprBitfields CoawaitBits
llvm::iterator_range< child_iterator > child_range
CXXFoldExprBitfields CXXFoldExprBits
CXXThrowExprBitfields CXXThrowExprBits
PackIndexingExprBitfields PackIndexingExprBits
ConstStmtIterator const_child_iterator
CXXBoolLiteralExprBitfields CXXBoolLiteralExprBits
CXXOperatorCallExprBitfields CXXOperatorCallExprBits
CXXDefaultInitExprBitfields CXXDefaultInitExprBits
DependentScopeDeclRefExprBitfields DependentScopeDeclRefExprBits
ArrayTypeTraitExprBitfields ArrayTypeTraitExprBits
SourceLocation getBeginLoc() const LLVM_READONLY
UnresolvedMemberExprBitfields UnresolvedMemberExprBits
llvm::iterator_range< const_child_iterator > const_child_range
CXXDeleteExprBitfields CXXDeleteExprBits
CXXDefaultArgExprBitfields CXXDefaultArgExprBits
CXXThisExprBitfields CXXThisExprBits
CastIterator< Expr > ExprIterator
Decl * getAssociatedDecl() const
A template-like entity which owns the whole pattern being substituted.
Definition ExprCXX.h:4709
bool getFinal() const
Definition ExprCXX.h:4721
UnsignedOrNone getPackIndex() const
Definition ExprCXX.h:4715
SourceLocation getEndLoc() const
Definition ExprCXX.h:4703
QualType getParameterType(const ASTContext &Ctx) const
Determine the substituted type of the template parameter.
const_child_range children() const
Definition ExprCXX.h:4737
friend class ASTReader
Definition ExprCXX.h:4665
bool isReferenceParameter() const
Definition ExprCXX.h:4725
unsigned getIndex() const
Returns the index of the replaced parameter in the associated declaration.
Definition ExprCXX.h:4713
SubstNonTypeTemplateParmExpr(QualType Ty, ExprValueKind ValueKind, SourceLocation Loc, Expr *Replacement, Decl *AssociatedDecl, unsigned Index, UnsignedOrNone PackIndex, bool RefParam, bool Final)
Definition ExprCXX.h:4685
SourceLocation getNameLoc() const
Definition ExprCXX.h:4699
NonTypeTemplateParmDecl * getParameter() const
SourceLocation getBeginLoc() const
Definition ExprCXX.h:4702
child_range children()
Definition ExprCXX.h:4735
Expr * getReplacement() const
Definition ExprCXX.h:4705
static bool classof(const Stmt *s)
Definition ExprCXX.h:4730
friend class ASTStmtReader
Definition ExprCXX.h:4666
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
Definition ExprCXX.h:4754
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:4808
TemplateArgument getArgumentPack() const
Retrieve the template argument pack containing the substituted template arguments.
SourceLocation getParameterPackLocation() const
Retrieve the location of the parameter pack name.
Definition ExprCXX.h:4802
const_child_range children() const
Definition ExprCXX.h:4820
NonTypeTemplateParmDecl * getParameterPack() const
Retrieve the non-type template parameter pack being substituted.
Decl * getAssociatedDecl() const
A template-like entity which owns the whole pattern being substituted.
Definition ExprCXX.h:4788
friend class ASTReader
Definition ExprCXX.h:4755
bool getFinal() const
Definition ExprCXX.h:4796
child_range children()
Definition ExprCXX.h:4816
static bool classof(const Stmt *T)
Definition ExprCXX.h:4811
unsigned getIndex() const
Returns the index of the replaced parameter in the associated declaration.
Definition ExprCXX.h:4792
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:4809
friend class ASTStmtReader
Definition ExprCXX.h:4756
A convenient class for passing around template argument information.
Location wrapper for a TemplateArgument.
Represents a template argument.
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.
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
A container of type source information.
QualType getType() const
Return the type wrapped by this type source info.
bool getBoolValue() const
Definition ExprCXX.h:2947
ArrayRef< TypeSourceInfo * > getArgs() const
Retrieve the argument types.
Definition ExprCXX.h:2967
friend TrailingObjects
Definition ExprCXX.h:2920
child_range children()
Definition ExprCXX.h:2979
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:2972
TypeSourceInfo * getArg(unsigned I) const
Retrieve the Ith argument.
Definition ExprCXX.h:2961
const_child_range children() const
Definition ExprCXX.h:2983
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
Definition ExprCXX.h:2958
static TypeTraitExpr * CreateDeserialized(const ASTContext &C, bool IsStoredAsBool, unsigned NumArgs)
TypeTrait getTrait() const
Determine which type trait this expression uses.
Definition ExprCXX.h:2939
friend class ASTStmtWriter
Definition ExprCXX.h:2919
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:2971
const APValue & getAPValue() const
Definition ExprCXX.h:2952
friend class ASTStmtReader
Definition ExprCXX.h:2918
static bool classof(const Stmt *T)
Definition ExprCXX.h:2974
bool isStoredAsBoolean() const
Definition ExprCXX.h:2943
The base class of the type hierarchy.
const T * castAs() const
Member-template castAs.
bool isSpecificBuiltinType(unsigned K) const
Test for a particular builtin type.
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Definition ExprCXX.h:3390
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:3467
const CXXRecordDecl * getNamingClass() const
Definition ExprCXX.h:3465
CXXRecordDecl * getNamingClass()
Gets the 'naming class' (in the sense of C++0x [class.access.base]p5) of the lookup.
Definition ExprCXX.h:3464
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:3473
child_range children()
Definition ExprCXX.h:3479
static UnresolvedLookupExpr * CreateEmpty(const ASTContext &Context, unsigned NumResults, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
static bool classof(const Stmt *T)
Definition ExprCXX.h:3487
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
Definition ExprCXX.h:3459
const_child_range children() const
Definition ExprCXX.h:3483
friend class ASTStmtReader
Definition ExprCXX.h:3391
friend class OverloadExpr
Definition ExprCXX.h:3392
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:4252
DeclarationName getMemberName() const
Retrieve the name of the member that this expression refers to.
Definition ExprCXX.h:4234
QualType getBaseType() const
Definition ExprCXX.h:4208
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '.
Definition ExprCXX.h:4218
SourceLocation getOperatorLoc() const
Retrieve the location of the '->' or '.' operator.
Definition ExprCXX.h:4221
bool hasUnresolvedUsing() const
Determine whether the lookup results contain an unresolved using declaration.
Definition ExprCXX.h:4212
const Expr * getBase() const
Definition ExprCXX.h:4203
const CXXRecordDecl * getNamingClass() const
Definition ExprCXX.h:4225
child_range children()
Definition ExprCXX.h:4263
SourceLocation getExprLoc() const LLVM_READONLY
Return the preferred location (the member name) for the arrow when diagnosing a problem with this exp...
Definition ExprCXX.h:4242
Expr * getBase()
Retrieve the base object of this member expressions, e.g., the x in x.m.
Definition ExprCXX.h:4199
static bool classof(const Stmt *T)
Definition ExprCXX.h:4258
CXXRecordDecl * getNamingClass()
Retrieve the naming class of this lookup.
bool isImplicitAccess() const
True if this is an implicit access, i.e., one in which the member being accessed was not written in t...
const DeclarationNameInfo & getMemberNameInfo() const
Retrieve the full name info for the member that this expression refers to.
Definition ExprCXX.h:4231
friend class ASTStmtReader
Definition ExprCXX.h:4127
friend class OverloadExpr
Definition ExprCXX.h:4128
SourceLocation getBeginLoc() const LLVM_READONLY
Definition ExprCXX.h:4244
static UnresolvedMemberExpr * CreateEmpty(const ASTContext &Context, unsigned NumResults, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
const_child_range children() const
Definition ExprCXX.h:4269
SourceLocation getMemberLoc() const
Retrieve the location of the name of the member that this expression refers to.
Definition ExprCXX.h:4238
UnresolvedSetIterator iterator
The iterator over UnresolvedSets.
LiteralOperatorKind getLiteralOperatorKind() const
Returns the kind of literal operator invocation which this expression represents.
const Expr * getCookedLiteral() const
Definition ExprCXX.h:696
const IdentifierInfo * getUDSuffix() const
Returns the ud-suffix specified for this literal.
static UserDefinedLiteral * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPOptions, EmptyShell Empty)
SourceLocation getEndLoc() const
Definition ExprCXX.h:706
Expr * getCookedLiteral()
If this is not a raw user-defined literal, get the underlying cooked literal (representing the litera...
SourceLocation getBeginLoc() const
Definition ExprCXX.h:700
friend class ASTStmtWriter
Definition ExprCXX.h:642
SourceLocation getUDSuffixLoc() const
Returns the location of a ud-suffix in the expression.
Definition ExprCXX.h:712
LiteralOperatorKind
The kind of literal operator which is invoked.
Definition ExprCXX.h:668
@ LOK_String
operator "" X (const CharT *, size_t)
Definition ExprCXX.h:682
@ LOK_Raw
Raw form: operator "" X (const char *)
Definition ExprCXX.h:670
@ LOK_Floating
operator "" X (long double)
Definition ExprCXX.h:679
@ LOK_Integer
operator "" X (unsigned long long)
Definition ExprCXX.h:676
@ LOK_Template
Raw form: operator "" X<cs...> ()
Definition ExprCXX.h:673
@ LOK_Character
operator "" X (CharT)
Definition ExprCXX.h:685
friend class ASTStmtReader
Definition ExprCXX.h:641
static bool classof(const Stmt *S)
Definition ExprCXX.h:717
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
const internal::VariadicDynCastAllOfMatcher< Stmt, CastExpr > castExpr
Matches any cast nodes of Clang's AST.
The JSON file list parser is used to communicate input to InstallAPI.
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
bool isa(CodeGen::Address addr)
ArrayTypeTrait
Names for the array type traits.
CanThrowResult
Possible results from evaluation of a noexcept expression.
AlignedAllocationMode alignedAllocationModeFromBool(bool IsAligned)
Definition ExprCXX.h:2269
CXXConstructionKind
Definition ExprCXX.h:1540
@ NonVirtualBase
Definition ExprCXX.h:1542
@ VirtualBase
Definition ExprCXX.h:1543
@ Complete
Definition ExprCXX.h:1541
@ Delegating
Definition ExprCXX.h:1544
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
@ OK_Ordinary
An ordinary object is located at an address in memory.
ExprDependence computeDependence(FullExpr *E)
@ Create
'create' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
nullptr
This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...
bool isAlignedAllocation(AlignedAllocationMode Mode)
Definition ExprCXX.h:2265
AlignedAllocationMode
Definition ExprCXX.h:2263
@ Yes
Definition ExprCXX.h:2263
@ No
Definition ExprCXX.h:2263
StorageDuration
The storage duration for an object (per C++ [basic.stc]).
@ SD_FullExpression
Full-expression storage duration (for temporaries).
@ Result
The result type of a method or function.
const FunctionProtoType * T
@ Keyword
The name has been typo-corrected to a keyword.
bool isTypeAwareAllocation(TypeAwareAllocationMode Mode)
Definition ExprCXX.h:2253
CastKind
CastKind - The kind of operation required for a conversion.
SizedDeallocationMode sizedDeallocationModeFromBool(bool IsSized)
Definition ExprCXX.h:2279
@ TNK_Var_template
The name refers to a variable template whose specialization produces a variable.
@ TNK_Concept_template
The name refers to a concept.
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
SizedDeallocationMode
Definition ExprCXX.h:2273
@ Yes
Definition ExprCXX.h:2273
@ No
Definition ExprCXX.h:2273
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
@ VK_PRValue
A pr-value expression (in the C++11 taxonomy) produces a temporary value.
@ VK_LValue
An l-value expression is a reference to an object with independent storage.
SmallVector< CXXBaseSpecifier *, 4 > CXXCastPath
A simple array of base specifiers.
bool isSizedDeallocation(SizedDeallocationMode Mode)
Definition ExprCXX.h:2275
TypeAwareAllocationMode
Definition ExprCXX.h:2251
@ Yes
Definition ExprCXX.h:2251
@ No
Definition ExprCXX.h:2251
TypeAwareAllocationMode typeAwareAllocationModeFromBool(bool IsTypeAwareAllocation)
Definition ExprCXX.h:2258
U cast(CodeGen::Address addr)
@ None
The alignment was not explicit in code.
@ Class
The "class" keyword introduces the elaborated-type-specifier.
TypeTrait
Names for traits that operate specifically on types.
CXXNewInitializationStyle
Definition ExprCXX.h:2240
@ Parens
New-expression has a C++98 paren-delimited initializer.
Definition ExprCXX.h:2245
@ Braces
New-expression has a C++11 list-initializer.
Definition ExprCXX.h:2248
Represents an explicit template argument list in C++, e.g., the "" in "sort".
SourceLocation LAngleLoc
The source location of the left angle bracket ('<').
void copyInto(const TemplateArgumentLoc *ArgArray, TemplateArgumentListInfo &List) const
unsigned NumTemplateArgs
The number of template arguments in TemplateArgs.
SourceLocation RAngleLoc
The source location of the right angle bracket ('>').
SourceLocation TemplateKWLoc
The source location of the template keyword; this is used as part of the representation of qualified ...
const Expr * RHS
The original right-hand side.
Definition ExprCXX.h:313
const Expr * InnerBinOp
The inner == or <=> operator expression.
Definition ExprCXX.h:315
BinaryOperatorKind Opcode
The original opcode, prior to rewriting.
Definition ExprCXX.h:309
const Expr * LHS
The original left-hand side.
Definition ExprCXX.h:311
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
SourceLocation getBeginLoc() const
getBeginLoc - Retrieve the location of the first token.
SourceLocation getEndLoc() const LLVM_READONLY
Definition ExprCXX.h:2283
ImplicitAllocationParameters(QualType AllocType, TypeAwareAllocationMode PassTypeIdentity, AlignedAllocationMode PassAlignment)
Definition ExprCXX.h:2284
AlignedAllocationMode PassAlignment
Definition ExprCXX.h:2307
ImplicitAllocationParameters(AlignedAllocationMode PassAlignment)
Definition ExprCXX.h:2292
TypeAwareAllocationMode PassTypeIdentity
Definition ExprCXX.h:2306
QualType Type
Definition ExprCXX.h:2305
unsigned getNumImplicitArgs() const
Definition ExprCXX.h:2296
unsigned getNumImplicitArgs() const
Definition ExprCXX.h:2326
ImplicitDeallocationParameters(AlignedAllocationMode PassAlignment, SizedDeallocationMode PassSize)
Definition ExprCXX.h:2321
TypeAwareAllocationMode PassTypeIdentity
Definition ExprCXX.h:2338
QualType Type
Definition ExprCXX.h:2337
SizedDeallocationMode PassSize
Definition ExprCXX.h:2340
ImplicitDeallocationParameters(QualType DeallocType, TypeAwareAllocationMode PassTypeIdentity, AlignedAllocationMode PassAlignment, SizedDeallocationMode PassSize)
Definition ExprCXX.h:2311
AlignedAllocationMode PassAlignment
Definition ExprCXX.h:2339
Definition ExprCXX.h:3177
bool IsAddressOfOperand
Definition ExprCXX.h:3179
bool IsAddressOfOperandWithParen
Definition ExprCXX.h:3180
bool HasFormOfMemberPointer
Definition ExprCXX.h:3181
OverloadExpr * Expression
Definition ExprCXX.h:3178
A placeholder type used to construct an empty shell of a type, that will be filled in later (e....
static constexpr UnsignedOrNone fromInternalRepresentation(unsigned Rep)
The parameters to pass to a usual operator delete.
Definition ExprCXX.h:2344
bool Size
Definition ExprCXX.h:2347
TypeAwareAllocationMode TypeAwareDelete
Definition ExprCXX.h:2345
bool DestroyingDelete
Definition ExprCXX.h:2346
AlignedAllocationMode Alignment
Definition ExprCXX.h:2348