32 #include "llvm/ADT/ArrayRef.h" 33 #include "llvm/Support/Casting.h" 34 #include "llvm/Support/ErrorHandling.h" 40 using namespace clang;
55 case OO_Call:
case OO_Subscript:
69 const Expr *E = getExprOperand();
71 if (RD->isPolymorphic() && E->
isGLValue())
78 assert(isTypeOperand() &&
"Cannot call getTypeOperand for typeid(expr)");
85 assert(isTypeOperand() &&
"Cannot call getTypeOperand for __uuidof(expr)");
99 bool PassAlignment,
bool usualArrayDeleteWantsSize,
107 ty->isDependentType(), ty->isInstantiationDependentType(),
109 OperatorNew(operatorNew), OperatorDelete(operatorDelete),
110 AllocatedTypeInfo(allocatedTypeInfo), TypeIdParens(typeIdParens),
111 Range(Range), DirectInitRange(directInitRange), GlobalNew(globalNew),
112 PassAlignment(PassAlignment),
113 UsualArrayDeleteWantsSize(usualArrayDeleteWantsSize) {
114 assert((initializer !=
nullptr || initializationStyle ==
NoInit) &&
115 "Only NoInit can have no initializer.");
116 StoredInitializationStyle = initializer ? initializationStyle + 1 : 0;
118 initializer !=
nullptr);
122 ExprBits.InstantiationDependent =
true;
125 ExprBits.ContainsUnexpandedParameterPack =
true;
127 SubExprs[i++] = arraySize;
132 ExprBits.InstantiationDependent =
true;
135 ExprBits.ContainsUnexpandedParameterPack =
true;
137 SubExprs[i++] = initializer;
140 for (
unsigned j = 0; j != placementArgs.size(); ++j) {
142 ExprBits.InstantiationDependent =
true;
144 ExprBits.ContainsUnexpandedParameterPack =
true;
146 SubExprs[i++] = placementArgs[j];
163 assert(SubExprs ==
nullptr &&
"SubExprs already allocated");
165 NumPlacementArgs = numPlaceArgs;
167 unsigned TotalSize = Array + hasInitializer + NumPlacementArgs;
168 SubExprs =
new (
C)
Stmt*[TotalSize];
184 while (
const auto *ICE = dyn_cast<ImplicitCastExpr>(Arg)) {
185 if (ICE->getCastKind() == CK_DerivedToBase ||
186 ICE->getCastKind() == CK_UncheckedDerivedToBase ||
187 ICE->getCastKind() == CK_NoOp) {
188 assert((ICE->getCastKind() == CK_NoOp ||
190 "only a destroying operator delete can have a converted arg");
191 Arg = ICE->getSubExpr();
216 :
Expr(CXXPseudoDestructorExprClass,
217 Context.BoundMemberTy,
219 (Base->isTypeDependent() ||
222 Base->isValueDependent(),
223 (Base->isInstantiationDependent() ||
225 QualifierLoc.getNestedNameSpecifier()->isInstantiationDependent()) ||
227 ScopeType->getType()->isInstantiationDependentType()) ||
230 ->isInstantiationDependentType())),
232 (Base->containsUnexpandedParameterPack() ||
234 QualifierLoc.getNestedNameSpecifier()
235 ->containsUnexpandedParameterPack()) ||
237 ScopeType->getType()->containsUnexpandedParameterPack()) ||
240 ->containsUnexpandedParameterPack()))),
241 Base(static_cast<
Stmt *>(Base)), IsArrow(isArrow),
242 OperatorLoc(OperatorLoc), QualifierLoc(QualifierLoc),
243 ScopeType(ScopeType), ColonColonLoc(ColonColonLoc), TildeLoc(TildeLoc),
244 DestroyedType(DestroyedType) {}
248 return TInfo->getType();
256 End = TInfo->getTypeLoc().getLocalSourceRange().getEnd();
271 assert(Args || TemplateKWLoc.
isValid());
272 unsigned num_args = Args ? Args->
size() : 0;
275 totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>(1,
279 TemplateKWLoc, NameInfo,
286 bool HasTemplateKWAndArgsInfo,
287 unsigned NumTemplateArgs) {
288 assert(NumTemplateArgs == 0 || HasTemplateKWAndArgsInfo);
290 totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>(
291 HasTemplateKWAndArgsInfo, NumTemplateArgs);
294 E->HasTemplateKWAndArgsInfo = HasTemplateKWAndArgsInfo;
306 bool KnownInstantiationDependent,
307 bool KnownContainsUnexpandedParameterPack)
310 (KnownInstantiationDependent ||
314 (KnownContainsUnexpandedParameterPack ||
317 QualifierLoc.getNestedNameSpecifier()
319 NameInfo(NameInfo), QualifierLoc(QualifierLoc), NumResults(End - Begin),
320 HasTemplateKWAndArgsInfo(TemplateArgs != nullptr ||
321 TemplateKWLoc.isValid()) {
322 NumResults = End -
Begin;
326 if ((*I)->getDeclContext()->isDependentContext() ||
327 isa<UnresolvedUsingValueDecl>(*I)) {
330 ExprBits.InstantiationDependent =
true;
343 bool Dependent =
false;
344 bool InstantiationDependent =
false;
345 bool ContainsUnexpandedParameterPack =
false;
348 Dependent, InstantiationDependent, ContainsUnexpandedParameterPack);
354 if (InstantiationDependent)
355 ExprBits.InstantiationDependent =
true;
356 if (ContainsUnexpandedParameterPack)
357 ExprBits.ContainsUnexpandedParameterPack =
true;
358 }
else if (TemplateKWLoc.
isValid()) {
369 assert(!Results &&
"Results already initialized!");
370 NumResults = End -
Begin;
381 if (isa<UnresolvedLookupExpr>(
this))
388 DependentScopeDeclRefExpr::DependentScopeDeclRefExpr(
QualType T,
402 QualifierLoc(QualifierLoc), NameInfo(NameInfo),
406 bool Dependent =
true;
407 bool InstantiationDependent =
true;
408 bool ContainsUnexpandedParameterPack
409 =
ExprBits.ContainsUnexpandedParameterPack;
410 getTrailingObjects<ASTTemplateKWAndArgsInfo>()->initializeFrom(
411 TemplateKWLoc, *Args, getTrailingObjects<TemplateArgumentLoc>(),
412 Dependent, InstantiationDependent, ContainsUnexpandedParameterPack);
413 ExprBits.ContainsUnexpandedParameterPack = ContainsUnexpandedParameterPack;
414 }
else if (TemplateKWLoc.
isValid()) {
415 getTrailingObjects<ASTTemplateKWAndArgsInfo>()->initializeFrom(
426 assert(QualifierLoc &&
"should be created for dependent qualifiers");
429 totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>(
433 TemplateKWLoc, NameInfo, Args);
439 unsigned NumTemplateArgs) {
440 assert(NumTemplateArgs == 0 || HasTemplateKWAndArgsInfo);
442 totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>(
454 if (isa<CXXTemporaryObjectExpr>(
this))
455 return cast<CXXTemporaryObjectExpr>(
this)->
getLocStart();
460 if (isa<CXXTemporaryObjectExpr>(
this))
461 return cast<CXXTemporaryObjectExpr>(
this)->
getLocEnd();
463 if (ParenOrBraceRange.isValid())
464 return ParenOrBraceRange.getEnd();
467 for (
unsigned I = getNumArgs(); I > 0; --I) {
468 const Expr *Arg = getArg(I-1);
481 SourceRange CXXOperatorCallExpr::getSourceRangeImpl()
const {
483 if (Kind == OO_PlusPlus || Kind == OO_MinusMinus) {
484 if (getNumArgs() == 1)
490 }
else if (Kind == OO_Arrow) {
491 return getArg(0)->getSourceRange();
492 }
else if (Kind == OO_Call) {
494 }
else if (Kind == OO_Subscript) {
496 }
else if (getNumArgs() == 1) {
498 }
else if (getNumArgs() == 2) {
501 return getOperatorLoc();
507 if (
const auto *MemExpr = dyn_cast<MemberExpr>(Callee))
508 return MemExpr->getBase();
509 if (
const auto *BO = dyn_cast<BinaryOperator>(Callee))
510 if (BO->getOpcode() == BO_PtrMemD || BO->getOpcode() == BO_PtrMemI)
518 if (
const auto *MemExpr = dyn_cast<MemberExpr>(getCallee()->
IgnoreParens()))
519 return cast<CXXMethodDecl>(MemExpr->getMemberDecl());
526 Expr* ThisArg = getImplicitObjectArgument();
545 case CXXStaticCastExprClass:
return "static_cast";
546 case CXXDynamicCastExprClass:
return "dynamic_cast";
547 case CXXReinterpretCastExprClass:
return "reinterpret_cast";
548 case CXXConstCastExprClass:
return "const_cast";
549 default:
return "<invalid cast>";
561 unsigned PathSize = (BasePath ? BasePath->size() : 0);
563 C.
Allocate(totalSizeToAlloc<CastExpr::BasePathSizeTy, CXXBaseSpecifier *>(
564 PathSize ? 1 : 0, PathSize));
567 RParenLoc, AngleBrackets);
569 std::uninitialized_copy_n(BasePath->data(), BasePath->size(),
577 C.
Allocate(totalSizeToAlloc<CastExpr::BasePathSizeTy, CXXBaseSpecifier *>(
578 PathSize ? 1 : 0, PathSize));
590 unsigned PathSize = (BasePath ? BasePath->size() : 0);
592 C.
Allocate(totalSizeToAlloc<CastExpr::BasePathSizeTy, CXXBaseSpecifier *>(
593 PathSize ? 1 : 0, PathSize));
596 RParenLoc, AngleBrackets);
598 std::uninitialized_copy_n(BasePath->data(), BasePath->size(),
606 C.
Allocate(totalSizeToAlloc<CastExpr::BasePathSizeTy, CXXBaseSpecifier *>(
607 PathSize ? 1 : 0, PathSize));
621 QualType SrcType = getSubExpr()->getType();
635 if (!SrcRD->hasAttr<FinalAttr>())
641 return !DestRD->isDerivedFrom(SrcRD);
651 unsigned PathSize = (BasePath ? BasePath->size() : 0);
653 C.
Allocate(totalSizeToAlloc<CastExpr::BasePathSizeTy, CXXBaseSpecifier *>(
654 PathSize ? 1 : 0, PathSize));
657 RParenLoc, AngleBrackets);
659 std::uninitialized_copy_n(BasePath->data(), BasePath->size(),
667 C.
Allocate(totalSizeToAlloc<CastExpr::BasePathSizeTy, CXXBaseSpecifier *>(
668 PathSize ? 1 : 0, PathSize));
678 return new (
C)
CXXConstCastExpr(T, VK, Op, WrittenTy, L, RParenLoc, AngleBrackets);
690 unsigned PathSize = (BasePath ? BasePath->size() : 0);
692 C.
Allocate(totalSizeToAlloc<CastExpr::BasePathSizeTy, CXXBaseSpecifier *>(
693 PathSize ? 1 : 0, PathSize));
697 std::uninitialized_copy_n(BasePath->data(), BasePath->size(),
705 C.
Allocate(totalSizeToAlloc<CastExpr::BasePathSizeTy, CXXBaseSpecifier *>(
706 PathSize ? 1 : 0, PathSize));
711 return getTypeInfoAsWritten()->getTypeLoc().getLocStart();
715 return RParenLoc.
isValid() ? RParenLoc : getSubExpr()->getLocEnd();
720 if (getNumArgs() == 0)
722 if (getNumArgs() == 2)
725 assert(getNumArgs() == 1 &&
"unexpected #args in literal operator call");
727 cast<FunctionDecl>(getCalleeDecl())->getParamDecl(0)->getType();
731 return LOK_Character;
737 llvm_unreachable(
"unknown kind of literal operator");
743 assert(LOK != LOK_Template && LOK != LOK_Raw &&
"not a cooked literal");
749 return cast<FunctionDecl>(getCalleeDecl())->getLiteralIdentifier();
759 Field(Field), Loc(Loc) {
773 "Expression bound to a temporary must have record or array type!");
784 bool HadMultipleCandidates,
785 bool ListInitialization,
786 bool StdInitListInitialization,
787 bool ZeroInitialization)
790 HadMultipleCandidates, ListInitialization,
791 StdInitListInitialization, ZeroInitialization,
796 return Type->getTypeLoc().getBeginLoc();
811 bool HadMultipleCandidates,
812 bool ListInitialization,
813 bool StdInitListInitialization,
814 bool ZeroInitialization,
818 Ctor, Elidable, Args,
819 HadMultipleCandidates, ListInitialization,
820 StdInitListInitialization,
821 ZeroInitialization, ConstructKind,
830 bool HadMultipleCandidates,
831 bool ListInitialization,
832 bool StdInitListInitialization,
833 bool ZeroInitialization,
837 T->isDependentType(), T->isDependentType(),
838 T->isInstantiationDependentType(),
840 Constructor(Ctor), Loc(Loc), ParenOrBraceRange(ParenOrBraceRange),
841 NumArgs(Args.size()), Elidable(Elidable),
842 HadMultipleCandidates(HadMultipleCandidates),
843 ListInitialization(ListInitialization),
844 StdInitListInitialization(StdInitListInitialization),
845 ZeroInitialization(ZeroInitialization), ConstructKind(ConstructKind) {
847 this->Args =
new (
C)
Stmt*[Args.size()];
849 for (
unsigned i = 0; i != Args.size(); ++i) {
850 assert(Args[i] &&
"NULL argument in CXXConstructExpr");
855 ExprBits.InstantiationDependent =
true;
857 ExprBits.ContainsUnexpandedParameterPack =
true;
859 this->Args[i] = Args[i];
867 : DeclAndBits(Var, 0), Loc(Loc), EllipsisLoc(EllipsisLoc) {
870 Bits |= Capture_Implicit;
874 Bits |= Capture_ByCopy;
877 assert(!Var &&
"'this' capture cannot have a variable!");
878 Bits |= Capture_This;
882 Bits |= Capture_ByCopy;
885 assert(Var &&
"capture must have a variable!");
888 assert(!Var &&
"VLA type capture cannot have a variable!");
891 DeclAndBits.setInt(Bits);
897 bool CapByCopy = DeclAndBits.getInt() & Capture_ByCopy;
909 bool ContainsUnexpandedParameterPack)
912 ContainsUnexpandedParameterPack),
913 IntroducerRange(IntroducerRange), CaptureDefaultLoc(CaptureDefaultLoc),
914 NumCaptures(Captures.size()), CaptureDefault(CaptureDefault),
915 ExplicitParams(ExplicitParams), ExplicitResultType(ExplicitResultType),
916 ClosingBrace(ClosingBrace) {
917 assert(CaptureInits.size() == Captures.size() &&
"Wrong number of arguments");
919 CXXRecordDecl::LambdaDefinitionData &Data = Class->getLambdaData();
924 const ASTContext &Context = Class->getASTContext();
925 Data.NumCaptures = NumCaptures;
926 Data.NumExplicitCaptures = 0;
930 for (
unsigned I = 0, N = Captures.size(); I != N; ++I) {
932 ++Data.NumExplicitCaptures;
934 *ToCapture++ = Captures[I];
938 Stmt **Stored = getStoredStmts();
939 for (
unsigned I = 0, N = CaptureInits.size(); I != N; ++I)
940 *Stored++ = CaptureInits[I];
943 *Stored++ = getCallOperator()->getBody();
950 bool ExplicitParams,
bool ExplicitResultType,
ArrayRef<Expr *> CaptureInits,
951 SourceLocation ClosingBrace,
bool ContainsUnexpandedParameterPack) {
956 unsigned Size = totalSizeToAlloc<Stmt *>(Captures.size() + 1);
959 LambdaExpr(T, IntroducerRange, CaptureDefault, CaptureDefaultLoc,
960 Captures, ExplicitParams, ExplicitResultType, CaptureInits,
961 ClosingBrace, ContainsUnexpandedParameterPack);
965 unsigned NumCaptures) {
966 unsigned Size = totalSizeToAlloc<Stmt *>(NumCaptures + 1);
977 return getLambdaClass()->getLambdaData().Captures;
981 return capture_begin() + NumCaptures;
989 return capture_begin();
993 struct CXXRecordDecl::LambdaDefinitionData &Data
994 = getLambdaClass()->getLambdaData();
995 return Data.Captures + Data.NumExplicitCaptures;
999 return capture_range(explicit_capture_begin(), explicit_capture_end());
1003 return explicit_capture_end();
1007 return capture_end();
1011 return capture_range(implicit_capture_begin(), implicit_capture_end());
1015 return getType()->getAsCXXRecordDecl();
1033 if (!getStoredStmts()[NumCaptures])
1034 *
const_cast<Stmt **
>(&getStoredStmts()[NumCaptures]) =
1035 getCallOperator()->getBody();
1037 return static_cast<CompoundStmt *
>(getStoredStmts()[NumCaptures]);
1041 return !getCallOperator()->isConst();
1044 ExprWithCleanups::ExprWithCleanups(
Expr *subexpr,
1045 bool CleanupsHaveSideEffects,
1053 ExprWithCleanupsBits.CleanupsHaveSideEffects = CleanupsHaveSideEffects;
1054 ExprWithCleanupsBits.NumObjects = objects.size();
1055 for (
unsigned i = 0, e = objects.size(); i != e; ++i)
1056 getTrailingObjects<CleanupObject>()[i] = objects[i];
1060 bool CleanupsHaveSideEffects,
1062 void *buffer = C.
Allocate(totalSizeToAlloc<CleanupObject>(objects.size()),
1068 ExprWithCleanups::ExprWithCleanups(
EmptyShell empty,
unsigned numObjects)
1069 :
Expr(ExprWithCleanupsClass, empty) {
1070 ExprWithCleanupsBits.NumObjects = numObjects;
1075 unsigned numObjects) {
1076 void *buffer = C.
Allocate(totalSizeToAlloc<CleanupObject>(numObjects),
1085 :
Expr(CXXUnresolvedConstructExprClass,
1095 Type(Type), LParenLoc(LParenLoc), RParenLoc(RParenLoc),
1096 NumArgs(Args.size()) {
1097 auto **StoredArgs = getTrailingObjects<Expr *>();
1098 for (
unsigned I = 0; I != Args.size(); ++I) {
1099 if (Args[I]->containsUnexpandedParameterPack())
1100 ExprBits.ContainsUnexpandedParameterPack =
true;
1102 StoredArgs[I] = Args[I];
1112 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(Args.size()));
1119 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(NumArgs));
1127 CXXDependentScopeMemberExpr::CXXDependentScopeMemberExpr(
1140 Base(Base), BaseType(BaseType), IsArrow(IsArrow),
1141 HasTemplateKWAndArgsInfo(TemplateArgs !=
nullptr ||
1143 OperatorLoc(OperatorLoc), QualifierLoc(QualifierLoc),
1144 FirstQualifierFoundInScope(FirstQualifierFoundInScope),
1145 MemberNameInfo(MemberNameInfo) {
1147 bool Dependent =
true;
1148 bool InstantiationDependent =
true;
1149 bool ContainsUnexpandedParameterPack =
false;
1150 getTrailingObjects<ASTTemplateKWAndArgsInfo>()->initializeFrom(
1151 TemplateKWLoc, *TemplateArgs, getTrailingObjects<TemplateArgumentLoc>(),
1152 Dependent, InstantiationDependent, ContainsUnexpandedParameterPack);
1153 if (ContainsUnexpandedParameterPack)
1154 ExprBits.ContainsUnexpandedParameterPack =
true;
1155 }
else if (TemplateKWLoc.
isValid()) {
1156 getTrailingObjects<ASTTemplateKWAndArgsInfo>()->initializeFrom(
1170 bool HasTemplateKWAndArgsInfo = TemplateArgs || TemplateKWLoc.
isValid();
1171 unsigned NumTemplateArgs = TemplateArgs ? TemplateArgs->
size() : 0;
1173 totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>(
1174 HasTemplateKWAndArgsInfo, NumTemplateArgs);
1178 IsArrow, OperatorLoc,
1181 FirstQualifierFoundInScope,
1182 MemberNameInfo, TemplateArgs);
1187 bool HasTemplateKWAndArgsInfo,
1188 unsigned NumTemplateArgs) {
1189 assert(NumTemplateArgs == 0 || HasTemplateKWAndArgsInfo);
1191 totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>(
1192 HasTemplateKWAndArgsInfo, NumTemplateArgs);
1200 E->HasTemplateKWAndArgsInfo = HasTemplateKWAndArgsInfo;
1208 return cast<Expr>(Base)->isImplicitCXXThis();
1215 if (isa<UnresolvedUsingValueDecl>(decl))
1223 }
while (++begin != end);
1228 UnresolvedMemberExpr::UnresolvedMemberExpr(
const ASTContext &C,
1229 bool HasUnresolvedUsing,
1240 UnresolvedMemberExprClass, C, QualifierLoc, TemplateKWLoc,
1241 MemberNameInfo, TemplateArgs, Begin, End,
1249 IsArrow(IsArrow), HasUnresolvedUsing(HasUnresolvedUsing), Base(Base),
1250 BaseType(BaseType), OperatorLoc(OperatorLoc) {
1261 return cast<Expr>(Base)->isImplicitCXXThis();
1271 bool HasTemplateKWAndArgsInfo = TemplateArgs || TemplateKWLoc.
isValid();
1273 totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>(
1274 HasTemplateKWAndArgsInfo, TemplateArgs ? TemplateArgs->
size() : 0);
1278 C, HasUnresolvedUsing, Base, BaseType, IsArrow, OperatorLoc, QualifierLoc,
1279 TemplateKWLoc, MemberNameInfo, TemplateArgs, Begin, End);
1284 bool HasTemplateKWAndArgsInfo,
1285 unsigned NumTemplateArgs) {
1286 assert(NumTemplateArgs == 0 || HasTemplateKWAndArgsInfo);
1288 totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>(
1289 HasTemplateKWAndArgsInfo, NumTemplateArgs);
1293 E->HasTemplateKWAndArgsInfo = HasTemplateKWAndArgsInfo;
1304 auto *NNS = getQualifier();
1306 const Type *T = getQualifier()->getAsType();
1307 assert(T &&
"qualifier in member expression does not name type");
1309 assert(Record &&
"qualifier in member expression does not name record");
1316 assert(PT &&
"base of arrow member access is not pointer");
1321 assert(Record &&
"base of member expression does not name record");
1334 Context.
Allocate(totalSizeToAlloc<TemplateArgument>(PartialArgs.size()));
1336 PackLoc, RParenLoc, Length, PartialArgs);
1340 unsigned NumPartialArgs) {
1342 Context.
Allocate(totalSizeToAlloc<TemplateArgument>(NumPartialArgs));
1346 SubstNonTypeTemplateParmPackExpr::
1352 :
Expr(SubstNonTypeTemplateParmPackExprClass, T, ValueKind,
OK_Ordinary,
1354 Param(Param), Arguments(ArgPack.pack_begin()),
1355 NumArguments(ArgPack.pack_size()), NameLoc(NameLoc) {}
1367 ParamPack(ParamPack), NameLoc(NameLoc), NumParameters(NumParams) {
1369 std::uninitialized_copy(Params, Params + NumParams,
1370 getTrailingObjects<ParmVarDecl *>());
1377 return new (Context.
Allocate(totalSizeToAlloc<ParmVarDecl *>(Params.size())))
1383 unsigned NumParams) {
1384 return new (Context.
Allocate(totalSizeToAlloc<ParmVarDecl *>(NumParams)))
1389 unsigned ManglingNumber) {
1396 if (!
State.is<ExtraState *>()) {
1402 auto ES =
State.get<ExtraState *>();
1403 ES->ExtendingDecl = ExtendedBy;
1404 ES->ManglingNumber = ManglingNumber;
1416 Loc(Loc), RParenLoc(RParenLoc) {
1421 auto **ToArgs = getTrailingObjects<TypeSourceInfo *>();
1423 for (
unsigned I = 0, N = Args.size(); I != N; ++I) {
1431 ToArgs[I] = Args[I];
1441 void *Mem = C.
Allocate(totalSizeToAlloc<TypeSourceInfo *>(Args.size()));
1442 return new (Mem)
TypeTraitExpr(T, Loc, Kind, Args, RParenLoc, Value);
1447 void *Mem = C.
Allocate(totalSizeToAlloc<TypeSourceInfo *>(NumArgs));
1451 void ArrayTypeTraitExpr::anchor() {}
void setValueDependent(bool VD)
Set whether this expression is value-dependent or not.
CXXRecordDecl * getNamingClass() const
Retrieve the naming class of this lookup.
Defines the clang::ASTContext interface.
LiteralOperatorKind
The kind of literal operator which is invoked.
VarDecl * getCapturedVar() const
Retrieve the declaration of the local variable being captured.
capture_iterator explicit_capture_end() const
Retrieve an iterator pointing past the end of the sequence of explicit lambda captures.
Represents a function declaration or definition.
bool isReservedGlobalPlacementOperator() const
Determines whether this operator new or delete is one of the reserved global placement operators: voi...
QualType getTypeOperand(ASTContext &Context) const
Retrieves the type operand of this __uuidof() expression after various required adjustments (removing...
if(T->getSizeExpr()) TRY_TO(TraverseStmt(T -> getSizeExpr()))
PointerType - C99 6.7.5.1 - Pointer Declarators.
Stores the type being destroyed by a pseudo-destructor expression.
A (possibly-)qualified type.
static const TemplateArgument & getArgument(const TemplateArgument &A)
capture_iterator capture_end() const
Retrieve an iterator pointing past the end of the sequence of lambda captures.
Expr(StmtClass SC, QualType T, ExprValueKind VK, ExprObjectKind OK, bool TD, bool VD, bool ID, bool ContainsUnexpandedParameterPack)
__SIZE_TYPE__ size_t
The unsigned integer type of the result of the sizeof operator.
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.
static UnresolvedLookupExpr * Create(const ASTContext &C, CXXRecordDecl *NamingClass, NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, bool ADL, bool Overloaded, UnresolvedSetIterator Begin, UnresolvedSetIterator End)
Stmt - This represents one statement.
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
LambdaCapture(SourceLocation Loc, bool Implicit, LambdaCaptureKind Kind, VarDecl *Var=nullptr, SourceLocation EllipsisLoc=SourceLocation())
Create a new capture of a variable or of this.
QualType getPointeeType() const
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee...
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)
C Language Family Type Representation.
Microsoft's '__super' specifier, stored as a CXXRecordDecl* of the class it appeared in...
bool isRecordType() const
Expr * getImplicitObjectArgument() const
Retrieves the implicit object argument for the member call.
FunctionDecl * getOperatorNew() const
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...
QualType getNonReferenceType() const
If Type is a reference type (e.g., const int&), returns the type that the reference refers to ("const...
The base class of the type hierarchy.
SourceLocation getEndLoc() const LLVM_READONLY
Represents a call to a C++ constructor.
A container of type source information.
bool isInstantiationDependent() const
Determine whether this name involves a template parameter.
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.
bool hasInClassInitializer() const
Determine whether this member has a C++11 default member initializer.
capture_range implicit_captures() const
Retrieve this lambda's implicit captures.
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation getBeginLoc() const LLVM_READONLY
CXXRecordDecl * getRecordDecl() const
Retrieves the CXXRecordDecl for the underlying type of the implicit object argument.
Represents a variable declaration or definition.
const T * getAs() const
Member-template getAs<specific type>'.
PseudoDestructorTypeStorage()=default
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.
SourceLocation getEndLoc() const LLVM_READONLY
Stores a list of template parameters for a TemplateDecl and its derived classes.
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 ...
Represents a parameter to a function.
TemplateParameterList * getGenericLambdaTemplateParameterList() const
Retrieve the generic lambda's template parameter list.
Defines the clang::Expr interface and subclasses for C++ expressions.
The collection of all-type qualifiers we support.
CXXRecordDecl * getLambdaClass() const
Retrieve the class that corresponds to the lambda.
A C++ static_cast expression (C++ [expr.static.cast]).
void AllocateArgsArray(const ASTContext &C, bool isArray, unsigned numPlaceArgs, bool hasInitializer)
One of these records is kept for each identifier that is lexed.
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.
static CXXConstructExpr * Create(const ASTContext &C, QualType T, SourceLocation Loc, CXXConstructorDecl *Ctor, bool Elidable, ArrayRef< Expr *> Args, bool HadMultipleCandidates, bool ListInitialization, bool StdInitListInitialization, bool ZeroInitialization, ConstructionKind ConstructKind, SourceRange ParenOrBraceRange)
SourceLocation getBeginLoc() const LLVM_READONLY
LambdaCaptureKind
The different capture forms in a lambda introducer.
Represents a member of a struct/union/class.
SourceLocation getEndLoc() const LLVM_READONLY
CompoundStmt * getBody() const
Retrieve the body of the lambda.
SourceLocation getBeginLoc() const LLVM_READONLY
The iterator over UnresolvedSets.
QualType getDestroyedType() const
Retrieve the type being destroyed.
capture_iterator implicit_capture_end() const
Retrieve an iterator pointing past the end of the sequence of implicit lambda captures.
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
An r-value expression (a pr-value in the C++11 taxonomy) produces a temporary value.
TemplateArgument getArgumentPack() const
Retrieve the template argument pack containing the substituted template arguments.
< Capturing the *this object by copy
bool capturesThis() const
Determine whether this capture handles the C++ this pointer.
A convenient class for passing around template argument information.
SourceLocation getLocation() const
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
Expr * getInitializer()
The initializer of this new-expression.
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
An x-value expression is a reference to an object with independent storage but which can be "moved"...
bool containsUnexpandedParameterPack() const
Whether this type is or contains an unexpanded parameter pack, used to support C++0x variadic templat...
bool isRValueReferenceType() const
New-expression has a C++98 paren-delimited initializer.
Represents binding an expression to a temporary.
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
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.
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...
bool containsUnexpandedParameterPack() const
Determine whether this name contains an unexpanded parameter pack.
bool isInitCapture(const LambdaCapture *Capture) const
Determine whether one of this lambda's captures is an init-capture.
const IdentifierInfo * getUDSuffix() const
Returns the ud-suffix specified for this literal.
New-expression has no initializer as written.
TypeTrait
Names for traits that operate specifically on types.
bool isInstantiationDependent() const
Whether this nested name specifier involves a template parameter.
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
CompoundStmt - This represents a group of statements like { stmt stmt }.
CXXRecordDecl * getAsCXXRecordDecl() const
Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or beca...
Represents a prototype with parameter type info, e.g.
CastKind
CastKind - The kind of operation required for a conversion.
SourceRange getLocalSourceRange() const
Get the local source range.
bool HasTemplateKWAndArgsInfo
Whether the name includes info for explicit template keyword and arguments.
CXXRecordDecl * getNamingClass() const
Gets the naming class of this lookup, if any.
SourceLocation getLocEnd() const LLVM_READONLY
SourceLocation getBeginLoc() const
Get the begin source location.
SourceLocation getBeginLoc() const LLVM_READONLY
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Expr - This represents one expression.
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.
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
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 T * castAs() const
Member-template castAs<specific type>.
A C++ const_cast expression (C++ [expr.const.cast]).
Represents a C++ destructor within a class.
New-expression has a C++11 list-initializer.
static CXXUnresolvedConstructExpr * Create(const ASTContext &C, TypeSourceInfo *Type, SourceLocation LParenLoc, ArrayRef< Expr *> Args, SourceLocation RParenLoc)
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
bool isImplicitAccess() const
True if this is an implicit access, i.e.
Defines an enumeration for C++ overloaded operators.
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()
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.
static LambdaExpr * Create(const ASTContext &C, CXXRecordDecl *Class, SourceRange IntroducerRange, LambdaCaptureDefault CaptureDefault, SourceLocation CaptureDefaultLoc, ArrayRef< LambdaCapture > Captures, bool ExplicitParams, bool ExplicitResultType, ArrayRef< Expr *> CaptureInits, SourceLocation ClosingBrace, bool ContainsUnexpandedParameterPack)
Construct a new lambda expression.
bool hasInitializer() const
Whether this new-expression has any initializer at all.
SourceLocation getEnd() const
CXXMethodDecl * getMethodDecl() const
Retrieves the declaration of the called method.
QualType getTypeOperand(ASTContext &Context) const
Retrieves the type operand of this typeid() expression after various required adjustments (removing r...
QualType getTypeDeclType(const TypeDecl *Decl, const TypeDecl *PrevDecl=nullptr) const
Return the unique reference to the type for the specified type declaration.
QualType getDestroyedType() const
Retrieve the type being destroyed.
CXXMethodDecl * getCallOperator() const
Retrieve the function call operator associated with this lambda expression.
ExprObjectKind getObjectKind() const
getObjectKind - The object kind that this expression produces.
bool capturesVariable() const
Determine whether this capture handles a variable.
LiteralOperatorKind getLiteralOperatorKind() const
Returns the kind of literal operator invocation which this expression represents. ...
bool containsUnexpandedParameterPack() const
Whether this nested-name-specifier contains an unexpanded parameter pack (for C++11 variadic template...
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
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...
capture_iterator implicit_capture_begin() const
Retrieve an iterator pointing to the first implicit lambda capture.
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on a template...
FunctionDecl * getAsFunction() LLVM_READONLY
Returns the function itself, or the templated function if this is a function template.
static CXXDynamicCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
Encodes a location in the source.
capture_iterator explicit_capture_begin() const
Retrieve an iterator pointing to the first explicit lambda capture.
SourceLocation getEndLoc() const LLVM_READONLY
Represents a C++ temporary.
CXXConstructExpr(const ASTContext &C, StmtClass SC, QualType T, SourceLocation Loc, CXXConstructorDecl *Ctor, bool Elidable, ArrayRef< Expr *> Args, bool HadMultipleCandidates, bool ListInitialization, bool StdInitListInitialization, bool ZeroInitialization, ConstructionKind ConstructKind, SourceRange ParenOrBraceRange)
static CXXDependentScopeMemberExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
static CXXConstCastExpr * CreateEmpty(const ASTContext &Context)
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
SourceLocation getLocStart() const LLVM_READONLY
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)
Represents a static or instance method of a struct/union/class.
static ExprWithCleanups * Create(const ASTContext &C, EmptyShell empty, unsigned numObjects)
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
bool isAnyPointerType() const
SourceLocation getLocEnd() const LLVM_READONLY
bool isInfixBinaryOp() const
Is this written as an infix binary operator?
bool isExplicit() const
Determine whether this was an explicit capture (written between the square brackets introducing the l...
bool isAnyCharacterType() const
Determine whether this type is any of the built-in character types.
__DEVICE__ void * memcpy(void *__a, const void *__b, size_t __c)
static SizeOfPackExpr * CreateDeserialized(ASTContext &Context, unsigned NumPartialArgs)
SourceLocation getBeginLoc() const LLVM_READONLY
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)
FunctionDecl * getOperatorDelete() const
bool isInstantiationDependentType() const
Determine whether this type is an instantiation-dependent type, meaning that the type involves a temp...
A placeholder type used to construct an empty shell of a type, that will be filled in later (e...
A qualified reference to a name whose declaration cannot yet be resolved.
InitializationStyle getInitializationStyle() const
The kind of initializer this new-expression has.
static bool hasOnlyNonStaticMemberFunctions(UnresolvedSetIterator begin, UnresolvedSetIterator end)
Defines various enumerations that describe declaration and type specifiers.
A POD class for pairing a NamedDecl* with an access specifier.
void * Allocate(size_t Size, unsigned Align=8) const
Represents a reference to a function parameter pack that has been substituted but not yet expanded...
Represents a template argument.
CXXTemporaryObjectExpr(const ASTContext &C, CXXConstructorDecl *Cons, QualType Type, TypeSourceInfo *TSI, ArrayRef< Expr *> Args, SourceRange ParenOrBraceRange, bool HadMultipleCandidates, bool ListInitialization, bool StdInitListInitialization, bool ZeroInitialization)
bool isMutable() const
Determine whether the lambda is mutable, meaning that any captures values can be modified.
Dataflow Directional Tag Classes.
void setExtendingDecl(const ValueDecl *ExtendedBy, unsigned ManglingNumber)
NestedNameSpecifier * getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
bool isValid() const
Return true if this is a valid SourceLocation object.
CXXMethodDecl * getLambdaCallOperator() const
Retrieve the lambda call operator of the closure type if this is a closure type.
DeducedType * getContainedDeducedType() const
Get the DeducedType whose type will be deduced for a variable with an initializer of this type...
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
LambdaCaptureKind getCaptureKind() const
Determine the kind of capture.
TypeSourceInfo * getTypeSourceInfo() const
bool capturesVLAType() const
Determine whether this captures a variable length array bound expression.
StmtClass getStmtClass() const
static LambdaExpr * CreateDeserialized(const ASTContext &C, unsigned NumCaptures)
Construct a new lambda expression that will be deserialized from an external source.
void setInstantiationDependent(bool ID)
Set whether this expression is instantiation-dependent or not.
bool isDestroyingOperatorDelete() const
Determine whether this is a destroying operator delete.
bool isInitCapture() const
Whether this variable is the implicit variable for a lambda init-capture.
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
TemplateParameterList * getTemplateParameterList() const
If this is a generic lambda expression, retrieve the template parameter list associated with it...
SourceLocation getBeginLoc() const LLVM_READONLY
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.
bool isIntegerType() const
isIntegerType() does not include complex integers (a GCC extension).
static UnresolvedMemberExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
TypeTraitExprBitfields TypeTraitExprBits
Expr * getArg(unsigned Arg)
Return the specified argument.
CanQualType BoundMemberTy
static CXXFunctionalCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
QualType getNonLValueExprType(const ASTContext &Context) const
Determine the type of a (typically non-lvalue) expression with the specified result type...
Capturing the *this object by reference.
Represents a base class of a C++ class.
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
bool isLValueReferenceType() const
TypeLoc getTypeLoc() const
Return the TypeLoc wrapper for the type source info.
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)
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
Defines the clang::SourceLocation class and associated facilities.
void setEnd(SourceLocation e)
Represents a C++ struct/union/class.
static CXXStaticCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
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 * CreateDeserialized(const ASTContext &C, unsigned NumArgs)
SourceRange getParenOrBraceRange() const
void initializeFrom(SourceLocation TemplateKWLoc, const TemplateArgumentListInfo &List, TemplateArgumentLoc *OutArgArray)
bool containsUnexpandedParameterPack() const
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates)...
CXXNewExpr(const ASTContext &C, bool globalNew, FunctionDecl *operatorNew, FunctionDecl *operatorDelete, bool PassAlignment, bool usualArrayDeleteWantsSize, ArrayRef< Expr *> placementArgs, SourceRange typeIdParens, Expr *arraySize, InitializationStyle initializationStyle, Expr *initializer, QualType ty, TypeSourceInfo *AllocatedTypeInfo, SourceRange Range, SourceRange directInitRange)
capture_range captures() const
Retrieve this lambda's captures.
CXXPseudoDestructorExpr(const ASTContext &Context, Expr *Base, bool isArrow, SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc, TypeSourceInfo *ScopeType, SourceLocation ColonColonLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage DestroyedType)
capture_iterator capture_begin() const
Retrieve an iterator pointing to the first lambda capture.
static FunctionParmPackExpr * Create(const ASTContext &Context, QualType T, ParmVarDecl *ParamPack, SourceLocation NameLoc, ArrayRef< ParmVarDecl *> Params)
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
bool isAlwaysNull() const
isAlwaysNull - Return whether the result of the dynamic_cast is proven to always be null...
bool isPointerType() const
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 isDefaultArgument() const
Determine whether this expression is a default function argument.
An l-value expression is a reference to an object with independent storage.
unsigned getNumArgs() const
bool isFloatingType() const
A trivial tuple used to represent a source range.
bool shouldNullCheckAllocation(const ASTContext &Ctx) const
True if the allocation result needs to be null-checked.
This represents a decl that may have a name.
bool isPotentiallyEvaluated() const
Determine whether this typeid has a type operand which is potentially evaluated, per C++11 [expr...
capture_range explicit_captures() const
Retrieve this lambda's explicit captures.
SourceLocation getBegin() const
llvm::iterator_range< capture_iterator > capture_range
An iterator over a range of lambda captures.
QualType getUnqualifiedArrayType(QualType T, Qualifiers &Quals)
Return this type as a completely-unqualified array type, capturing the qualifiers in Quals...
QualType getType() const
Return the type wrapped by this type source info.
Defines the LambdaCapture class.
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.
CanQualType getSizeType() const
Return the unique type for "size_t" (C99 7.17), defined in <stddef.h>.