21 using namespace clang;
37 if (RD->isPolymorphic() && E->
isGLValue())
44 assert(
isTypeOperand() &&
"Cannot call getTypeOperand for typeid(expr)");
51 assert(
isTypeOperand() &&
"Cannot call getTypeOperand for __uuidof(expr)");
59 bool *RDHasMultipleGUIDsPtr) {
76 dyn_cast<ClassTemplateSpecializationDecl>(RD)) {
78 const UuidAttr *UuidForRD =
nullptr;
81 bool SeenMultipleGUIDs =
false;
83 const UuidAttr *UuidForTA =
nullptr;
96 UuidForRD = UuidForTA;
97 else if (UuidForRD != UuidForTA)
98 SeenMultipleGUIDs =
true;
102 if (SeenMultipleGUIDs) {
103 if (RDHasMultipleGUIDsPtr)
104 *RDHasMultipleGUIDsPtr =
true;
125 Uuid =
"00000000-0000-0000-0000-000000000000";
138 bool usualArrayDeleteWantsSize,
146 ty->isDependentType(), ty->isDependentType(),
147 ty->isInstantiationDependentType(),
148 ty->containsUnexpandedParameterPack()),
149 SubExprs(nullptr), OperatorNew(operatorNew), OperatorDelete(operatorDelete),
150 AllocatedTypeInfo(allocatedTypeInfo), TypeIdParens(typeIdParens),
151 Range(Range), DirectInitRange(directInitRange),
152 GlobalNew(globalNew), UsualArrayDeleteWantsSize(usualArrayDeleteWantsSize) {
153 assert((initializer !=
nullptr || initializationStyle ==
NoInit) &&
154 "Only NoInit can have no initializer.");
155 StoredInitializationStyle = initializer ? initializationStyle + 1 : 0;
157 initializer !=
nullptr);
161 ExprBits.InstantiationDependent =
true;
164 ExprBits.ContainsUnexpandedParameterPack =
true;
166 SubExprs[i++] = arraySize;
171 ExprBits.InstantiationDependent =
true;
174 ExprBits.ContainsUnexpandedParameterPack =
true;
176 SubExprs[i++] = initializer;
179 for (
unsigned j = 0; j != placementArgs.size(); ++j) {
181 ExprBits.InstantiationDependent =
true;
183 ExprBits.ContainsUnexpandedParameterPack =
true;
185 SubExprs[i++] = placementArgs[j];
201 unsigned numPlaceArgs,
bool hasInitializer){
202 assert(SubExprs ==
nullptr &&
"SubExprs already allocated");
204 NumPlacementArgs = numPlaceArgs;
206 unsigned TotalSize = Array + hasInitializer + NumPlacementArgs;
207 SubExprs =
new (
C)
Stmt*[TotalSize];
240 :
Expr(CXXPseudoDestructorExprClass,
241 Context.BoundMemberTy,
243 (Base->isTypeDependent() ||
244 (DestroyedType.getTypeSourceInfo() &&
245 DestroyedType.getTypeSourceInfo()->getType()->isDependentType())),
246 Base->isValueDependent(),
247 (Base->isInstantiationDependent() ||
249 QualifierLoc.getNestedNameSpecifier()->isInstantiationDependent()) ||
251 ScopeType->getType()->isInstantiationDependentType()) ||
252 (DestroyedType.getTypeSourceInfo() &&
253 DestroyedType.getTypeSourceInfo()->getType()
254 ->isInstantiationDependentType())),
256 (Base->containsUnexpandedParameterPack() ||
258 QualifierLoc.getNestedNameSpecifier()
259 ->containsUnexpandedParameterPack()) ||
261 ScopeType->getType()->containsUnexpandedParameterPack()) ||
262 (DestroyedType.getTypeSourceInfo() &&
263 DestroyedType.getTypeSourceInfo()->getType()
264 ->containsUnexpandedParameterPack()))),
265 Base(static_cast<
Stmt *>(Base)), IsArrow(isArrow),
266 OperatorLoc(OperatorLoc), QualifierLoc(QualifierLoc),
267 ScopeType(ScopeType), ColonColonLoc(ColonColonLoc), TildeLoc(TildeLoc),
268 DestroyedType(DestroyedType) { }
272 return TInfo->getType();
280 End = TInfo->getTypeLoc().getLocalSourceRange().getEnd();
296 assert(Args || TemplateKWLoc.
isValid());
297 unsigned num_args = Args ? Args->
size() : 0;
300 totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>(1,
302 void *Mem = C.
Allocate(Size, llvm::alignOf<UnresolvedLookupExpr>());
304 TemplateKWLoc, NameInfo,
311 bool HasTemplateKWAndArgsInfo,
312 unsigned NumTemplateArgs) {
313 assert(NumTemplateArgs == 0 || HasTemplateKWAndArgsInfo);
315 totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>(
317 void *Mem = C.
Allocate(Size, llvm::alignOf<UnresolvedLookupExpr>());
331 bool KnownInstantiationDependent,
332 bool KnownContainsUnexpandedParameterPack)
335 (KnownInstantiationDependent ||
336 NameInfo.isInstantiationDependent() ||
338 QualifierLoc.getNestedNameSpecifier()->isInstantiationDependent())),
339 (KnownContainsUnexpandedParameterPack ||
340 NameInfo.containsUnexpandedParameterPack() ||
342 QualifierLoc.getNestedNameSpecifier()
343 ->containsUnexpandedParameterPack()))),
344 NameInfo(NameInfo), QualifierLoc(QualifierLoc),
345 Results(nullptr), NumResults(End - Begin),
346 HasTemplateKWAndArgsInfo(TemplateArgs != nullptr ||
347 TemplateKWLoc.isValid()) {
348 NumResults = End - Begin;
352 if ((*I)->getDeclContext()->isDependentContext() ||
353 isa<UnresolvedUsingValueDecl>(*I)) {
354 ExprBits.TypeDependent =
true;
355 ExprBits.ValueDependent =
true;
356 ExprBits.InstantiationDependent =
true;
362 llvm::alignOf<DeclAccessPair>()));
370 bool Dependent =
false;
371 bool InstantiationDependent =
false;
372 bool ContainsUnexpandedParameterPack =
false;
375 Dependent, InstantiationDependent, ContainsUnexpandedParameterPack);
378 ExprBits.TypeDependent =
true;
379 ExprBits.ValueDependent =
true;
381 if (InstantiationDependent)
382 ExprBits.InstantiationDependent =
true;
383 if (ContainsUnexpandedParameterPack)
384 ExprBits.ContainsUnexpandedParameterPack =
true;
385 }
else if (TemplateKWLoc.
isValid()) {
396 assert(!Results &&
"Results already initialized!");
397 NumResults = End - Begin;
402 llvm::alignOf<DeclAccessPair>()));
408 if (isa<UnresolvedLookupExpr>(
this))
415 DependentScopeDeclRefExpr::DependentScopeDeclRefExpr(
QualType T,
422 (NameInfo.isInstantiationDependent() ||
424 QualifierLoc.getNestedNameSpecifier()->isInstantiationDependent())),
425 (NameInfo.containsUnexpandedParameterPack() ||
427 QualifierLoc.getNestedNameSpecifier()
428 ->containsUnexpandedParameterPack()))),
429 QualifierLoc(QualifierLoc), NameInfo(NameInfo),
430 HasTemplateKWAndArgsInfo(Args != nullptr || TemplateKWLoc.isValid())
433 bool Dependent =
true;
434 bool InstantiationDependent =
true;
435 bool ContainsUnexpandedParameterPack
436 = ExprBits.ContainsUnexpandedParameterPack;
437 getTrailingObjects<ASTTemplateKWAndArgsInfo>()->initializeFrom(
438 TemplateKWLoc, *Args, getTrailingObjects<TemplateArgumentLoc>(),
439 Dependent, InstantiationDependent, ContainsUnexpandedParameterPack);
440 ExprBits.ContainsUnexpandedParameterPack = ContainsUnexpandedParameterPack;
441 }
else if (TemplateKWLoc.
isValid()) {
442 getTrailingObjects<ASTTemplateKWAndArgsInfo>()->initializeFrom(
453 assert(QualifierLoc &&
"should be created for dependent qualifiers");
454 bool HasTemplateKWAndArgsInfo = Args || TemplateKWLoc.
isValid();
456 totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>(
457 HasTemplateKWAndArgsInfo, Args ? Args->
size() : 0);
460 TemplateKWLoc, NameInfo, Args);
465 bool HasTemplateKWAndArgsInfo,
466 unsigned NumTemplateArgs) {
467 assert(NumTemplateArgs == 0 || HasTemplateKWAndArgsInfo);
469 totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>(
470 HasTemplateKWAndArgsInfo, NumTemplateArgs);
476 E->HasTemplateKWAndArgsInfo = HasTemplateKWAndArgsInfo;
481 if (isa<CXXTemporaryObjectExpr>(
this))
482 return cast<CXXTemporaryObjectExpr>(
this)->
getLocStart();
487 if (isa<CXXTemporaryObjectExpr>(
this))
488 return cast<CXXTemporaryObjectExpr>(
this)->
getLocEnd();
490 if (ParenOrBraceRange.
isValid())
491 return ParenOrBraceRange.
getEnd();
508 SourceRange CXXOperatorCallExpr::getSourceRangeImpl()
const {
510 if (Kind == OO_PlusPlus || Kind == OO_MinusMinus) {
517 }
else if (Kind == OO_Arrow) {
518 return getArg(0)->getSourceRange();
519 }
else if (Kind == OO_Call) {
521 }
else if (Kind == OO_Subscript) {
534 if (
const MemberExpr *MemExpr = dyn_cast<MemberExpr>(Callee))
535 return MemExpr->getBase();
547 return cast<CXXMethodDecl>(MemExpr->getMemberDecl());
574 switch (getStmtClass()) {
575 case CXXStaticCastExprClass:
return "static_cast";
576 case CXXDynamicCastExprClass:
return "dynamic_cast";
577 case CXXReinterpretCastExprClass:
return "reinterpret_cast";
578 case CXXConstCastExprClass:
return "const_cast";
579 default:
return "<invalid cast>";
591 unsigned PathSize = (BasePath ? BasePath->size() : 0);
592 void *
Buffer = C.
Allocate(totalSizeToAlloc<CXXBaseSpecifier *>(PathSize));
595 RParenLoc, AngleBrackets);
597 std::uninitialized_copy_n(BasePath->data(), BasePath->size(),
604 void *
Buffer = C.
Allocate(totalSizeToAlloc<CXXBaseSpecifier *>(PathSize));
616 unsigned PathSize = (BasePath ? BasePath->size() : 0);
617 void *
Buffer = C.
Allocate(totalSizeToAlloc<CXXBaseSpecifier *>(PathSize));
620 RParenLoc, AngleBrackets);
622 std::uninitialized_copy_n(BasePath->data(), BasePath->size(),
629 void *
Buffer = C.
Allocate(totalSizeToAlloc<CXXBaseSpecifier *>(PathSize));
657 if (!SrcRD->
hasAttr<FinalAttr>())
673 unsigned PathSize = (BasePath ? BasePath->size() : 0);
674 void *
Buffer = C.
Allocate(totalSizeToAlloc<CXXBaseSpecifier *>(PathSize));
677 RParenLoc, AngleBrackets);
679 std::uninitialized_copy_n(BasePath->data(), BasePath->size(),
686 void *
Buffer = C.
Allocate(totalSizeToAlloc<CXXBaseSpecifier *>(PathSize));
696 return new (
C)
CXXConstCastExpr(T, VK, Op, WrittenTy, L, RParenLoc, AngleBrackets);
708 unsigned PathSize = (BasePath ? BasePath->size() : 0);
709 void *
Buffer = C.
Allocate(totalSizeToAlloc<CXXBaseSpecifier *>(PathSize));
713 std::uninitialized_copy_n(BasePath->data(), BasePath->size(),
720 void *
Buffer = C.
Allocate(totalSizeToAlloc<CXXBaseSpecifier *>(PathSize));
739 assert(
getNumArgs() == 1 &&
"unexpected #args in literal operator call");
741 cast<FunctionDecl>(
getCalleeDecl())->getParamDecl(0)->getType();
751 llvm_unreachable(
"unknown kind of literal operator");
763 return cast<FunctionDecl>(
getCalleeDecl())->getLiteralIdentifier();
768 :
Expr(CXXDefaultInitExprClass, T.getNonLValueExprType(C),
769 T->isLValueReferenceType() ?
VK_LValue : T->isRValueReferenceType()
773 Field(Field), Loc(Loc) {
787 "Expression bound to a temporary must have record or array type!");
797 bool HadMultipleCandidates,
798 bool ListInitialization,
799 bool StdInitListInitialization,
800 bool ZeroInitialization)
802 Type->getType().getNonReferenceType(),
803 Type->getTypeLoc().getBeginLoc(),
805 HadMultipleCandidates,
807 StdInitListInitialization,
814 return Type->getTypeLoc().getBeginLoc();
828 bool HadMultipleCandidates,
829 bool ListInitialization,
830 bool StdInitListInitialization,
831 bool ZeroInitialization,
836 HadMultipleCandidates, ListInitialization,
837 StdInitListInitialization,
838 ZeroInitialization, ConstructKind,
846 bool HadMultipleCandidates,
847 bool ListInitialization,
848 bool StdInitListInitialization,
849 bool ZeroInitialization,
853 T->isDependentType(), T->isDependentType(),
854 T->isInstantiationDependentType(),
855 T->containsUnexpandedParameterPack()),
856 Constructor(D), Loc(Loc), ParenOrBraceRange(ParenOrBraceRange),
858 Elidable(elidable), HadMultipleCandidates(HadMultipleCandidates),
859 ListInitialization(ListInitialization),
860 StdInitListInitialization(StdInitListInitialization),
861 ZeroInitialization(ZeroInitialization),
862 ConstructKind(ConstructKind), Args(nullptr)
865 Args =
new (
C)
Stmt*[args.size()];
867 for (
unsigned i = 0; i != args.size(); ++i) {
868 assert(args[i] &&
"NULL argument in CXXConstructExpr");
871 ExprBits.ValueDependent =
true;
873 ExprBits.InstantiationDependent =
true;
875 ExprBits.ContainsUnexpandedParameterPack =
true;
885 : DeclAndBits(Var, 0), Loc(Loc), EllipsisLoc(EllipsisLoc)
889 Bits |= Capture_Implicit;
893 assert(!Var &&
"'this' capture cannot have a variable!");
897 Bits |= Capture_ByCopy;
900 assert(Var &&
"capture must have a variable!");
903 assert(!Var &&
"VLA type capture cannot have a variable!");
904 Bits |= Capture_ByCopy;
907 DeclAndBits.setInt(Bits);
911 Decl *D = DeclAndBits.getPointer();
912 bool CapByCopy = DeclAndBits.getInt() & Capture_ByCopy;
927 bool ContainsUnexpandedParameterPack)
929 T->isDependentType(), T->isDependentType(),
930 ContainsUnexpandedParameterPack),
931 IntroducerRange(IntroducerRange), CaptureDefaultLoc(CaptureDefaultLoc),
932 NumCaptures(Captures.size()), CaptureDefault(CaptureDefault),
933 ExplicitParams(ExplicitParams), ExplicitResultType(ExplicitResultType),
934 ClosingBrace(ClosingBrace) {
935 assert(CaptureInits.size() == Captures.size() &&
"Wrong number of arguments");
937 CXXRecordDecl::LambdaDefinitionData &Data = Class->getLambdaData();
943 Data.NumCaptures = NumCaptures;
944 Data.NumExplicitCaptures = 0;
948 for (
unsigned I = 0, N = Captures.size();
I != N; ++
I) {
950 ++Data.NumExplicitCaptures;
952 *ToCapture++ = Captures[
I];
956 Stmt **Stored = getStoredStmts();
957 for (
unsigned I = 0, N = CaptureInits.size();
I != N; ++
I)
958 *Stored++ = CaptureInits[
I];
961 *Stored++ = getCallOperator()->getBody();
964 HasArrayIndexVars = !ArrayIndexVars.empty();
965 if (HasArrayIndexVars) {
966 assert(ArrayIndexStarts.size() == NumCaptures);
967 memcpy(getArrayIndexVars(), ArrayIndexVars.data(),
968 sizeof(
VarDecl *) * ArrayIndexVars.size());
969 memcpy(getArrayIndexStarts(), ArrayIndexStarts.data(),
970 sizeof(
unsigned) * Captures.size());
971 getArrayIndexStarts()[Captures.size()] = ArrayIndexVars.size();
979 bool ExplicitParams,
bool ExplicitResultType,
ArrayRef<Expr *> CaptureInits,
981 SourceLocation ClosingBrace,
bool ContainsUnexpandedParameterPack) {
986 unsigned Size = totalSizeToAlloc<Stmt *, unsigned, VarDecl *>(
987 Captures.size() + 1, ArrayIndexVars.empty() ? 0 : Captures.size() + 1,
988 ArrayIndexVars.size());
990 return new (Mem)
LambdaExpr(T, IntroducerRange,
991 CaptureDefault, CaptureDefaultLoc, Captures,
992 ExplicitParams, ExplicitResultType,
993 CaptureInits, ArrayIndexVars, ArrayIndexStarts,
994 ClosingBrace, ContainsUnexpandedParameterPack);
998 unsigned NumCaptures,
999 unsigned NumArrayIndexVars) {
1000 unsigned Size = totalSizeToAlloc<Stmt *, unsigned, VarDecl *>(
1001 NumCaptures + 1, NumArrayIndexVars ? NumCaptures + 1 : 0,
1004 return new (Mem)
LambdaExpr(EmptyShell(), NumCaptures, NumArrayIndexVars > 0);
1029 struct CXXRecordDecl::LambdaDefinitionData &Data
1031 return Data.Captures + Data.NumExplicitCaptures;
1052 assert(HasArrayIndexVars &&
"No array index-var data?");
1056 "Capture index out-of-range");
1057 VarDecl *
const *IndexVars = getArrayIndexVars();
1058 const unsigned *IndexStarts = getArrayIndexStarts();
1059 return llvm::makeArrayRef(IndexVars + IndexStarts[Index],
1060 IndexVars + IndexStarts[Index + 1]);
1082 if (!getStoredStmts()[NumCaptures])
1083 *
const_cast<clang::Stmt **
>(&getStoredStmts()[NumCaptures]) =
1086 return static_cast<CompoundStmt *
>(getStoredStmts()[NumCaptures]);
1093 ExprWithCleanups::ExprWithCleanups(
Expr *subexpr,
1095 :
Expr(ExprWithCleanupsClass, subexpr->getType(),
1096 subexpr->getValueKind(), subexpr->getObjectKind(),
1097 subexpr->isTypeDependent(), subexpr->isValueDependent(),
1098 subexpr->isInstantiationDependent(),
1099 subexpr->containsUnexpandedParameterPack()),
1101 ExprWithCleanupsBits.NumObjects = objects.size();
1102 for (
unsigned i = 0, e = objects.size(); i != e; ++i)
1103 getTrailingObjects<CleanupObject>()[i] = objects[i];
1108 void *buffer = C.
Allocate(totalSizeToAlloc<CleanupObject>(objects.size()),
1109 llvm::alignOf<ExprWithCleanups>());
1113 ExprWithCleanups::ExprWithCleanups(EmptyShell empty,
unsigned numObjects)
1114 :
Expr(ExprWithCleanupsClass, empty) {
1115 ExprWithCleanupsBits.NumObjects = numObjects;
1120 unsigned numObjects) {
1121 void *buffer = C.
Allocate(totalSizeToAlloc<CleanupObject>(numObjects),
1122 llvm::alignOf<ExprWithCleanups>());
1130 :
Expr(CXXUnresolvedConstructExprClass,
1131 Type->getType().getNonReferenceType(),
1132 (Type->getType()->isLValueReferenceType() ?
VK_LValue
1133 :Type->getType()->isRValueReferenceType()?
VK_XValue
1136 Type->getType()->isDependentType(),
true,
true,
1137 Type->getType()->containsUnexpandedParameterPack()),
1139 LParenLoc(LParenLoc),
1140 RParenLoc(RParenLoc),
1142 Expr **StoredArgs = getTrailingObjects<Expr *>();
1143 for (
unsigned I = 0;
I != Args.size(); ++
I) {
1145 ExprBits.ContainsUnexpandedParameterPack =
true;
1147 StoredArgs[
I] = Args[
I];
1157 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(Args.size()));
1163 Stmt::EmptyShell Empty;
1164 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(NumArgs));
1172 CXXDependentScopeMemberExpr::CXXDependentScopeMemberExpr(
1178 :
Expr(CXXDependentScopeMemberExprClass, C.DependentTy,
VK_LValue,
1180 ((Base && Base->containsUnexpandedParameterPack()) ||
1182 QualifierLoc.getNestedNameSpecifier()
1183 ->containsUnexpandedParameterPack()) ||
1184 MemberNameInfo.containsUnexpandedParameterPack())),
1185 Base(Base), BaseType(BaseType), IsArrow(IsArrow),
1186 HasTemplateKWAndArgsInfo(TemplateArgs != nullptr ||
1187 TemplateKWLoc.isValid()),
1188 OperatorLoc(OperatorLoc), QualifierLoc(QualifierLoc),
1189 FirstQualifierFoundInScope(FirstQualifierFoundInScope),
1190 MemberNameInfo(MemberNameInfo) {
1192 bool Dependent =
true;
1193 bool InstantiationDependent =
true;
1194 bool ContainsUnexpandedParameterPack =
false;
1195 getTrailingObjects<ASTTemplateKWAndArgsInfo>()->initializeFrom(
1196 TemplateKWLoc, *TemplateArgs, getTrailingObjects<TemplateArgumentLoc>(),
1197 Dependent, InstantiationDependent, ContainsUnexpandedParameterPack);
1198 if (ContainsUnexpandedParameterPack)
1199 ExprBits.ContainsUnexpandedParameterPack =
true;
1200 }
else if (TemplateKWLoc.
isValid()) {
1201 getTrailingObjects<ASTTemplateKWAndArgsInfo>()->initializeFrom(
1215 bool HasTemplateKWAndArgsInfo = TemplateArgs || TemplateKWLoc.
isValid();
1216 unsigned NumTemplateArgs = TemplateArgs ? TemplateArgs->
size() : 0;
1218 totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>(
1219 HasTemplateKWAndArgsInfo, NumTemplateArgs);
1221 void *Mem = C.
Allocate(Size, llvm::alignOf<CXXDependentScopeMemberExpr>());
1223 IsArrow, OperatorLoc,
1226 FirstQualifierFoundInScope,
1227 MemberNameInfo, TemplateArgs);
1232 bool HasTemplateKWAndArgsInfo,
1233 unsigned NumTemplateArgs) {
1234 assert(NumTemplateArgs == 0 || HasTemplateKWAndArgsInfo);
1236 totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>(
1237 HasTemplateKWAndArgsInfo, NumTemplateArgs);
1238 void *Mem = C.
Allocate(Size, llvm::alignOf<CXXDependentScopeMemberExpr>());
1245 E->HasTemplateKWAndArgsInfo = HasTemplateKWAndArgsInfo;
1260 if (isa<UnresolvedUsingValueDecl>(decl))
1268 }
while (++begin != end);
1273 UnresolvedMemberExpr::UnresolvedMemberExpr(
const ASTContext &C,
1274 bool HasUnresolvedUsing,
1284 :
OverloadExpr(UnresolvedMemberExprClass, C, QualifierLoc, TemplateKWLoc,
1285 MemberNameInfo, TemplateArgs, Begin, End,
1287 ((Base && Base->isTypeDependent()) ||
1288 BaseType->isDependentType()),
1289 ((Base && Base->isInstantiationDependent()) ||
1290 BaseType->isInstantiationDependentType()),
1292 ((Base && Base->containsUnexpandedParameterPack()) ||
1293 BaseType->containsUnexpandedParameterPack())),
1294 IsArrow(IsArrow), HasUnresolvedUsing(HasUnresolvedUsing),
1295 Base(Base), BaseType(BaseType), OperatorLoc(OperatorLoc) {
1303 bool UnresolvedMemberExpr::isImplicitAccess()
const {
1319 totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>(
1322 void *Mem = C.
Allocate(Size, llvm::alignOf<UnresolvedMemberExpr>());
1324 C, HasUnresolvedUsing, Base, BaseType, IsArrow, OperatorLoc, QualifierLoc,
1325 TemplateKWLoc, MemberNameInfo, TemplateArgs, Begin, End);
1330 bool HasTemplateKWAndArgsInfo,
1331 unsigned NumTemplateArgs) {
1332 assert(NumTemplateArgs == 0 || HasTemplateKWAndArgsInfo);
1334 totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>(
1337 void *Mem = C.
Allocate(Size, llvm::alignOf<UnresolvedMemberExpr>());
1353 assert(T &&
"qualifier in member expression does not name type");
1355 assert(Record &&
"qualifier in member expression does not name record");
1362 assert(PT &&
"base of arrow member access is not pointer");
1367 assert(Record &&
"base of member expression does not name record");
1380 Context.
Allocate(totalSizeToAlloc<TemplateArgument>(PartialArgs.size()));
1382 PackLoc, RParenLoc,
Length, PartialArgs);
1386 unsigned NumPartialArgs) {
1388 Context.
Allocate(totalSizeToAlloc<TemplateArgument>(NumPartialArgs));
1389 return new (Storage)
SizeOfPackExpr(EmptyShell(), NumPartialArgs);
1392 SubstNonTypeTemplateParmPackExpr::
1399 Param(Param), Arguments(ArgPack.pack_begin()),
1400 NumArguments(ArgPack.pack_size()), NameLoc(NameLoc) { }
1412 ParamPack(ParamPack), NameLoc(NameLoc), NumParameters(NumParams) {
1414 std::uninitialized_copy(Params, Params + NumParams,
1415 getTrailingObjects<ParmVarDecl *>());
1422 return new (Context.
Allocate(totalSizeToAlloc<ParmVarDecl *>(Params.size())))
1428 unsigned NumParams) {
1429 return new (Context.
Allocate(totalSizeToAlloc<ParmVarDecl *>(NumParams)))
1434 unsigned ManglingNumber) {
1441 if (!
State.is<ExtraState *>()) {
1447 auto ES =
State.get<ExtraState *>();
1448 ES->ExtendingDecl = ExtendedBy;
1449 ES->ManglingNumber = ManglingNumber;
1461 Loc(Loc), RParenLoc(RParenLoc)
1463 TypeTraitExprBits.Kind =
Kind;
1464 TypeTraitExprBits.Value =
Value;
1465 TypeTraitExprBits.NumArgs = Args.size();
1467 TypeSourceInfo **ToArgs = getTrailingObjects<TypeSourceInfo *>();
1469 for (
unsigned I = 0, N = Args.size();
I != N; ++
I) {
1477 ToArgs[
I] = Args[
I];
1487 void *Mem = C.
Allocate(totalSizeToAlloc<TypeSourceInfo *>(Args.size()));
1488 return new (Mem)
TypeTraitExpr(T, Loc, Kind, Args, RParenLoc, Value);
1493 void *Mem = C.
Allocate(totalSizeToAlloc<TypeSourceInfo *>(NumArgs));
1497 void ArrayTypeTraitExpr::anchor() { }
Raw form: operator "" X (const char *)
SourceRange getParenOrBraceRange() const
void setValueDependent(bool VD)
Set whether this expression is value-dependent or not.
Defines the clang::ASTContext interface.
LiteralOperatorKind
The kind of literal operator which is invoked.
operator "" X (long double)
CXXNewExpr(const ASTContext &C, bool globalNew, FunctionDecl *operatorNew, FunctionDecl *operatorDelete, bool usualArrayDeleteWantsSize, ArrayRef< Expr * > placementArgs, SourceRange typeIdParens, Expr *arraySize, InitializationStyle initializationStyle, Expr *initializer, QualType ty, TypeSourceInfo *AllocatedTypeInfo, SourceRange Range, SourceRange directInitRange)
SourceLocation getEnd() const
FunctionDecl - An instance of this class is created to represent a function declaration or definition...
bool isDerivedFrom(const CXXRecordDecl *Base) const
Determine whether this class is derived from the class Base.
PointerType - C99 6.7.5.1 - Pointer Declarators.
Stores the type being destroyed by a pseudo-destructor expression.
A (possibly-)qualified type.
bool containsUnexpandedParameterPack() const
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates)...
Expr * getArg(unsigned Arg)
getArg - Return the specified argument.
static CXXDependentScopeMemberExpr * Create(const ASTContext &C, Expr *Base, QualType BaseType, bool IsArrow, SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierFoundInScope, DeclarationNameInfo MemberNameInfo, const TemplateArgumentListInfo *TemplateArgs)
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
bool isInstantiationDependentType() const
Determine whether this type is an instantiation-dependent type, meaning that the type involves a temp...
static CXXConstructExpr * Create(const ASTContext &C, QualType T, SourceLocation Loc, CXXConstructorDecl *D, bool Elidable, ArrayRef< Expr * > Args, bool HadMultipleCandidates, bool ListInitialization, bool StdInitListInitialization, bool ZeroInitialization, ConstructionKind ConstructKind, SourceRange ParenOrBraceRange)
static UnresolvedLookupExpr * Create(const ASTContext &C, CXXRecordDecl *NamingClass, NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, bool ADL, bool Overloaded, UnresolvedSetIterator Begin, UnresolvedSetIterator End)
StringRef getUuidAsStringRef(ASTContext &Context) const
bool isAnyCharacterType() const
Determine whether this type is any of the built-in character types.
LambdaCapture(SourceLocation Loc, bool Implicit, LambdaCaptureKind Kind, VarDecl *Var=nullptr, SourceLocation EllipsisLoc=SourceLocation())
Create a new capture of a variable or of this.
CanQualType getSizeType() const
Return the unique type for "size_t" (C99 7.17), defined in <stddef.h>.
static CXXDynamicCastExpr * Create(const ASTContext &Context, QualType T, ExprValueKind VK, CastKind Kind, Expr *Op, const CXXCastPath *Path, TypeSourceInfo *Written, SourceLocation L, SourceLocation RParenLoc, SourceRange AngleBrackets)
Microsoft's '__super' specifier, stored as a CXXRecordDecl* of the class it appeared in...
bool isRecordType() const
Decl - This represents one declaration (or definition), e.g.
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Defines the C++ template declaration subclasses.
capture_range captures() const
Retrieve this lambda's captures.
The base class of the type hierarchy.
std::unique_ptr< llvm::MemoryBuffer > Buffer
The template argument is a declaration that was provided for a pointer, reference, or pointer to member non-type template parameter.
Represents a call to a C++ constructor.
A container of type source information.
SourceLocation getLocStart() const LLVM_READONLY
static CXXFunctionalCastExpr * Create(const ASTContext &Context, QualType T, ExprValueKind VK, TypeSourceInfo *Written, CastKind Kind, Expr *Op, const CXXCastPath *Path, SourceLocation LPLoc, SourceLocation RPLoc)
Describes the capture of a variable or of this, or of a C++1y init-capture.
Represents a C++ constructor within a class.
SourceLocation getLocEnd() const LLVM_READONLY
capture_iterator capture_begin() const
Retrieve an iterator pointing to the first lambda capture.
Expr *const * const_capture_init_iterator
Const iterator that walks over the capture initialization arguments.
SourceRange getSourceRange() const LLVM_READONLY
VarDecl - An instance of this class is created to represent a variable declaration or definition...
const Expr * getCallee() const
SourceLocation getLocEnd() const LLVM_READONLY
static FunctionParmPackExpr * CreateEmpty(const ASTContext &Context, unsigned NumParams)
static DependentScopeDeclRefExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
NamedDecl * getUnderlyingDecl()
Looks through UsingDecls and ObjCCompatibleAliasDecls for the underlying named decl.
Stores a list of template parameters for a TemplateDecl and its derived classes.
SourceLocation getOperatorLoc() const
Returns the location of the operator symbol in the expression.
void setContainsUnexpandedParameterPack(bool PP=true)
Set the bit that describes whether this expression contains an unexpanded parameter pack...
void initializeResults(const ASTContext &C, UnresolvedSetIterator Begin, UnresolvedSetIterator End)
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
bool containsUnexpandedParameterPack() const
Whether this type is or contains an unexpanded parameter pack, used to support C++0x variadic templat...
ParmVarDecl - Represents a parameter to a function.
QualType getBaseType() const
NullPointerConstantKind isNullPointerConstant(ASTContext &Ctx, NullPointerConstantValueDependence NPC) const
isNullPointerConstant - C99 6.3.2.3p3 - Test if this reduces down to a Null pointer constant...
Defines the clang::Expr interface and subclasses for C++ expressions.
The collection of all-type qualifiers we support.
A C++ static_cast expression (C++ [expr.static.cast]).
static CXXUnresolvedConstructExpr * Create(const ASTContext &C, TypeSourceInfo *Type, SourceLocation LParenLoc, ArrayRef< Expr * > Args, SourceLocation RParenLoc)
void AllocateArgsArray(const ASTContext &C, bool isArray, unsigned numPlaceArgs, bool hasInitializer)
One of these records is kept for each identifier that is lexed.
Represents a class template specialization, which refers to a class template with a given set of temp...
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
A C++ nested-name-specifier augmented with source location information.
bool isReferenceType() const
bool isImplicitCXXThis() const
Whether this expression is an implicit reference to 'this' in C++.
LambdaCaptureKind
The different capture forms in a lambda introducer.
FieldDecl - An instance of this class is created by Sema::ActOnField to represent a member of a struc...
bool isAnyPointerType() const
CXXRecordDecl * getNamingClass() const
Gets the naming class of this lookup, if any.
Expr * getImplicitObjectArgument() const
Retrieves the implicit object argument for the member call.
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
CXXTemporaryObjectExpr(const ASTContext &C, CXXConstructorDecl *Cons, TypeSourceInfo *Type, ArrayRef< Expr * > Args, SourceRange ParenOrBraceRange, bool HadMultipleCandidates, bool ListInitialization, bool StdInitListInitialization, bool ZeroInitialization)
The iterator over UnresolvedSets.
SourceRange getLocalSourceRange() const
Get the local source range.
bool isPotentiallyEvaluated() const
Determine whether this typeid has a type operand which is potentially evaluated, per C++11 [expr...
CXXMethodDecl * getCallOperator() const
Retrieve the function call operator associated with this lambda expression.
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
QualType getTypeDeclType(const TypeDecl *Decl, const TypeDecl *PrevDecl=nullptr) const
Return the unique reference to the type for the specified type declaration.
SourceLocation getRParenLoc() const
An r-value expression (a pr-value in the C++11 taxonomy) produces a temporary value.
SourceLocation getBeginLoc() const
Get the begin source location.
bool isAlwaysNull() const
isAlwaysNull - Return whether the result of the dynamic_cast is proven to always be null...
Capturing by copy (a.k.a., by value)
A convenient class for passing around template argument information.
ArrayRef< VarDecl * > getCaptureInitIndexVars(const_capture_init_iterator Iter) const
Retrieve the set of index variables used in the capture initializer of an array captured by copy...
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
Expr * getInitializer()
The initializer of this new-expression.
An x-value expression is a reference to an object with independent storage but which can be "moved"...
Expr * getExprOperand() const
capture_iterator capture_end() const
Retrieve an iterator pointing past the end of the sequence of lambda captures.
A builtin binary operation expression such as "x + y" or "x <= y".
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
InitializationStyle getInitializationStyle() const
The kind of initializer this new-expression has.
New-expression has a C++98 paren-delimited initializer.
SourceLocation getLocEnd() const LLVM_READONLY
TypeSourceInfo * getTypeSourceInfo() const
VarDecl * getCapturedVar() const
Retrieve the declaration of the local variable being captured.
QualType getDestroyedType() const
Retrieve the type being destroyed.
Represents binding an expression to a temporary.
CompoundStmt * getBody() const
Retrieve the body of the lambda.
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
QualType getTypeOperand(ASTContext &Context) const
Retrieves the type operand of this __uuidof() expression after various required adjustments (removing...
TypeSourceInfo * getTypeInfoAsWritten() const
getTypeInfoAsWritten - Returns the type source info for the type that this expression is casting to...
An ordinary object is located at an address in memory.
Represents a C++ member access expression where the actual member referenced could not be resolved be...
capture_iterator implicit_capture_end() const
Retrieve an iterator pointing past the end of the sequence of implicit lambda captures.
detail::InMemoryDirectory::const_iterator I
New-expression has no initializer as written.
TypeTrait
Names for traits that operate specifically on types.
SourceLocation getLocation() const
static LambdaExpr * CreateDeserialized(const ASTContext &C, unsigned NumCaptures, unsigned NumArrayIndexVars)
Construct a new lambda expression that will be deserialized from an external source.
CXXRecordDecl * getMostRecentDecl()
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
CompoundStmt - This represents a group of statements like { stmt stmt }.
Represents a prototype with parameter type info, e.g.
CXXMethodDecl * getMethodDecl() const
Retrieves the declaration of the called method.
CastKind
CastKind - The kind of operation required for a conversion.
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on a template...
bool HasTemplateKWAndArgsInfo
Whether the name includes info for explicit template keyword and arguments.
ArrayRef< TemplateArgument > asArray() const
Produce this as an array ref.
QualType getPointeeType() const
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee...
PseudoDestructorTypeStorage()
bool isMutable() const
Determine whether the lambda is mutable, meaning that any captures values can be modified.
ValueDecl - Represent the declaration of a variable (in which case it is an lvalue) a function (in wh...
Expr - This represents one expression.
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
SourceLocation getLocStart() const LLVM_READONLY
A C++ const_cast expression (C++ [expr.const.cast]).
Represents a C++ destructor within a class.
New-expression has a C++11 list-initializer.
CXXConstructExpr(const ASTContext &C, StmtClass SC, QualType T, SourceLocation Loc, CXXConstructorDecl *d, bool elidable, ArrayRef< Expr * > Args, bool HadMultipleCandidates, bool ListInitialization, bool StdInitListInitialization, bool ZeroInitialization, ConstructionKind ConstructKind, SourceRange ParenOrBraceRange)
static CXXStaticCastExpr * Create(const ASTContext &Context, QualType T, ExprValueKind VK, CastKind K, Expr *Op, const CXXCastPath *Path, TypeSourceInfo *Written, SourceLocation L, SourceLocation RParenLoc, SourceRange AngleBrackets)
static CXXReinterpretCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
DeclContext * getDeclContext()
bool isFloatingType() const
Represents an expression that computes the length of a parameter pack.
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
static DependentScopeDeclRefExpr * Create(const ASTContext &C, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
Defines the clang::TypeLoc interface and its subclasses.
CXXRecordDecl * getNamingClass() const
Retrieve the naming class of this lookup.
Specifies that a value-dependent expression of integral or dependent type should be considered a null...
bool isExplicit() const
Determine whether this was an explicit capture (written between the square brackets introducing the l...
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
bool shouldNullCheckAllocation(const ASTContext &Ctx) const
True if the allocation result needs to be null-checked.
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
CXXMethodDecl * getLambdaCallOperator() const
Retrieve the lambda call operator of the closure type if this is a closure type.
class LLVM_ALIGNAS(8) TemplateSpecializationType unsigned NumArgs
Represents a type template specialization; the template must be a class template, a type alias templa...
const Type * getAsType() const
Retrieve the type stored in this nested name specifier.
capture_iterator implicit_capture_begin() const
Retrieve an iterator pointing to the first implicit lambda capture.
SourceLocation getLocStart() const LLVM_READONLY
LambdaCaptureKind getCaptureKind() const
Determine the kind of capture.
Stmt * getBody(const FunctionDecl *&Definition) const
getBody - Retrieve the body (definition) of the function.
TypeLoc getTypeLoc() const
Return the TypeLoc wrapper for the type source info.
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
SourceLocation getLocStart() const LLVM_READONLY
static CXXConstCastExpr * Create(const ASTContext &Context, QualType T, ExprValueKind VK, Expr *Op, TypeSourceInfo *WrittenTy, SourceLocation L, SourceLocation RParenLoc, SourceRange AngleBrackets)
static CXXBindTemporaryExpr * Create(const ASTContext &C, CXXTemporary *Temp, Expr *SubExpr)
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr...
operator "" X (const CharT *, size_t)
FunctionDecl * getAsFunction() LLVM_READONLY
Returns the function itself, or the templated function if this is a function template.
Raw form: operator "" X<cs...> ()
static CXXDynamicCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
CXXRecordDecl * getRecordDecl() const
Retrieves the CXXRecordDecl for the underlying type of the implicit object argument.
Encodes a location in the source.
const Type * getTypePtr() const
Retrieves a pointer to the underlying (unqualified) type.
Represents a C++ temporary.
static CXXDependentScopeMemberExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
static CXXConstCastExpr * CreateEmpty(const ASTContext &Context)
bool isValid() const
Return true if this is a valid SourceLocation object.
static SizeOfPackExpr * Create(ASTContext &Context, SourceLocation OperatorLoc, NamedDecl *Pack, SourceLocation PackLoc, SourceLocation RParenLoc, Optional< unsigned > Length=None, ArrayRef< TemplateArgument > PartialArgs=None)
ASTContext & getASTContext() const LLVM_READONLY
static const UuidAttr * GetUuidAttrOfType(QualType QT, bool *HasMultipleGUIDsPtr=nullptr)
Grabs __declspec(uuid()) off a type, or returns 0 if we cannot resolve to a single GUID...
OverloadExpr(StmtClass K, const ASTContext &C, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs, UnresolvedSetIterator Begin, UnresolvedSetIterator End, bool KnownDependent, bool KnownInstantiationDependent, bool KnownContainsUnexpandedParameterPack)
TemplateParameterList * getTemplateParameterList() const
If this is a generic lambda expression, retrieve the template parameter list associated with it...
TemplateArgument getArgumentPack() const
Retrieve the template argument pack containing the substituted template arguments.
Represents a static or instance method of a struct/union/class.
static ExprWithCleanups * Create(const ASTContext &C, EmptyShell empty, unsigned numObjects)
bool isImplicitAccess() const
True if this is an implicit access, i.e.
SourceLocation getLocStart() const LLVM_READONLY
bool isInitCapture(const LambdaCapture *Capture) const
Determine whether one of this lambda's captures is an init-capture.
const Type * getBaseElementTypeUnsafe() const
Get the base element type of this type, potentially discarding type qualifiers.
LiteralOperatorKind getLiteralOperatorKind() const
Returns the kind of literal operator invocation which this expression represents. ...
capture_iterator explicit_capture_end() const
Retrieve an iterator pointing past the end of the sequence of explicit lambda captures.
SourceLocation getBegin() const
bool isTypeDependent() const
isTypeDependent - Determines whether this expression is type-dependent (C++ [temp.dep.expr]), which means that its type could change from one template instantiation to the next.
const T * castAs() const
Member-template castAs<specific type>.
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '...
static SizeOfPackExpr * CreateDeserialized(ASTContext &Context, unsigned NumPartialArgs)
QualType getType() const
Return the type wrapped by this type source info.
static CXXReinterpretCastExpr * Create(const ASTContext &Context, QualType T, ExprValueKind VK, CastKind Kind, Expr *Op, const CXXCastPath *Path, TypeSourceInfo *WrittenTy, SourceLocation L, SourceLocation RParenLoc, SourceRange AngleBrackets)
QualType getPointeeType() const
A qualified reference to a name whose declaration cannot yet be resolved.
static bool hasOnlyNonStaticMemberFunctions(UnresolvedSetIterator begin, UnresolvedSetIterator end)
A POD class for pairing a NamedDecl* with an access specifier.
const char * getCastName() const
getCastName - Get the name of the C++ cast being used, e.g., "static_cast", "dynamic_cast", "reinterpret_cast", or "const_cast".
bool isInitCapture() const
Whether this variable is the implicit variable for a lambda init-capture.
if(T->getSizeExpr()) TRY_TO(TraverseStmt(T-> getSizeExpr()))
Represents a reference to a function parameter pack that has been substituted but not yet expanded...
Represents a template argument.
void setExtendingDecl(const ValueDecl *ExtendedBy, unsigned ManglingNumber)
QualType getTypeOperand(ASTContext &Context) const
Retrieves the type operand of this typeid() expression after various required adjustments (removing r...
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
SourceLocation getLocStart() const LLVM_READONLY
bool isDefaultArgument() const
Determine whether this expression is a default function argument.
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
void setInstantiationDependent(bool ID)
Set whether this expression is instantiation-dependent or not.
bool isTypeOperand() const
detail::InMemoryDirectory::const_iterator E
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
unsigned getNumArgs() const
SourceLocation getLocEnd() const LLVM_READONLY
QualType getNonReferenceType() const
If Type is a reference type (e.g., const int&), returns the type that the reference refers to ("const...
Capturing variable-length array type.
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
TemplateArgumentLoc * getTrailingTemplateArgumentLoc()
Return the optional template arguments.
llvm::iterator_range< capture_iterator > capture_range
An iterator over a range of lambda captures.
FunctionDecl * getOperatorNew() const
const T * getAs() const
Member-template getAs<specific type>'.
capture_iterator explicit_capture_begin() const
Retrieve an iterator pointing to the first explicit lambda capture.
static UnresolvedMemberExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Expr * getArg(unsigned Arg)
Return the specified argument.
CanQualType BoundMemberTy
CXXRecordDecl * getAsCXXRecordDecl() const
Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or beca...
Expr * getExprOperand() const
The template argument is a type.
static CXXFunctionalCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
Capturing the this pointer.
Represents a base class of a C++ class.
TemplateParameterList * getGenericLambdaTemplateParameterList() const
Retrieve the generic lambda's template parameter list.
static FunctionParmPackExpr * Create(const ASTContext &Context, QualType T, ParmVarDecl *ParamPack, SourceLocation NameLoc, ArrayRef< ParmVarDecl * > Params)
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
A template argument list.
static UnresolvedMemberExpr * Create(const ASTContext &C, bool HasUnresolvedUsing, Expr *Base, QualType BaseType, bool IsArrow, SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &MemberNameInfo, const TemplateArgumentListInfo *TemplateArgs, UnresolvedSetIterator Begin, UnresolvedSetIterator End)
static UnresolvedLookupExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
capture_range explicit_captures() const
Retrieve this lambda's explicit captures.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
const IdentifierInfo * getUDSuffix() const
Returns the ud-suffix specified for this literal.
void setEnd(SourceLocation e)
Represents a C++ struct/union/class.
static CXXStaticCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
SourceLocation getLocStart() const LLVM_READONLY
capture_range implicit_captures() const
Retrieve this lambda's implicit captures.
static CXXTemporary * Create(const ASTContext &C, const CXXDestructorDecl *Destructor)
static CXXUnresolvedConstructExpr * CreateEmpty(const ASTContext &C, unsigned NumArgs)
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
static TypeTraitExpr * Create(const ASTContext &C, QualType T, SourceLocation Loc, TypeTrait Kind, ArrayRef< TypeSourceInfo * > Args, SourceLocation RParenLoc, bool Value)
Create a new type trait expression.
static TypeTraitExpr * CreateDeserialized(const ASTContext &C, unsigned NumArgs)
void * Allocate(size_t Size, unsigned Align=8) const
bool isReservedGlobalPlacementOperator() const
Determines whether this operator new or delete is one of the reserved global placement operators: voi...
SourceLocation getLocEnd() const LLVM_READONLY
CXXPseudoDestructorExpr(const ASTContext &Context, Expr *Base, bool isArrow, SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc, TypeSourceInfo *ScopeType, SourceLocation ColonColonLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage DestroyedType)
An l-value expression is a reference to an object with independent storage.
A trivial tuple used to represent a source range.
NamedDecl - This represents a decl with a name.
NestedNameSpecifier * getQualifier() const
Fetches the nested-name qualifier, if one was given.
QualType getDestroyedType() const
Retrieve the type being destroyed.
bool isTypeOperand() const
static LambdaExpr * Create(const ASTContext &C, CXXRecordDecl *Class, SourceRange IntroducerRange, LambdaCaptureDefault CaptureDefault, SourceLocation CaptureDefaultLoc, ArrayRef< LambdaCapture > Captures, bool ExplicitParams, bool ExplicitResultType, ArrayRef< Expr * > CaptureInits, ArrayRef< VarDecl * > ArrayIndexVars, ArrayRef< unsigned > ArrayIndexStarts, SourceLocation ClosingBrace, bool ContainsUnexpandedParameterPack)
Construct a new lambda expression.
CXXRecordDecl * getLambdaClass() const
Retrieve the class that corresponds to the lambda.
QualType getUnqualifiedArrayType(QualType T, Qualifiers &Quals)
Return this type as a completely-unqualified array type, capturing the qualifiers in Quals...
operator "" X (unsigned long long)
bool isIntegerType() const
isIntegerType() does not include complex integers (a GCC extension).
Expr * getCookedLiteral()
If this is not a raw user-defined literal, get the underlying cooked literal (representing the litera...
Expr * IgnoreParens() LLVM_READONLY
IgnoreParens - Ignore parentheses.
bool capturesVariable() const
Determine whether this capture handles a variable.
bool hasInClassInitializer() const
hasInClassInitializer - Determine whether this member has a C++11 in-class initializer.
bool isPointerType() const