52#include "llvm/ADT/DenseMap.h"
53#include "llvm/ADT/SmallVector.h"
54#include "llvm/ADT/StringRef.h"
55#include "llvm/Bitstream/BitstreamReader.h"
56#include "llvm/Support/ErrorHandling.h"
70 llvm::BitstreamCursor &DeclsCursor;
72 std::optional<BitsUnpacker> CurrentUnpackingBits;
75 return Record.readSourceLocation();
79 return Record.readSourceRange();
82 std::string readString() {
83 return Record.readString();
87 return Record.readTypeSourceInfo();
91 return Record.readDecl();
96 return Record.readDeclAs<T>();
101 : Record(Record), DeclsCursor(Cursor) {}
121 unsigned NumTemplateArgs);
124#define STMT(Type, Base) \
125 void Visit##Type(Type *);
126#include "clang/AST/StmtNodes.inc"
133 unsigned NumTemplateArgs) {
138 for (
unsigned i = 0; i != NumTemplateArgs; ++i)
139 ArgInfo.
addArgument(Record.readTemplateArgumentLoc());
144 assert(Record.getIdx() ==
NumStmtFields &&
"Incorrect statement field count");
147void ASTStmtReader::VisitNullStmt(
NullStmt *S) {
156 unsigned NumStmts =
Record.readInt();
157 unsigned HasFPFeatures =
Record.readInt();
160 Stmts.push_back(
Record.readSubStmt());
163 S->setStoredFPFeatures(
165 S->LBraceLoc = readSourceLocation();
166 S->RBraceLoc = readSourceLocation();
169void ASTStmtReader::VisitSwitchCase(
SwitchCase *S) {
171 Record.recordSwitchCaseID(S, Record.readInt());
176void ASTStmtReader::VisitCaseStmt(
CaseStmt *S) {
178 bool CaseStmtIsGNURange = Record.readInt();
179 S->
setLHS(Record.readSubExpr());
181 if (CaseStmtIsGNURange) {
182 S->
setRHS(Record.readSubExpr());
187void ASTStmtReader::VisitDefaultStmt(
DefaultStmt *S) {
192void ASTStmtReader::VisitLabelStmt(
LabelStmt *S) {
194 bool IsSideEntry = Record.readInt();
195 auto *LD = readDeclAs<LabelDecl>();
208 uint64_t NumAttrs = Record.readInt();
210 Record.readAttributes(Attrs);
213 assert(NumAttrs == Attrs.size());
214 std::copy(Attrs.begin(), Attrs.end(), S->getAttrArrayPtr());
215 S->SubStmt = Record.readSubStmt();
219void ASTStmtReader::VisitIfStmt(
IfStmt *S) {
222 CurrentUnpackingBits.emplace(Record.readInt());
224 bool HasElse = CurrentUnpackingBits->getNextBit();
225 bool HasVar = CurrentUnpackingBits->getNextBit();
226 bool HasInit = CurrentUnpackingBits->getNextBit();
229 S->
setCond(Record.readSubExpr());
230 S->
setThen(Record.readSubStmt());
232 S->
setElse(Record.readSubStmt());
236 S->
setInit(Record.readSubStmt());
245void ASTStmtReader::VisitSwitchStmt(
SwitchStmt *S) {
248 bool HasInit = Record.readInt();
249 bool HasVar = Record.readInt();
250 bool AllEnumCasesCovered = Record.readInt();
251 if (AllEnumCasesCovered)
254 S->
setCond(Record.readSubExpr());
255 S->
setBody(Record.readSubStmt());
257 S->
setInit(Record.readSubStmt());
265 SwitchCase *PrevSC =
nullptr;
266 for (
auto E = Record.size(); Record.getIdx() != E; ) {
267 SwitchCase *SC = Record.getSwitchCaseWithID(Record.readInt());
277void ASTStmtReader::VisitWhileStmt(
WhileStmt *S) {
280 bool HasVar = Record.readInt();
282 S->
setCond(Record.readSubExpr());
283 S->
setBody(Record.readSubStmt());
292void ASTStmtReader::VisitDoStmt(
DoStmt *S) {
294 S->
setCond(Record.readSubExpr());
295 S->
setBody(Record.readSubStmt());
301void ASTStmtReader::VisitForStmt(
ForStmt *S) {
303 S->
setInit(Record.readSubStmt());
304 S->
setCond(Record.readSubExpr());
306 S->
setInc(Record.readSubExpr());
307 S->
setBody(Record.readSubStmt());
313void ASTStmtReader::VisitGotoStmt(
GotoStmt *S) {
315 S->
setLabel(readDeclAs<LabelDecl>());
330 if (Record.readBool()) {
337 VisitLoopControlStmt(S);
340void ASTStmtReader::VisitBreakStmt(
BreakStmt *S) { VisitLoopControlStmt(S); }
342void ASTStmtReader::VisitDeferStmt(
DeferStmt *S) {
345 S->
setBody(Record.readSubStmt());
348void ASTStmtReader::VisitReturnStmt(
ReturnStmt *S) {
351 bool HasNRVOCandidate = Record.readInt();
354 if (HasNRVOCandidate)
360void ASTStmtReader::VisitDeclStmt(
DeclStmt *S) {
365 if (Record.size() - Record.getIdx() == 1) {
369 SmallVector<Decl *, 16> Decls;
370 int N = Record.size() - Record.getIdx();
372 for (
int I = 0; I < N; ++I)
373 Decls.push_back(readDecl());
380void ASTStmtReader::VisitAsmStmt(
AsmStmt *S) {
390void ASTStmtReader::VisitGCCAsmStmt(
GCCAsmStmt *S) {
392 S->NumLabels = Record.readInt();
402 SmallVector<IdentifierInfo *, 16> Names;
403 SmallVector<Expr *, 16> Constraints;
404 SmallVector<Stmt*, 16> Exprs;
405 for (
unsigned I = 0, N = NumOutputs + NumInputs; I != N; ++I) {
406 Names.push_back(Record.readIdentifier());
407 Constraints.push_back(cast_or_null<Expr>(Record.readSubStmt()));
408 Exprs.push_back(Record.readSubStmt());
412 SmallVector<Expr *, 16> Clobbers;
413 for (
unsigned I = 0; I != NumClobbers; ++I)
414 Clobbers.push_back(cast_or_null<Expr>(Record.readSubStmt()));
417 for (
unsigned I = 0, N = NumLabels; I != N; ++I) {
418 Names.push_back(Record.readIdentifier());
419 Exprs.push_back(Record.readSubStmt());
422 S->setOutputsAndInputsAndClobbers(Record.getContext(),
423 Names.data(), Constraints.data(),
424 Exprs.data(), NumOutputs, NumInputs,
426 Clobbers.data(), NumClobbers);
429void ASTStmtReader::VisitMSAsmStmt(
MSAsmStmt *S) {
431 S->LBraceLoc = readSourceLocation();
432 S->EndLoc = readSourceLocation();
433 S->NumAsmToks = Record.readInt();
434 std::string AsmStr = readString();
437 SmallVector<Token, 16> AsmToks;
438 AsmToks.reserve(S->NumAsmToks);
439 for (
unsigned i = 0, e = S->NumAsmToks; i != e; ++i) {
440 AsmToks.push_back(Record.readToken());
447 SmallVector<std::string, 16> ClobbersData;
448 SmallVector<StringRef, 16> Clobbers;
451 for (
unsigned i = 0, e = S->
NumClobbers; i != e; ++i) {
452 ClobbersData.push_back(readString());
453 Clobbers.push_back(ClobbersData.back());
458 SmallVector<Expr*, 16> Exprs;
459 SmallVector<std::string, 16> ConstraintsData;
460 SmallVector<StringRef, 16> Constraints;
461 Exprs.reserve(NumOperands);
462 ConstraintsData.reserve(NumOperands);
463 Constraints.reserve(NumOperands);
464 for (
unsigned i = 0; i != NumOperands; ++i) {
465 Exprs.push_back(
cast<Expr>(Record.readSubStmt()));
466 ConstraintsData.push_back(readString());
467 Constraints.push_back(ConstraintsData.back());
470 S->initialize(Record.getContext(), AsmStr, AsmToks,
471 Constraints, Exprs, Clobbers);
476 assert(Record.peekInt() == S->NumParams);
478 auto *StoredStmts = S->getStoredStmts();
480 i < CoroutineBodyStmt::SubStmt::FirstParamMove + S->NumParams; ++i)
481 StoredStmts[i] = Record.readSubStmt();
486 S->CoreturnLoc = Record.readSourceLocation();
487 for (
auto &SubStmt: S->SubStmts)
488 SubStmt = Record.readSubStmt();
489 S->IsImplicit = Record.readInt() != 0;
492void ASTStmtReader::VisitCoawaitExpr(
CoawaitExpr *E) {
494 E->KeywordLoc = readSourceLocation();
495 for (
auto &SubExpr: E->SubExprs)
496 SubExpr = Record.readSubStmt();
497 E->OpaqueValue = cast_or_null<OpaqueValueExpr>(Record.readSubStmt());
501void ASTStmtReader::VisitCoyieldExpr(
CoyieldExpr *E) {
503 E->KeywordLoc = readSourceLocation();
504 for (
auto &SubExpr: E->SubExprs)
505 SubExpr = Record.readSubStmt();
506 E->OpaqueValue = cast_or_null<OpaqueValueExpr>(Record.readSubStmt());
511 E->KeywordLoc = readSourceLocation();
512 for (
auto &SubExpr: E->SubExprs)
513 SubExpr = Record.readSubStmt();
527 *I = Record.readSubExpr();
530 S->setCapturedStmt(Record.readSubStmt());
535 I.VarAndKind.setPointer(readDeclAs<VarDecl>());
538 I.Loc = readSourceLocation();
544 assert(
false &&
"not implemented yet");
554void ASTStmtReader::VisitExpr(
Expr *E) {
556 CurrentUnpackingBits.emplace(Record.readInt());
558 CurrentUnpackingBits->getNextBits(5)));
560 CurrentUnpackingBits->getNextBits(2)));
562 CurrentUnpackingBits->getNextBits(3)));
566 "Incorrect expression field count");
581 switch (StorageKind) {
586 E->Int64Result() = Record.readInt();
590 E->APValueResult() = Record.readAPValue();
593 Record.getContext().addDestruction(&E->APValueResult());
603 E->setAsteriskLocation(readSourceLocation());
609 E->setLocation(readSourceLocation());
610 E->setLParenLocation(readSourceLocation());
611 E->setRParenLocation(readSourceLocation());
613 E->setTypeSourceInfo(Record.readTypeSourceInfo());
616void ASTStmtReader::VisitUnresolvedSYCLKernelCallStmt(
621 S->setKernelLaunchIdExpr(Record.readExpr());
626 bool HasFunctionName = Record.readInt();
635void ASTStmtReader::VisitDeclRefExpr(
DeclRefExpr *E) {
638 CurrentUnpackingBits.emplace(Record.readInt());
639 E->
DeclRefExprBits.HadMultipleCandidates = CurrentUnpackingBits->getNextBit();
641 CurrentUnpackingBits->getNextBit();
643 CurrentUnpackingBits->getNextBits(2);
644 E->
DeclRefExprBits.IsImmediateEscalating = CurrentUnpackingBits->getNextBit();
648 CurrentUnpackingBits->getNextBit();
649 E->
DeclRefExprBits.CapturedByCopyInLambdaWithExplicitObjectParameter =
false;
650 unsigned NumTemplateArgs = 0;
652 NumTemplateArgs = Record.readInt();
655 new (E->getTrailingObjects<NestedNameSpecifierLoc>())
656 NestedNameSpecifierLoc(Record.readNestedNameSpecifierLoc());
658 if (E->hasFoundDecl())
659 *E->getTrailingObjects<NamedDecl *>() = readDeclAs<NamedDecl>();
663 *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
664 E->getTrailingObjects<TemplateArgumentLoc>(), NumTemplateArgs);
666 E->D = readDeclAs<ValueDecl>();
674 E->
setValue(Record.getContext(), Record.readAPInt());
681 E->
setValue(Record.getContext(), Record.readAPInt());
687 static_cast<llvm::APFloatBase::Semantics
>(Record.readInt()));
703 unsigned NumConcatenated = Record.readInt();
704 unsigned Length = Record.readInt();
705 unsigned CharByteWidth = Record.readInt();
707 "Wrong number of concatenated tokens!");
708 assert((Length == E->
getLength()) &&
"Wrong Length!");
709 assert((CharByteWidth == E->
getCharByteWidth()) &&
"Wrong character width!");
716 assert((CharByteWidth ==
717 StringLiteral::mapCharByteWidth(Record.getContext().getTargetInfo(),
719 "Wrong character width!");
722 for (
unsigned I = 0; I < NumConcatenated; ++I)
723 E->setStrTokenLoc(I, readSourceLocation());
726 char *StrData = E->getStrDataAsChar();
727 for (
unsigned I = 0; I < Length * CharByteWidth; ++I)
728 StrData[I] = Record.readInt();
738void ASTStmtReader::VisitParenExpr(
ParenExpr *E) {
748 unsigned NumExprs = Record.readInt();
749 assert((NumExprs == E->
getNumExprs()) &&
"Wrong NumExprs!");
750 for (
unsigned I = 0; I != NumExprs; ++I)
751 E->getTrailingObjects()[I] = Record.readSubStmt();
752 E->LParenLoc = readSourceLocation();
753 E->RParenLoc = readSourceLocation();
758 bool hasFP_Features = CurrentUnpackingBits->getNextBit();
781 SourceLocation Start = readSourceLocation();
782 SourceLocation End = readSourceLocation();
785 E->
setComponent(I, OffsetOfNode(Start, Record.readInt(), End));
790 I, OffsetOfNode(Start, readDeclAs<FieldDecl>(), End));
796 OffsetOfNode(Start, Record.readIdentifier(), End));
800 auto *
Base =
new (Record.getContext()) CXXBaseSpecifier();
801 *
Base = Record.readCXXBaseSpecifier();
815 if (Record.peekInt() == 0) {
832 unsigned NumDetailRecords =
Record.readInt();
833 for (
unsigned i = 0; i != NumDetailRecords; ++i) {
834 auto Kind =
Record.readInt();
837 StringRef DiagMessage =
C.backupStr(
Record.readString());
839 Satisfaction.
Details.emplace_back(
new (
841 }
else if (Kind == 1) {
845 Satisfaction.
Details.emplace_back(
Record.readConceptReference());
852void ASTStmtReader::VisitConceptSpecializationExpr(
855 E->SpecDecl = Record.readDeclAs<ImplicitConceptSpecializationDecl>();
856 if (Record.readBool())
857 E->ConceptRef = Record.readConceptReference();
866 StringRef SubstitutedEntity =
C.backupStr(
Record.readString());
868 StringRef DiagMessage =
C.backupStr(
Record.readString());
870 return new (
Record.getContext())
877 unsigned NumLocalParameters = Record.readInt();
878 unsigned NumRequirements = Record.readInt();
881 E->Body = Record.readDeclAs<RequiresExprBodyDecl>();
882 llvm::SmallVector<ParmVarDecl *, 4> LocalParameters;
883 for (
unsigned i = 0; i < NumLocalParameters; ++i)
885 std::copy(LocalParameters.begin(), LocalParameters.end(),
886 E->getTrailingObjects<ParmVarDecl *>());
887 llvm::SmallVector<concepts::Requirement *, 4> Requirements;
888 for (
unsigned i = 0; i < NumRequirements; ++i) {
891 concepts::Requirement *
R =
nullptr;
898 R =
new (Record.getContext())
901 R =
new (Record.getContext())
902 concepts::TypeRequirement(Record.readTypeSourceInfo());
909 llvm::PointerUnion<concepts::Requirement::SubstitutionDiagnostic *,
914 E = Record.readExpr();
916 std::optional<concepts::ExprRequirement::ReturnTypeRequirement> Req;
917 ConceptSpecializationExpr *SubstitutedConstraintExpr =
nullptr;
918 SourceLocation NoexceptLoc;
922 NoexceptLoc = Record.readSourceLocation();
923 switch (Record.readInt()) {
930 TemplateParameterList *TPL = Record.readTemplateParameterList();
933 SubstitutedConstraintExpr =
943 if (Expr *Ex = E.dyn_cast<Expr *>())
944 R =
new (Record.getContext()) concepts::ExprRequirement(
946 std::move(*Req), Status, SubstitutedConstraintExpr);
948 R =
new (Record.getContext()) concepts::ExprRequirement(
954 ASTContext &
C = Record.getContext();
955 bool HasInvalidConstraint = Record.readInt();
956 if (HasInvalidConstraint) {
957 StringRef InvalidConstraint =
C.backupStr(Record.readString());
958 R =
new (
C) concepts::NestedRequirement(
959 Record.getContext(), InvalidConstraint,
963 Expr *E = Record.readExpr();
965 R =
new (
C) concepts::NestedRequirement(E);
967 R =
new (
C) concepts::NestedRequirement(
973 Requirements.push_back(R);
975 std::copy(Requirements.begin(), Requirements.end(),
976 E->getTrailingObjects<concepts::Requirement *>());
977 E->LParenLoc = Record.readSourceLocation();
978 E->RParenLoc = Record.readSourceLocation();
979 E->RBraceLoc = Record.readSourceLocation();
984 E->
setLHS(Record.readSubExpr());
985 E->
setRHS(Record.readSubExpr());
989void ASTStmtReader::VisitMatrixSingleSubscriptExpr(
992 E->
setBase(Record.readSubExpr());
999 E->
setBase(Record.readSubExpr());
1009 E->setBase(Record.readSubExpr());
1010 E->setLowerBound(Record.readSubExpr());
1011 E->setLength(Record.readSubExpr());
1014 E->setStride(Record.readSubExpr());
1016 E->setColonLocFirst(readSourceLocation());
1019 E->setColonLocSecond(readSourceLocation());
1021 E->setRBracketLoc(readSourceLocation());
1026 unsigned NumDims = Record.readInt();
1027 E->setBase(Record.readSubExpr());
1028 SmallVector<Expr *, 4> Dims(NumDims);
1029 for (
unsigned I = 0; I < NumDims; ++I)
1030 Dims[I] = Record.readSubExpr();
1031 E->setDimensions(Dims);
1032 SmallVector<SourceRange, 4> SRs(NumDims);
1033 for (
unsigned I = 0; I < NumDims; ++I)
1034 SRs[I] = readSourceRange();
1035 E->setBracketsRanges(SRs);
1042 unsigned NumIters = Record.readInt();
1046 for (
unsigned I = 0; I < NumIters; ++I) {
1047 E->setIteratorDeclaration(I, Record.readDeclRef());
1048 E->setAssignmentLoc(I, readSourceLocation());
1049 Expr *Begin = Record.readSubExpr();
1050 Expr *End = Record.readSubExpr();
1051 Expr *Step = Record.readSubExpr();
1052 SourceLocation ColonLoc = readSourceLocation();
1053 SourceLocation SecColonLoc;
1055 SecColonLoc = readSourceLocation();
1056 E->setIteratorRange(I, Begin, ColonLoc, End, SecColonLoc, Step);
1058 OMPIteratorHelperData HD;
1059 HD.
CounterVD = cast_or_null<VarDecl>(Record.readDeclRef());
1060 HD.
Upper = Record.readSubExpr();
1061 HD.
Update = Record.readSubExpr();
1063 E->setHelper(I, HD);
1067void ASTStmtReader::VisitCallExpr(
CallExpr *E) {
1070 unsigned NumArgs = Record.readInt();
1071 CurrentUnpackingBits.emplace(Record.readInt());
1074 bool HasFPFeatures = CurrentUnpackingBits->getNextBit();
1077 assert((NumArgs == E->
getNumArgs()) &&
"Wrong NumArgs!");
1080 for (
unsigned I = 0; I != NumArgs; ++I)
1081 E->
setArg(I, Record.readSubExpr());
1088 E->updateTrailingSourceLoc();
1095void ASTStmtReader::VisitMemberExpr(
MemberExpr *E) {
1098 CurrentUnpackingBits.emplace(Record.readInt());
1099 bool HasQualifier = CurrentUnpackingBits->getNextBit();
1100 bool HasFoundDecl = CurrentUnpackingBits->getNextBit();
1101 bool HasTemplateInfo = CurrentUnpackingBits->getNextBit();
1102 unsigned NumTemplateArgs = Record.readInt();
1104 E->Base = Record.readSubExpr();
1105 E->MemberDecl = Record.readDeclAs<ValueDecl>();
1106 E->MemberDNLoc = Record.readDeclarationNameLoc(E->MemberDecl->
getDeclName());
1107 E->MemberLoc = Record.readSourceLocation();
1112 E->
MemberExprBits.HadMultipleCandidates = CurrentUnpackingBits->getNextBit();
1114 CurrentUnpackingBits->getNextBits(2);
1118 new (E->getTrailingObjects<NestedNameSpecifierLoc>())
1119 NestedNameSpecifierLoc(Record.readNestedNameSpecifierLoc());
1122 auto *FoundD = Record.readDeclAs<NamedDecl>();
1127 if (HasTemplateInfo)
1129 *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
1130 E->getTrailingObjects<TemplateArgumentLoc>(), NumTemplateArgs);
1133void ASTStmtReader::VisitObjCIsaExpr(
ObjCIsaExpr *E) {
1135 E->
setBase(Record.readSubExpr());
1144 E->Operand = Record.readSubExpr();
1145 E->setShouldCopy(Record.readInt());
1149 VisitExplicitCastExpr(E);
1150 E->LParenLoc = readSourceLocation();
1151 E->BridgeKeywordLoc = readSourceLocation();
1152 E->Kind = Record.readInt();
1155void ASTStmtReader::VisitCastExpr(
CastExpr *E) {
1157 unsigned NumBaseSpecs = Record.readInt();
1160 CurrentUnpackingBits.emplace(Record.readInt());
1162 unsigned HasFPFeatures = CurrentUnpackingBits->getNextBit();
1168 while (NumBaseSpecs--) {
1169 auto *BaseSpec =
new (Record.getContext()) CXXBaseSpecifier;
1170 *BaseSpec = Record.readCXXBaseSpecifier();
1171 *BaseI++ = BaseSpec;
1180 CurrentUnpackingBits.emplace(Record.readInt());
1183 bool hasFP_Features = CurrentUnpackingBits->getNextBit();
1186 E->
setLHS(Record.readSubExpr());
1187 E->
setRHS(Record.readSubExpr());
1195 VisitBinaryOperator(E);
1202 E->SubExprs[ConditionalOperator::COND] = Record.readSubExpr();
1203 E->SubExprs[ConditionalOperator::LHS] = Record.readSubExpr();
1204 E->SubExprs[ConditionalOperator::RHS] = Record.readSubExpr();
1205 E->QuestionLoc = readSourceLocation();
1206 E->ColonLoc = readSourceLocation();
1213 E->SubExprs[BinaryConditionalOperator::COMMON] = Record.readSubExpr();
1214 E->SubExprs[BinaryConditionalOperator::COND] = Record.readSubExpr();
1215 E->SubExprs[BinaryConditionalOperator::LHS] = Record.readSubExpr();
1216 E->SubExprs[BinaryConditionalOperator::RHS] = Record.readSubExpr();
1217 E->QuestionLoc = readSourceLocation();
1218 E->ColonLoc = readSourceLocation();
1232 VisitExplicitCastExpr(E);
1247 E->
setBase(Record.readSubExpr());
1254 E->
setBase(Record.readSubExpr());
1259void ASTStmtReader::VisitInitListExpr(
InitListExpr *E) {
1261 if (
auto *SyntForm = cast_or_null<InitListExpr>(Record.readSubStmt()))
1265 bool isArrayFiller = Record.readInt();
1266 Expr *filler =
nullptr;
1267 if (isArrayFiller) {
1268 filler = Record.readSubExpr();
1269 E->ArrayFillerOrUnionFieldInit = filler;
1271 E->ArrayFillerOrUnionFieldInit = readDeclAs<FieldDecl>();
1273 unsigned NumInits = Record.readInt();
1275 if (isArrayFiller) {
1276 for (
unsigned I = 0; I != NumInits; ++I) {
1277 Expr *init = Record.readSubExpr();
1278 E->
updateInit(Record.getContext(), I, init ? init : filler);
1281 for (
unsigned I = 0; I != NumInits; ++I)
1282 E->
updateInit(Record.getContext(), I, Record.readSubExpr());
1287 using Designator = DesignatedInitExpr::Designator;
1290 unsigned NumSubExprs = Record.readInt();
1291 assert(NumSubExprs == E->
getNumSubExprs() &&
"Wrong number of subexprs");
1292 for (
unsigned I = 0; I != NumSubExprs; ++I)
1297 SmallVector<Designator, 4> Designators;
1298 while (Record.getIdx() < Record.size()) {
1301 auto *
Field = readDeclAs<FieldDecl>();
1302 SourceLocation DotLoc = readSourceLocation();
1303 SourceLocation FieldLoc = readSourceLocation();
1305 Field->getIdentifier(), DotLoc, FieldLoc));
1306 Designators.back().setFieldDecl(Field);
1311 const IdentifierInfo *Name = Record.readIdentifier();
1312 SourceLocation DotLoc = readSourceLocation();
1313 SourceLocation FieldLoc = readSourceLocation();
1320 unsigned Index = Record.readInt();
1321 SourceLocation LBracketLoc = readSourceLocation();
1322 SourceLocation RBracketLoc = readSourceLocation();
1330 unsigned Index = Record.readInt();
1331 SourceLocation LBracketLoc = readSourceLocation();
1332 SourceLocation EllipsisLoc = readSourceLocation();
1333 SourceLocation RBracketLoc = readSourceLocation();
1335 Index, LBracketLoc, EllipsisLoc, RBracketLoc));
1341 Designators.data(), Designators.size());
1346 E->
setBase(Record.readSubExpr());
1350void ASTStmtReader::VisitNoInitExpr(
NoInitExpr *E) {
1356 E->SubExprs[0] = Record.readSubExpr();
1357 E->SubExprs[1] = Record.readSubExpr();
1368void ASTStmtReader::VisitVAArgExpr(
VAArgExpr *E) {
1379 E->ParentContext = readDeclAs<DeclContext>();
1380 E->BuiltinLoc = readSourceLocation();
1381 E->RParenLoc = readSourceLocation();
1385void ASTStmtReader::VisitEmbedExpr(
EmbedExpr *E) {
1387 E->EmbedKeywordLoc = readSourceLocation();
1388 EmbedDataStorage *
Data =
new (Record.getContext()) EmbedDataStorage;
1391 E->Begin = Record.readInt();
1392 E->NumOfElements = Record.readInt();
1399 E->
setLabel(readDeclAs<LabelDecl>());
1402void ASTStmtReader::VisitStmtExpr(
StmtExpr *E) {
1406 E->
setSubStmt(cast_or_null<CompoundStmt>(Record.readSubStmt()));
1410void ASTStmtReader::VisitChooseExpr(
ChooseExpr *E) {
1412 E->
setCond(Record.readSubExpr());
1413 E->
setLHS(Record.readSubExpr());
1414 E->
setRHS(Record.readSubExpr());
1420void ASTStmtReader::VisitGNUNullExpr(
GNUNullExpr *E) {
1427 SmallVector<Expr *, 16> Exprs;
1428 unsigned NumExprs = Record.readInt();
1430 Exprs.push_back(Record.readSubExpr());
1431 E->
setExprs(Record.getContext(), Exprs);
1438 bool HasFPFeatures = CurrentUnpackingBits->getNextBit();
1440 E->BuiltinLoc = readSourceLocation();
1441 E->RParenLoc = readSourceLocation();
1442 E->TInfo = readTypeSourceInfo();
1443 E->SrcExpr = Record.readSubExpr();
1449void ASTStmtReader::VisitBlockExpr(
BlockExpr *E) {
1457 unsigned NumAssocs = Record.readInt();
1458 assert(NumAssocs == E->
getNumAssocs() &&
"Wrong NumAssocs!");
1459 E->IsExprPredicate = Record.readInt();
1460 E->ResultIndex = Record.readInt();
1462 E->DefaultLoc = readSourceLocation();
1463 E->RParenLoc = readSourceLocation();
1468 Stmt **Stmts = E->getTrailingObjects<Stmt *>();
1469 for (
unsigned I = 0, N = NumAssocs + (E->IsExprPredicate ? 1 : 0); I < N; ++I)
1470 Stmts[I] = Record.readSubExpr();
1472 TypeSourceInfo **TSIs = E->getTrailingObjects<TypeSourceInfo *>();
1473 for (
unsigned I = 0, N = NumAssocs + (!E->IsExprPredicate ? 1 : 0); I < N;
1475 TSIs[I] = readTypeSourceInfo();
1480 unsigned numSemanticExprs = Record.readInt();
1485 E->getTrailingObjects()[0] = Record.readSubExpr();
1488 for (
unsigned i = 0; i != numSemanticExprs; ++i) {
1489 Expr *subExpr = Record.readSubExpr();
1490 E->getTrailingObjects()[i + 1] = subExpr;
1494void ASTStmtReader::VisitAtomicExpr(
AtomicExpr *E) {
1498 for (
unsigned I = 0; I != E->NumSubExprs; ++I)
1499 E->SubExprs[I] = Record.readSubExpr();
1500 E->BuiltinLoc = readSourceLocation();
1501 E->RParenLoc = readSourceLocation();
1513 VisitObjCObjectLiteral(E);
1519 VisitObjCObjectLiteral(E);
1521 E->SubExpr = Record.readSubStmt();
1522 E->BoxingMethod = readDeclAs<ObjCMethodDecl>();
1523 E->Range = readSourceRange();
1527 VisitObjCObjectLiteral(E);
1528 unsigned NumElements = Record.readInt();
1529 assert(NumElements == E->
getNumElements() &&
"Wrong number of elements");
1531 for (
unsigned I = 0, N = NumElements; I != N; ++I)
1532 Elements[I] = Record.readSubExpr();
1533 E->ArrayWithObjectsMethod = readDeclAs<ObjCMethodDecl>();
1534 E->Range = readSourceRange();
1538 VisitObjCObjectLiteral(E);
1539 unsigned NumElements = Record.readInt();
1540 assert(NumElements == E->
getNumElements() &&
"Wrong number of elements");
1541 bool HasPackExpansions = Record.readInt();
1542 assert(HasPackExpansions == E->HasPackExpansions &&
"Pack expansion mismatch");
1544 E->getTrailingObjects<ObjCDictionaryLiteral::KeyValuePair>();
1546 E->getTrailingObjects<ObjCDictionaryLiteral::ExpansionData>();
1547 for (
unsigned I = 0; I != NumElements; ++I) {
1548 KeyValues[I].Key = Record.readSubExpr();
1549 KeyValues[I].Value = Record.readSubExpr();
1550 if (HasPackExpansions) {
1551 Expansions[I].EllipsisLoc = readSourceLocation();
1552 Expansions[I].NumExpansionsPlusOne = Record.readInt();
1555 E->DictWithObjectsMethod = readDeclAs<ObjCMethodDecl>();
1556 E->Range = readSourceRange();
1577 E->ProtoLoc = readSourceLocation();
1583 E->
setDecl(readDeclAs<ObjCIvarDecl>());
1586 E->
setBase(Record.readSubExpr());
1593 unsigned MethodRefFlags = Record.readInt();
1594 bool Implicit = Record.readInt() != 0;
1596 auto *Getter = readDeclAs<ObjCMethodDecl>();
1597 auto *Setter = readDeclAs<ObjCMethodDecl>();
1598 E->setImplicitProperty(Getter, Setter, MethodRefFlags);
1600 E->setExplicitProperty(readDeclAs<ObjCPropertyDecl>(), MethodRefFlags);
1602 E->setLocation(readSourceLocation());
1603 E->setReceiverLocation(readSourceLocation());
1604 switch (Record.readInt()) {
1606 E->setBase(Record.readSubExpr());
1609 E->setSuperReceiver(Record.readType());
1612 E->setClassReceiver(readDeclAs<ObjCInterfaceDecl>());
1622 E->GetAtIndexMethodDecl = readDeclAs<ObjCMethodDecl>();
1623 E->SetAtIndexMethodDecl = readDeclAs<ObjCMethodDecl>();
1630 unsigned NumStoredSelLocs = Record.readInt();
1631 E->SelLocsKind = Record.readInt();
1633 E->IsImplicit = Record.readInt();
1646 QualType T = Record.readType();
1647 SourceLocation SuperLoc = readSourceLocation();
1655 if (Record.readInt())
1660 E->LBracLoc = readSourceLocation();
1661 E->RBracLoc = readSourceLocation();
1663 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I)
1664 E->
setArg(I, Record.readSubExpr());
1666 SourceLocation *Locs = E->getStoredSelLocs();
1667 for (
unsigned I = 0; I != NumStoredSelLocs; ++I)
1668 Locs[I] = readSourceLocation();
1675 S->
setBody(Record.readSubStmt());
1704 bool HasFinally = Record.readInt();
1707 S->
setCatchStmt(I, cast_or_null<ObjCAtCatchStmt>(Record.readSubStmt()));
1735 SourceRange
R = Record.readSourceRange();
1736 E->AtLoc =
R.getBegin();
1737 E->RParen =
R.getEnd();
1738 E->VersionToCheck = Record.readVersionTuple();
1745void ASTStmtReader::VisitCXXCatchStmt(
CXXCatchStmt *S) {
1747 S->CatchLoc = readSourceLocation();
1748 S->ExceptionDecl = readDeclAs<VarDecl>();
1749 S->HandlerBlock = Record.readSubStmt();
1752void ASTStmtReader::VisitCXXTryStmt(
CXXTryStmt *S) {
1754 assert(Record.peekInt() == S->
getNumHandlers() &&
"NumStmtFields is wrong ?");
1756 S->TryLoc = readSourceLocation();
1757 S->getStmts()[0] = Record.readSubStmt();
1759 S->getStmts()[i + 1] = Record.readSubStmt();
1764 S->ForLoc = readSourceLocation();
1765 S->CoawaitLoc = readSourceLocation();
1766 S->ColonLoc = readSourceLocation();
1767 S->RParenLoc = readSourceLocation();
1768 S->
setInit(Record.readSubStmt());
1772 S->
setCond(Record.readSubExpr());
1773 S->
setInc(Record.readSubExpr());
1775 S->
setBody(Record.readSubStmt());
1780 S->KeywordLoc = readSourceLocation();
1781 S->IsIfExists = Record.readInt();
1782 S->QualifierLoc = Record.readNestedNameSpecifierLoc();
1783 S->NameInfo = Record.readDeclarationNameInfo();
1784 S->SubStmt = Record.readSubStmt();
1790 E->BeginLoc = Record.readSourceLocation();
1793void ASTStmtReader::VisitCXXRewrittenBinaryOperator(
1797 E->SemanticForm = Record.readSubExpr();
1803 unsigned NumArgs = Record.readInt();
1804 assert((NumArgs == E->
getNumArgs()) &&
"Wrong NumArgs!");
1814 E->Constructor = readDeclAs<CXXConstructorDecl>();
1815 E->ParenOrBraceRange = readSourceRange();
1817 for (
unsigned I = 0; I != NumArgs; ++I)
1818 E->
setArg(I, Record.readSubExpr());
1823 E->Constructor = readDeclAs<CXXConstructorDecl>();
1824 E->Loc = readSourceLocation();
1825 E->ConstructsVirtualBase = Record.readInt();
1826 E->InheritedFromVirtualBase = Record.readInt();
1830 VisitCXXConstructExpr(E);
1831 E->TSI = readTypeSourceInfo();
1834void ASTStmtReader::VisitLambdaExpr(
LambdaExpr *E) {
1836 unsigned NumCaptures = Record.readInt();
1839 E->IntroducerRange = readSourceRange();
1841 E->CaptureDefaultLoc = readSourceLocation();
1844 E->ClosingBrace = readSourceLocation();
1850 *
C = Record.readSubExpr();
1859 E->SubExpr = Record.readSubExpr();
1863 VisitExplicitCastExpr(E);
1864 SourceRange
R = readSourceRange();
1865 E->Loc =
R.getBegin();
1866 E->RParenLoc =
R.getEnd();
1867 if (CurrentUnpackingBits->getNextBit())
1868 E->AngleBrackets = readSourceRange();
1872 return VisitCXXNamedCastExpr(E);
1876 return VisitCXXNamedCastExpr(E);
1880 return VisitCXXNamedCastExpr(E);
1884 return VisitCXXNamedCastExpr(E);
1888 return VisitCXXNamedCastExpr(E);
1892 VisitExplicitCastExpr(E);
1898 VisitExplicitCastExpr(E);
1899 E->KWLoc = readSourceLocation();
1900 E->RParenLoc = readSourceLocation();
1905 E->UDSuffixLoc = readSourceLocation();
1923 E->Operand = readTypeSourceInfo();
1925 E->Operand = Record.readSubExpr();
1928void ASTStmtReader::VisitCXXThisExpr(
CXXThisExpr *E) {
1935void ASTStmtReader::VisitCXXThrowExpr(
CXXThrowExpr *E) {
1938 E->Operand = Record.readSubExpr();
1944 E->Param = readDeclAs<ParmVarDecl>();
1945 E->UsedContext = readDeclAs<DeclContext>();
1949 *E->getTrailingObjects() = Record.readSubExpr();
1955 E->Field = readDeclAs<FieldDecl>();
1956 E->UsedContext = readDeclAs<DeclContext>();
1959 *E->getTrailingObjects() = Record.readSubExpr();
1970 E->TypeInfo = readTypeSourceInfo();
1974void ASTStmtReader::VisitCXXNewExpr(
CXXNewExpr *E) {
1977 bool IsArray = Record.readInt();
1978 bool HasInit = Record.readInt();
1979 unsigned NumPlacementArgs = Record.readInt();
1980 bool IsParenTypeId = Record.readInt();
1989 assert((IsArray == E->
isArray()) &&
"Wrong IsArray!");
1992 "Wrong NumPlacementArgs!");
1993 assert((IsParenTypeId == E->
isParenTypeId()) &&
"Wrong IsParenTypeId!");
1996 (void)NumPlacementArgs;
2000 E->AllocatedTypeInfo = readTypeSourceInfo();
2002 E->getTrailingObjects<SourceRange>()[0] = readSourceRange();
2003 E->Range = readSourceRange();
2004 E->DirectInitRange = readSourceRange();
2010 *I = Record.readSubStmt();
2019 E->OperatorDelete = readDeclAs<FunctionDecl>();
2020 E->Argument = Record.readSubExpr();
2027 E->Base = Record.readSubExpr();
2028 E->IsArrow = Record.readInt();
2029 E->OperatorLoc = readSourceLocation();
2030 E->QualifierLoc = Record.readNestedNameSpecifierLoc();
2031 E->ScopeType = readTypeSourceInfo();
2032 E->ColonColonLoc = readSourceLocation();
2033 E->TildeLoc = readSourceLocation();
2035 IdentifierInfo *II = Record.readIdentifier();
2045 unsigned NumObjects = Record.readInt();
2047 for (
unsigned i = 0; i != NumObjects; ++i) {
2051 Obj = readDeclAs<BlockDecl>();
2055 llvm_unreachable(
"unexpected cleanup object type");
2056 E->getTrailingObjects()[i] = Obj;
2060 E->
SubExpr = Record.readSubExpr();
2063void ASTStmtReader::VisitCXXDependentScopeMemberExpr(
2067 unsigned NumTemplateArgs = Record.readInt();
2068 CurrentUnpackingBits.emplace(Record.readInt());
2069 bool HasTemplateKWAndArgsInfo = CurrentUnpackingBits->getNextBit();
2070 bool HasFirstQualifierFoundInScope = CurrentUnpackingBits->getNextBit();
2072 assert((HasTemplateKWAndArgsInfo == E->hasTemplateKWAndArgsInfo()) &&
2073 "Wrong HasTemplateKWAndArgsInfo!");
2075 (HasFirstQualifierFoundInScope == E->hasFirstQualifierFoundInScope()) &&
2076 "Wrong HasFirstQualifierFoundInScope!");
2078 if (HasTemplateKWAndArgsInfo)
2080 *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
2081 E->getTrailingObjects<TemplateArgumentLoc>(), NumTemplateArgs);
2084 "Wrong NumTemplateArgs!");
2087 CurrentUnpackingBits->getNextBit();
2089 E->BaseType = Record.readType();
2090 E->QualifierLoc = Record.readNestedNameSpecifierLoc();
2092 if (CurrentUnpackingBits->getNextBit())
2093 E->Base = Record.readSubExpr();
2099 if (HasFirstQualifierFoundInScope)
2100 *E->getTrailingObjects<NamedDecl *>() = readDeclAs<NamedDecl>();
2102 E->MemberNameInfo = Record.readDeclarationNameInfo();
2109 if (CurrentUnpackingBits->getNextBit())
2111 *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
2112 E->getTrailingObjects<TemplateArgumentLoc>(),
2113 CurrentUnpackingBits->getNextBits(16));
2115 E->QualifierLoc = Record.readNestedNameSpecifierLoc();
2116 E->NameInfo = Record.readDeclarationNameInfo();
2122 assert(Record.peekInt() == E->
getNumArgs() &&
2123 "Read wrong record during creation ?");
2125 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I)
2126 E->
setArg(I, Record.readSubExpr());
2127 E->TypeAndInitForm.setPointer(readTypeSourceInfo());
2130 E->TypeAndInitForm.setInt(Record.readInt());
2133void ASTStmtReader::VisitOverloadExpr(
OverloadExpr *E) {
2136 unsigned NumResults = Record.readInt();
2137 CurrentUnpackingBits.emplace(Record.readInt());
2138 bool HasTemplateKWAndArgsInfo = CurrentUnpackingBits->getNextBit();
2139 assert((E->
getNumDecls() == NumResults) &&
"Wrong NumResults!");
2141 "Wrong HasTemplateKWAndArgsInfo!");
2143 unsigned NumTemplateArgs = 0;
2144 if (HasTemplateKWAndArgsInfo) {
2145 NumTemplateArgs = Record.readInt();
2151 UnresolvedSet<8> Decls;
2152 for (
unsigned I = 0; I != NumResults; ++I) {
2153 auto *D = readDeclAs<NamedDecl>();
2159 UnresolvedSetIterator Iter = Decls.
begin();
2160 for (
unsigned I = 0; I != NumResults; ++I) {
2161 Results[I] = (Iter + I).getPair();
2165 "Wrong NumTemplateArgs!");
2167 E->NameInfo = Record.readDeclarationNameInfo();
2168 E->QualifierLoc = Record.readNestedNameSpecifierLoc();
2172 VisitOverloadExpr(E);
2175 CurrentUnpackingBits->getNextBit();
2177 if (CurrentUnpackingBits->getNextBit())
2178 E->Base = Record.readSubExpr();
2182 E->OperatorLoc = readSourceLocation();
2184 E->BaseType = Record.readType();
2188 VisitOverloadExpr(E);
2190 E->NamingClass = readDeclAs<CXXRecordDecl>();
2202 *E->getTrailingObjects<
APValue>() = Record.readAPValue();
2204 SourceRange
Range = readSourceRange();
2205 E->Loc =
Range.getBegin();
2206 E->RParenLoc =
Range.getEnd();
2208 auto **Args = E->getTrailingObjects<TypeSourceInfo *>();
2209 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I)
2210 Args[I] = readTypeSourceInfo();
2216 E->Value = (
unsigned int)Record.readInt();
2217 SourceRange
Range = readSourceRange();
2218 E->Loc =
Range.getBegin();
2219 E->RParen =
Range.getEnd();
2220 E->QueriedType = readTypeSourceInfo();
2221 E->Dimension = Record.readSubExpr();
2228 SourceRange
Range = readSourceRange();
2229 E->QueriedExpression = Record.readSubExpr();
2230 E->Loc =
Range.getBegin();
2231 E->RParen =
Range.getEnd();
2237 E->Range = readSourceRange();
2238 E->Operand = Record.readSubExpr();
2243 E->EllipsisLoc = readSourceLocation();
2244 E->NumExpansions = Record.readInt();
2245 E->Pattern = Record.readSubExpr();
2250 unsigned NumPartialArgs = Record.readInt();
2251 E->OperatorLoc = readSourceLocation();
2252 E->PackLoc = readSourceLocation();
2253 E->RParenLoc = readSourceLocation();
2254 E->Pack = Record.readDeclAs<NamedDecl>();
2256 assert(E->Length == NumPartialArgs);
2257 for (
auto *I = E->getTrailingObjects(), *E = I + NumPartialArgs; I != E;
2259 new (I) TemplateArgument(Record.readTemplateArgument());
2261 E->Length = Record.readInt();
2269 E->EllipsisLoc = readSourceLocation();
2270 E->RSquareLoc = readSourceLocation();
2271 E->SubExprs[0] = Record.readStmt();
2272 E->SubExprs[1] = Record.readStmt();
2273 auto **Exprs = E->getTrailingObjects();
2275 Exprs[I] = Record.readExpr();
2278void ASTStmtReader::VisitSubstNonTypeTemplateParmExpr(
2281 E->AssociatedDeclAndRef.setPointer(readDeclAs<Decl>());
2282 E->AssociatedDeclAndRef.setInt(CurrentUnpackingBits->getNextBit());
2283 E->Index = CurrentUnpackingBits->getNextBits(12);
2284 E->PackIndex = Record.readUnsignedOrNone().toInternalRepresentation();
2285 E->Final = CurrentUnpackingBits->getNextBit();
2287 E->Replacement = Record.readSubExpr();
2290void ASTStmtReader::VisitSubstNonTypeTemplateParmPackExpr(
2293 E->AssociatedDecl = readDeclAs<Decl>();
2294 E->Final = CurrentUnpackingBits->getNextBit();
2295 E->Index = Record.readInt();
2296 TemplateArgument ArgPack = Record.readTemplateArgument();
2302 E->NameLoc = readSourceLocation();
2307 E->NumParameters = Record.readInt();
2308 E->ParamPack = readDeclAs<ValueDecl>();
2309 E->NameLoc = readSourceLocation();
2310 auto **Parms = E->getTrailingObjects();
2311 for (
unsigned i = 0, n = E->NumParameters; i != n; ++i)
2312 Parms[i] = readDeclAs<ValueDecl>();
2317 bool HasMaterialzedDecl = Record.readInt();
2318 if (HasMaterialzedDecl)
2321 E->State = Record.readSubExpr();
2324void ASTStmtReader::VisitCXXFoldExpr(
CXXFoldExpr *E) {
2326 E->LParenLoc = readSourceLocation();
2327 E->EllipsisLoc = readSourceLocation();
2328 E->RParenLoc = readSourceLocation();
2329 E->NumExpansions = Record.readUnsignedOrNone();
2330 E->SubExprs[0] = Record.readSubExpr();
2331 E->SubExprs[1] = Record.readSubExpr();
2332 E->SubExprs[2] = Record.readSubExpr();
2338 unsigned ExpectedNumExprs = Record.readInt();
2339 assert(E->NumExprs == ExpectedNumExprs &&
2340 "expected number of expressions does not equal the actual number of "
2341 "serialized expressions.");
2342 E->NumUserSpecifiedExprs = Record.readInt();
2343 E->InitLoc = readSourceLocation();
2344 E->LParenLoc = readSourceLocation();
2345 E->RParenLoc = readSourceLocation();
2346 for (
unsigned I = 0; I < ExpectedNumExprs; I++)
2347 E->getTrailingObjects()[I] = Record.readSubExpr();
2349 bool HasArrayFillerOrUnionDecl = Record.readBool();
2350 if (HasArrayFillerOrUnionDecl) {
2351 bool HasArrayFiller = Record.readBool();
2352 if (HasArrayFiller) {
2363 E->SourceExpr = Record.readSubExpr();
2368void ASTStmtReader::VisitRecoveryExpr(
RecoveryExpr *E) {
2370 unsigned NumArgs = Record.readInt();
2371 E->BeginLoc = readSourceLocation();
2372 E->EndLoc = readSourceLocation();
2373 assert((NumArgs + 0LL ==
2378 Child = Record.readSubStmt();
2386 E->IsArrow = (Record.readInt() != 0);
2387 E->BaseExpr = Record.readSubExpr();
2388 E->QualifierLoc = Record.readNestedNameSpecifierLoc();
2389 E->MemberLoc = readSourceLocation();
2390 E->TheDecl = readDeclAs<MSPropertyDecl>();
2395 E->setBase(Record.readSubExpr());
2396 E->setIdx(Record.readSubExpr());
2403 E->Guid = readDeclAs<MSGuidDecl>();
2405 E->Operand = readTypeSourceInfo();
2407 E->Operand = Record.readSubExpr();
2410void ASTStmtReader::VisitSEHLeaveStmt(
SEHLeaveStmt *S) {
2417 S->Loc = readSourceLocation();
2418 S->Children[SEHExceptStmt::FILTER_EXPR] = Record.readSubStmt();
2419 S->Children[SEHExceptStmt::BLOCK] = Record.readSubStmt();
2424 S->Loc = readSourceLocation();
2425 S->Block = Record.readSubStmt();
2428void ASTStmtReader::VisitSEHTryStmt(
SEHTryStmt *S) {
2430 S->IsCXXTry = Record.readInt();
2431 S->TryLoc = readSourceLocation();
2432 S->Children[SEHTryStmt::TRY] = Record.readSubStmt();
2433 S->Children[SEHTryStmt::HANDLER] = Record.readSubStmt();
2442 E->
setPreArg(CUDAKernelCallExpr::CONFIG, Record.readSubExpr());
2448void ASTStmtReader::VisitAsTypeExpr(
AsTypeExpr *E) {
2450 E->BuiltinLoc = readSourceLocation();
2451 E->RParenLoc = readSourceLocation();
2452 E->SrcExpr = Record.readSubExpr();
2459void ASTStmtReader::VisitOMPCanonicalLoop(OMPCanonicalLoop *S) {
2461 for (Stmt *&SubStmt : S->SubStmts)
2462 SubStmt = Record.readSubStmt();
2465void ASTStmtReader::VisitOMPExecutableDirective(OMPExecutableDirective *E) {
2466 Record.readOMPChildren(E->Data);
2467 E->setLocStart(readSourceLocation());
2468 E->setLocEnd(readSourceLocation());
2471void ASTStmtReader::VisitOMPLoopBasedDirective(OMPLoopBasedDirective *D) {
2475 VisitOMPExecutableDirective(D);
2478void ASTStmtReader::VisitOMPLoopDirective(OMPLoopDirective *D) {
2479 VisitOMPLoopBasedDirective(D);
2482void ASTStmtReader::VisitOMPMetaDirective(OMPMetaDirective *D) {
2486 VisitOMPExecutableDirective(D);
2489void ASTStmtReader::VisitOMPParallelDirective(OMPParallelDirective *D) {
2491 VisitOMPExecutableDirective(D);
2492 D->setHasCancel(Record.readBool());
2495void ASTStmtReader::VisitOMPSimdDirective(OMPSimdDirective *D) {
2496 VisitOMPLoopDirective(D);
2499void ASTStmtReader::VisitOMPCanonicalLoopNestTransformationDirective(
2500 OMPCanonicalLoopNestTransformationDirective *D) {
2501 VisitOMPLoopBasedDirective(D);
2502 D->setNumGeneratedTopLevelLoops(Record.readUInt32());
2505void ASTStmtReader::VisitOMPTileDirective(OMPTileDirective *D) {
2506 VisitOMPCanonicalLoopNestTransformationDirective(D);
2509void ASTStmtReader::VisitOMPStripeDirective(OMPStripeDirective *D) {
2510 VisitOMPCanonicalLoopNestTransformationDirective(D);
2513void ASTStmtReader::VisitOMPUnrollDirective(OMPUnrollDirective *D) {
2514 VisitOMPCanonicalLoopNestTransformationDirective(D);
2517void ASTStmtReader::VisitOMPReverseDirective(OMPReverseDirective *D) {
2518 VisitOMPCanonicalLoopNestTransformationDirective(D);
2521void ASTStmtReader::VisitOMPCanonicalLoopSequenceTransformationDirective(
2522 OMPCanonicalLoopSequenceTransformationDirective *D) {
2524 VisitOMPExecutableDirective(D);
2525 D->setNumGeneratedTopLevelLoops(Record.readUInt32());
2528void ASTStmtReader::VisitOMPInterchangeDirective(OMPInterchangeDirective *D) {
2529 VisitOMPCanonicalLoopNestTransformationDirective(D);
2532void ASTStmtReader::VisitOMPFuseDirective(OMPFuseDirective *D) {
2533 VisitOMPCanonicalLoopSequenceTransformationDirective(D);
2536void ASTStmtReader::VisitOMPForDirective(OMPForDirective *D) {
2537 VisitOMPLoopDirective(D);
2538 D->setHasCancel(Record.readBool());
2541void ASTStmtReader::VisitOMPForSimdDirective(OMPForSimdDirective *D) {
2542 VisitOMPLoopDirective(D);
2545void ASTStmtReader::VisitOMPSectionsDirective(OMPSectionsDirective *D) {
2547 VisitOMPExecutableDirective(D);
2548 D->setHasCancel(Record.readBool());
2551void ASTStmtReader::VisitOMPSectionDirective(OMPSectionDirective *D) {
2553 VisitOMPExecutableDirective(D);
2554 D->setHasCancel(Record.readBool());
2557void ASTStmtReader::VisitOMPScopeDirective(OMPScopeDirective *D) {
2559 VisitOMPExecutableDirective(D);
2562void ASTStmtReader::VisitOMPSingleDirective(OMPSingleDirective *D) {
2564 VisitOMPExecutableDirective(D);
2567void ASTStmtReader::VisitOMPMasterDirective(OMPMasterDirective *D) {
2569 VisitOMPExecutableDirective(D);
2572void ASTStmtReader::VisitOMPCriticalDirective(OMPCriticalDirective *D) {
2574 VisitOMPExecutableDirective(D);
2575 D->DirName = Record.readDeclarationNameInfo();
2578void ASTStmtReader::VisitOMPParallelForDirective(OMPParallelForDirective *D) {
2579 VisitOMPLoopDirective(D);
2580 D->setHasCancel(Record.readBool());
2583void ASTStmtReader::VisitOMPParallelForSimdDirective(
2584 OMPParallelForSimdDirective *D) {
2585 VisitOMPLoopDirective(D);
2588void ASTStmtReader::VisitOMPParallelMasterDirective(
2589 OMPParallelMasterDirective *D) {
2591 VisitOMPExecutableDirective(D);
2594void ASTStmtReader::VisitOMPParallelMaskedDirective(
2595 OMPParallelMaskedDirective *D) {
2597 VisitOMPExecutableDirective(D);
2600void ASTStmtReader::VisitOMPParallelSectionsDirective(
2601 OMPParallelSectionsDirective *D) {
2603 VisitOMPExecutableDirective(D);
2604 D->setHasCancel(Record.readBool());
2607void ASTStmtReader::VisitOMPTaskDirective(OMPTaskDirective *D) {
2609 VisitOMPExecutableDirective(D);
2610 D->setHasCancel(Record.readBool());
2613void ASTStmtReader::VisitOMPTaskyieldDirective(OMPTaskyieldDirective *D) {
2615 VisitOMPExecutableDirective(D);
2618void ASTStmtReader::VisitOMPBarrierDirective(OMPBarrierDirective *D) {
2620 VisitOMPExecutableDirective(D);
2623void ASTStmtReader::VisitOMPTaskwaitDirective(OMPTaskwaitDirective *D) {
2627 VisitOMPExecutableDirective(D);
2630void ASTStmtReader::VisitOMPAssumeDirective(OMPAssumeDirective *D) {
2632 VisitOMPExecutableDirective(D);
2635void ASTStmtReader::VisitOMPErrorDirective(OMPErrorDirective *D) {
2639 VisitOMPExecutableDirective(D);
2642void ASTStmtReader::VisitOMPTaskgroupDirective(OMPTaskgroupDirective *D) {
2644 VisitOMPExecutableDirective(D);
2647void ASTStmtReader::VisitOMPFlushDirective(OMPFlushDirective *D) {
2649 VisitOMPExecutableDirective(D);
2652void ASTStmtReader::VisitOMPDepobjDirective(OMPDepobjDirective *D) {
2654 VisitOMPExecutableDirective(D);
2657void ASTStmtReader::VisitOMPScanDirective(OMPScanDirective *D) {
2659 VisitOMPExecutableDirective(D);
2662void ASTStmtReader::VisitOMPOrderedDirective(OMPOrderedDirective *D) {
2664 VisitOMPExecutableDirective(D);
2667void ASTStmtReader::VisitOMPAtomicDirective(OMPAtomicDirective *D) {
2669 VisitOMPExecutableDirective(D);
2670 D->Flags.IsXLHSInRHSPart = Record.readBool() ? 1 : 0;
2671 D->Flags.IsPostfixUpdate = Record.readBool() ? 1 : 0;
2672 D->Flags.IsFailOnly = Record.readBool() ? 1 : 0;
2675void ASTStmtReader::VisitOMPTargetDirective(OMPTargetDirective *D) {
2677 VisitOMPExecutableDirective(D);
2680void ASTStmtReader::VisitOMPTargetDataDirective(OMPTargetDataDirective *D) {
2682 VisitOMPExecutableDirective(D);
2685void ASTStmtReader::VisitOMPTargetEnterDataDirective(
2686 OMPTargetEnterDataDirective *D) {
2688 VisitOMPExecutableDirective(D);
2691void ASTStmtReader::VisitOMPTargetExitDataDirective(
2692 OMPTargetExitDataDirective *D) {
2694 VisitOMPExecutableDirective(D);
2697void ASTStmtReader::VisitOMPTargetParallelDirective(
2698 OMPTargetParallelDirective *D) {
2700 VisitOMPExecutableDirective(D);
2701 D->setHasCancel(Record.readBool());
2704void ASTStmtReader::VisitOMPTargetParallelForDirective(
2705 OMPTargetParallelForDirective *D) {
2706 VisitOMPLoopDirective(D);
2707 D->setHasCancel(Record.readBool());
2710void ASTStmtReader::VisitOMPTeamsDirective(OMPTeamsDirective *D) {
2712 VisitOMPExecutableDirective(D);
2715void ASTStmtReader::VisitOMPCancellationPointDirective(
2716 OMPCancellationPointDirective *D) {
2718 VisitOMPExecutableDirective(D);
2722void ASTStmtReader::VisitOMPCancelDirective(OMPCancelDirective *D) {
2724 VisitOMPExecutableDirective(D);
2728void ASTStmtReader::VisitOMPTaskLoopDirective(OMPTaskLoopDirective *D) {
2729 VisitOMPLoopDirective(D);
2730 D->setHasCancel(Record.readBool());
2733void ASTStmtReader::VisitOMPTaskLoopSimdDirective(OMPTaskLoopSimdDirective *D) {
2734 VisitOMPLoopDirective(D);
2737void ASTStmtReader::VisitOMPMasterTaskLoopDirective(
2738 OMPMasterTaskLoopDirective *D) {
2739 VisitOMPLoopDirective(D);
2740 D->setHasCancel(Record.readBool());
2743void ASTStmtReader::VisitOMPMaskedTaskLoopDirective(
2744 OMPMaskedTaskLoopDirective *D) {
2745 VisitOMPLoopDirective(D);
2746 D->setHasCancel(Record.readBool());
2749void ASTStmtReader::VisitOMPMasterTaskLoopSimdDirective(
2750 OMPMasterTaskLoopSimdDirective *D) {
2751 VisitOMPLoopDirective(D);
2754void ASTStmtReader::VisitOMPMaskedTaskLoopSimdDirective(
2755 OMPMaskedTaskLoopSimdDirective *D) {
2756 VisitOMPLoopDirective(D);
2759void ASTStmtReader::VisitOMPParallelMasterTaskLoopDirective(
2760 OMPParallelMasterTaskLoopDirective *D) {
2761 VisitOMPLoopDirective(D);
2762 D->setHasCancel(Record.readBool());
2765void ASTStmtReader::VisitOMPParallelMaskedTaskLoopDirective(
2766 OMPParallelMaskedTaskLoopDirective *D) {
2767 VisitOMPLoopDirective(D);
2768 D->setHasCancel(Record.readBool());
2771void ASTStmtReader::VisitOMPParallelMasterTaskLoopSimdDirective(
2772 OMPParallelMasterTaskLoopSimdDirective *D) {
2773 VisitOMPLoopDirective(D);
2776void ASTStmtReader::VisitOMPParallelMaskedTaskLoopSimdDirective(
2777 OMPParallelMaskedTaskLoopSimdDirective *D) {
2778 VisitOMPLoopDirective(D);
2781void ASTStmtReader::VisitOMPDistributeDirective(OMPDistributeDirective *D) {
2782 VisitOMPLoopDirective(D);
2785void ASTStmtReader::VisitOMPTargetUpdateDirective(OMPTargetUpdateDirective *D) {
2787 VisitOMPExecutableDirective(D);
2790void ASTStmtReader::VisitOMPDistributeParallelForDirective(
2791 OMPDistributeParallelForDirective *D) {
2792 VisitOMPLoopDirective(D);
2793 D->setHasCancel(Record.readBool());
2796void ASTStmtReader::VisitOMPDistributeParallelForSimdDirective(
2797 OMPDistributeParallelForSimdDirective *D) {
2798 VisitOMPLoopDirective(D);
2801void ASTStmtReader::VisitOMPDistributeSimdDirective(
2802 OMPDistributeSimdDirective *D) {
2803 VisitOMPLoopDirective(D);
2806void ASTStmtReader::VisitOMPTargetParallelForSimdDirective(
2807 OMPTargetParallelForSimdDirective *D) {
2808 VisitOMPLoopDirective(D);
2811void ASTStmtReader::VisitOMPTargetSimdDirective(OMPTargetSimdDirective *D) {
2812 VisitOMPLoopDirective(D);
2815void ASTStmtReader::VisitOMPTeamsDistributeDirective(
2816 OMPTeamsDistributeDirective *D) {
2817 VisitOMPLoopDirective(D);
2820void ASTStmtReader::VisitOMPTeamsDistributeSimdDirective(
2821 OMPTeamsDistributeSimdDirective *D) {
2822 VisitOMPLoopDirective(D);
2825void ASTStmtReader::VisitOMPTeamsDistributeParallelForSimdDirective(
2826 OMPTeamsDistributeParallelForSimdDirective *D) {
2827 VisitOMPLoopDirective(D);
2830void ASTStmtReader::VisitOMPTeamsDistributeParallelForDirective(
2831 OMPTeamsDistributeParallelForDirective *D) {
2832 VisitOMPLoopDirective(D);
2833 D->setHasCancel(Record.readBool());
2836void ASTStmtReader::VisitOMPTargetTeamsDirective(OMPTargetTeamsDirective *D) {
2838 VisitOMPExecutableDirective(D);
2841void ASTStmtReader::VisitOMPTargetTeamsDistributeDirective(
2842 OMPTargetTeamsDistributeDirective *D) {
2843 VisitOMPLoopDirective(D);
2846void ASTStmtReader::VisitOMPTargetTeamsDistributeParallelForDirective(
2847 OMPTargetTeamsDistributeParallelForDirective *D) {
2848 VisitOMPLoopDirective(D);
2849 D->setHasCancel(Record.readBool());
2852void ASTStmtReader::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
2853 OMPTargetTeamsDistributeParallelForSimdDirective *D) {
2854 VisitOMPLoopDirective(D);
2857void ASTStmtReader::VisitOMPTargetTeamsDistributeSimdDirective(
2858 OMPTargetTeamsDistributeSimdDirective *D) {
2859 VisitOMPLoopDirective(D);
2862void ASTStmtReader::VisitOMPInteropDirective(OMPInteropDirective *D) {
2864 VisitOMPExecutableDirective(D);
2867void ASTStmtReader::VisitOMPDispatchDirective(OMPDispatchDirective *D) {
2869 VisitOMPExecutableDirective(D);
2870 D->setTargetCallLoc(Record.readSourceLocation());
2873void ASTStmtReader::VisitOMPMaskedDirective(OMPMaskedDirective *D) {
2875 VisitOMPExecutableDirective(D);
2878void ASTStmtReader::VisitOMPGenericLoopDirective(OMPGenericLoopDirective *D) {
2879 VisitOMPLoopDirective(D);
2882void ASTStmtReader::VisitOMPTeamsGenericLoopDirective(
2883 OMPTeamsGenericLoopDirective *D) {
2884 VisitOMPLoopDirective(D);
2887void ASTStmtReader::VisitOMPTargetTeamsGenericLoopDirective(
2888 OMPTargetTeamsGenericLoopDirective *D) {
2889 VisitOMPLoopDirective(D);
2890 D->setCanBeParallelFor(Record.readBool());
2893void ASTStmtReader::VisitOMPParallelGenericLoopDirective(
2894 OMPParallelGenericLoopDirective *D) {
2895 VisitOMPLoopDirective(D);
2898void ASTStmtReader::VisitOMPTargetParallelGenericLoopDirective(
2899 OMPTargetParallelGenericLoopDirective *D) {
2900 VisitOMPLoopDirective(D);
2907 (void)Record.readInt();
2909 S->Range = Record.readSourceRange();
2910 S->DirectiveLoc = Record.readSourceLocation();
2911 Record.readOpenACCClauseList(S->Clauses);
2914void ASTStmtReader::VisitOpenACCAssociatedStmtConstruct(
2916 VisitOpenACCConstructStmt(S);
2922 VisitOpenACCAssociatedStmtConstruct(S);
2925void ASTStmtReader::VisitOpenACCLoopConstruct(OpenACCLoopConstruct *S) {
2927 VisitOpenACCAssociatedStmtConstruct(S);
2931void ASTStmtReader::VisitOpenACCCombinedConstruct(OpenACCCombinedConstruct *S) {
2933 VisitOpenACCAssociatedStmtConstruct(S);
2936void ASTStmtReader::VisitOpenACCDataConstruct(OpenACCDataConstruct *S) {
2938 VisitOpenACCAssociatedStmtConstruct(S);
2941void ASTStmtReader::VisitOpenACCEnterDataConstruct(
2942 OpenACCEnterDataConstruct *S) {
2944 VisitOpenACCConstructStmt(S);
2947void ASTStmtReader::VisitOpenACCExitDataConstruct(OpenACCExitDataConstruct *S) {
2949 VisitOpenACCConstructStmt(S);
2952void ASTStmtReader::VisitOpenACCInitConstruct(OpenACCInitConstruct *S) {
2954 VisitOpenACCConstructStmt(S);
2957void ASTStmtReader::VisitOpenACCShutdownConstruct(OpenACCShutdownConstruct *S) {
2959 VisitOpenACCConstructStmt(S);
2962void ASTStmtReader::VisitOpenACCSetConstruct(OpenACCSetConstruct *S) {
2964 VisitOpenACCConstructStmt(S);
2967void ASTStmtReader::VisitOpenACCUpdateConstruct(OpenACCUpdateConstruct *S) {
2969 VisitOpenACCConstructStmt(S);
2972void ASTStmtReader::VisitOpenACCHostDataConstruct(OpenACCHostDataConstruct *S) {
2974 VisitOpenACCAssociatedStmtConstruct(S);
2977void ASTStmtReader::VisitOpenACCWaitConstruct(OpenACCWaitConstruct *S) {
2980 (void)Record.readInt();
2981 VisitOpenACCConstructStmt(S);
2982 S->LParenLoc = Record.readSourceLocation();
2983 S->RParenLoc = Record.readSourceLocation();
2984 S->QueuesLoc = Record.readSourceLocation();
2986 for (
unsigned I = 0; I < S->NumExprs; ++I) {
2987 S->getExprPtr()[I] = cast_if_present<Expr>(Record.readSubStmt());
2988 assert((I == 0 || S->getExprPtr()[I] !=
nullptr) &&
2989 "Only first expression should be null");
2993void ASTStmtReader::VisitOpenACCCacheConstruct(OpenACCCacheConstruct *S) {
2995 (void)Record.readInt();
2996 VisitOpenACCConstructStmt(S);
2997 S->ParensLoc = Record.readSourceRange();
2998 S->ReadOnlyLoc = Record.readSourceLocation();
2999 for (
unsigned I = 0; I < S->NumVars; ++I)
3003void ASTStmtReader::VisitOpenACCAtomicConstruct(OpenACCAtomicConstruct *S) {
3005 VisitOpenACCConstructStmt(S);
3007 S->setAssociatedStmt(Record.readSubStmt());
3016 S->SubExprs[HLSLOutArgExpr::BaseLValue] = Record.readSubExpr();
3017 S->SubExprs[HLSLOutArgExpr::CastedTemporary] = Record.readSubExpr();
3018 S->SubExprs[HLSLOutArgExpr::WritebackCast] = Record.readSubExpr();
3019 S->IsInOut = Record.readBool();
3027 switch (ReadingKind) {
3029 llvm_unreachable(
"should not call this when not reading anything");
3032 return ReadStmtFromStream(F);
3037 llvm_unreachable(
"ReadingKind not set ?");
3041 return cast_or_null<Expr>(
ReadStmt(F));
3056 ReadingKindTracker ReadingKind(Read_Stmt, *
this);
3061 llvm::DenseMap<uint64_t, Stmt *> StmtEntries;
3064 unsigned PrevNumStmts = StmtStack.size();
3073 Cursor.advanceSkippingSubblocks();
3078 llvm::BitstreamEntry Entry = MaybeEntry.get();
3080 switch (Entry.Kind) {
3081 case llvm::BitstreamEntry::SubBlock:
3082 case llvm::BitstreamEntry::Error:
3083 Error(
"malformed block record in AST file");
3085 case llvm::BitstreamEntry::EndBlock:
3087 case llvm::BitstreamEntry::Record:
3094 bool Finished =
false;
3095 bool IsStmtReference =
false;
3096 Expected<unsigned> MaybeStmtCode =
Record.readRecord(Cursor, Entry.ID);
3097 if (!MaybeStmtCode) {
3101 switch ((
StmtCode)MaybeStmtCode.get()) {
3107 IsStmtReference =
true;
3108 assert(StmtEntries.contains(
Record[0]) &&
3109 "No stmt was recorded for this offset reference!");
3110 S = StmtEntries[
Record.readInt()];
3118 S =
new (Context) NullStmt(
Empty);
3135 S =
new (Context) DefaultStmt(
Empty);
3139 S =
new (Context) LabelStmt(
Empty);
3150 bool HasElse = IfStmtBits.getNextBit();
3151 bool HasVar = IfStmtBits.getNextBit();
3152 bool HasInit = IfStmtBits.getNextBit();
3171 S =
new (Context) DoStmt(
Empty);
3175 S =
new (Context) ForStmt(
Empty);
3179 S =
new (Context) GotoStmt(
Empty);
3183 S =
new (Context) IndirectGotoStmt(
Empty);
3187 S =
new (Context) ContinueStmt(
Empty);
3191 S =
new (Context) BreakStmt(
Empty);
3204 S =
new (Context) DeclStmt(
Empty);
3208 S =
new (Context) GCCAsmStmt(
Empty);
3212 S =
new (Context) MSAsmStmt(
Empty);
3221 S =
new (Context) SYCLKernelCallStmt(
Empty);
3250 DeclRefExprBits.advance(5);
3251 bool HasFoundDecl = DeclRefExprBits.getNextBit();
3252 bool HasQualifier = DeclRefExprBits.getNextBit();
3253 bool HasTemplateKWAndArgsInfo = DeclRefExprBits.getNextBit();
3254 unsigned NumTemplateArgs = HasTemplateKWAndArgsInfo
3258 HasTemplateKWAndArgsInfo, NumTemplateArgs);
3275 S =
new (Context) ImaginaryLiteral(
Empty);
3287 S =
new (Context) CharacterLiteral(
Empty);
3291 S =
new (Context) ParenExpr(
Empty);
3303 bool HasFPFeatures = UnaryOperatorBits.getNextBit();
3315 S =
new (Context) UnaryExprOrTypeTraitExpr(
Empty);
3319 S =
new (Context) ArraySubscriptExpr(
Empty);
3323 S =
new (Context) MatrixSubscriptExpr(
Empty);
3327 S =
new (Context) ArraySectionExpr(
Empty);
3343 CallExprBits.advance(1);
3344 auto HasFPFeatures = CallExprBits.getNextBit();
3356 bool HasQualifier = ExprMemberBits.getNextBit();
3357 bool HasFoundDecl = ExprMemberBits.getNextBit();
3358 bool HasTemplateInfo = ExprMemberBits.getNextBit();
3361 HasTemplateInfo, NumTemplateArgs);
3367 BinaryOperatorBits.advance( 6);
3368 bool HasFPFeatures = BinaryOperatorBits.getNextBit();
3375 BinaryOperatorBits.advance( 6);
3376 bool HasFPFeatures = BinaryOperatorBits.getNextBit();
3382 S =
new (Context) ConditionalOperator(
Empty);
3386 S =
new (Context) BinaryConditionalOperator(
Empty);
3392 CastExprBits.advance(7);
3393 bool HasFPFeatures = CastExprBits.getNextBit();
3401 CastExprBits.advance(7);
3402 bool HasFPFeatures = CastExprBits.getNextBit();
3408 S =
new (Context) CompoundLiteralExpr(
Empty);
3412 S =
new (Context) ExtVectorElementExpr(
Empty);
3416 S =
new (Context) MatrixElementExpr(
Empty);
3420 S =
new (Context) InitListExpr(
Empty);
3430 S =
new (Context) DesignatedInitUpdateExpr(
Empty);
3434 S =
new (Context) ImplicitValueInitExpr(
Empty);
3438 S =
new (Context) NoInitExpr(
Empty);
3442 S =
new (Context) ArrayInitLoopExpr(
Empty);
3446 S =
new (Context) ArrayInitIndexExpr(
Empty);
3450 S =
new (Context) VAArgExpr(
Empty);
3454 S =
new (Context) SourceLocExpr(
Empty);
3458 S =
new (Context) EmbedExpr(
Empty);
3462 S =
new (Context) AddrLabelExpr(
Empty);
3466 S =
new (Context) StmtExpr(
Empty);
3470 S =
new (Context) ChooseExpr(
Empty);
3474 S =
new (Context) GNUNullExpr(
Empty);
3478 S =
new (Context) ShuffleVectorExpr(
Empty);
3484 bool HasFPFeatures = ConvertVectorExprBits.getNextBit();
3490 S =
new (Context) BlockExpr(
Empty);
3500 S =
new (Context) ObjCStringLiteral(
Empty);
3504 S =
new (Context) ObjCBoxedExpr(
Empty);
3519 S =
new (Context) ObjCEncodeExpr(
Empty);
3523 S =
new (Context) ObjCSelectorExpr(
Empty);
3527 S =
new (Context) ObjCProtocolExpr(
Empty);
3531 S =
new (Context) ObjCIvarRefExpr(
Empty);
3535 S =
new (Context) ObjCPropertyRefExpr(
Empty);
3539 S =
new (Context) ObjCSubscriptRefExpr(
Empty);
3543 llvm_unreachable(
"mismatching AST file");
3552 S =
new (Context) ObjCIsaExpr(
Empty);
3556 S =
new (Context) ObjCIndirectCopyRestoreExpr(
Empty);
3560 S =
new (Context) ObjCBridgedCastExpr(
Empty);
3564 S =
new (Context) ObjCForCollectionStmt(
Empty);
3568 S =
new (Context) ObjCAtCatchStmt(
Empty);
3572 S =
new (Context) ObjCAtFinallyStmt(
Empty);
3582 S =
new (Context) ObjCAtSynchronizedStmt(
Empty);
3586 S =
new (Context) ObjCAtThrowStmt(
Empty);
3590 S =
new (Context) ObjCAutoreleasePoolStmt(
Empty);
3594 S =
new (Context) ObjCBoolLiteralExpr(
Empty);
3598 S =
new (Context) ObjCAvailabilityCheckExpr(
Empty);
3602 S =
new (Context) SEHLeaveStmt(
Empty);
3606 S =
new (Context) SEHExceptStmt(
Empty);
3610 S =
new (Context) SEHFinallyStmt(
Empty);
3614 S =
new (Context) SEHTryStmt(
Empty);
3618 S =
new (Context) CXXCatchStmt(
Empty);
3627 S =
new (Context) CXXForRangeStmt(
Empty);
3631 S =
new (Context) MSDependentExistsStmt(SourceLocation(),
true,
3632 NestedNameSpecifierLoc(),
3633 DeclarationNameInfo(),
3638 S = OMPCanonicalLoop::createEmpty(Context);
3648 OMPParallelDirective::CreateEmpty(Context,
3656 S = OMPSimdDirective::CreateEmpty(Context, NumClauses,
3657 CollapsedNum,
Empty);
3685 "Reverse directive has no clauses");
3706 S = OMPForDirective::CreateEmpty(Context, NumClauses, CollapsedNum,
3714 S = OMPForSimdDirective::CreateEmpty(Context, NumClauses, CollapsedNum,
3720 S = OMPSectionsDirective::CreateEmpty(
3725 S = OMPSectionDirective::CreateEmpty(Context,
Empty);
3729 S = OMPScopeDirective::CreateEmpty(
3734 S = OMPSingleDirective::CreateEmpty(
3739 S = OMPMasterDirective::CreateEmpty(Context,
Empty);
3743 S = OMPCriticalDirective::CreateEmpty(
3750 S = OMPParallelForDirective::CreateEmpty(Context, NumClauses,
3751 CollapsedNum,
Empty);
3758 S = OMPParallelForSimdDirective::CreateEmpty(Context, NumClauses,
3759 CollapsedNum,
Empty);
3764 S = OMPParallelMasterDirective::CreateEmpty(
3769 S = OMPParallelMaskedDirective::CreateEmpty(
3774 S = OMPParallelSectionsDirective::CreateEmpty(
3779 S = OMPTaskDirective::CreateEmpty(
3784 S = OMPTaskyieldDirective::CreateEmpty(Context,
Empty);
3788 S = OMPBarrierDirective::CreateEmpty(Context,
Empty);
3792 S = OMPTaskwaitDirective::CreateEmpty(
3802 S = OMPTaskgroupDirective::CreateEmpty(
3807 S = OMPFlushDirective::CreateEmpty(
3812 S = OMPDepobjDirective::CreateEmpty(
3824 S = OMPOrderedDirective::CreateEmpty(Context, NumClauses,
3825 !HasAssociatedStmt,
Empty);
3830 S = OMPAtomicDirective::CreateEmpty(
3863 CollapsedNum,
Empty);
3898 CollapsedNum,
Empty);
3906 CollapsedNum,
Empty);
3914 CollapsedNum,
Empty);
3922 CollapsedNum,
Empty);
3930 CollapsedNum,
Empty);
3938 CollapsedNum,
Empty);
3946 CollapsedNum,
Empty);
3954 Context, NumClauses, CollapsedNum,
Empty);
3962 Context, NumClauses, CollapsedNum,
Empty);
3978 CollapsedNum,
Empty);
3995 CollapsedNum,
Empty);
4003 CollapsedNum,
Empty);
4019 CollapsedNum,
Empty);
4027 CollapsedNum,
Empty);
4035 Context, NumClauses, CollapsedNum,
Empty);
4043 Context, NumClauses, CollapsedNum,
Empty);
4056 CollapsedNum,
Empty);
4064 Context, NumClauses, CollapsedNum,
Empty);
4072 Context, NumClauses, CollapsedNum,
Empty);
4080 Context, NumClauses, CollapsedNum,
Empty);
4103 CollapsedNum,
Empty);
4111 CollapsedNum,
Empty);
4119 CollapsedNum,
Empty);
4127 CollapsedNum,
Empty);
4135 Context, NumClauses, CollapsedNum,
Empty);
4148 CallExprBits.advance(1);
4149 auto HasFPFeatures = CallExprBits.getNextBit();
4158 CallExprBits.advance(1);
4159 auto HasFPFeatures = CallExprBits.getNextBit();
4166 S =
new (Context) CXXRewrittenBinaryOperator(
Empty);
4176 S =
new (Context) CXXInheritedCtorInitExpr(
Empty);
4188 CastExprBits.advance(7);
4189 bool HasFPFeatures = CastExprBits.getNextBit();
4217 CastExprBits.advance(7);
4218 bool HasFPFeatures = CastExprBits.getNextBit();
4226 assert(PathSize == 0 &&
"Wrong PathSize!");
4228 S =
new (Context) BuiltinBitCastExpr(
Empty);
4235 CallExprBits.advance(1);
4236 auto HasFPFeatures = CallExprBits.getNextBit();
4243 S =
new (Context) CXXStdInitializerListExpr(
Empty);
4247 S =
new (Context) CXXBoolLiteralExpr(
Empty);
4251 S =
new (Context) CXXNullPtrLiteralExpr(
Empty);
4255 S =
new (Context) CXXTypeidExpr(
Empty,
true);
4259 S =
new (Context) CXXTypeidExpr(
Empty,
false);
4263 S =
new (Context) CXXUuidofExpr(
Empty,
true);
4267 S =
new (Context) MSPropertyRefExpr(
Empty);
4271 S =
new (Context) MSPropertySubscriptExpr(
Empty);
4275 S =
new (Context) CXXUuidofExpr(
Empty,
false);
4283 S =
new (Context) CXXThrowExpr(
Empty);
4297 S =
new (Context) CXXBindTemporaryExpr(
Empty);
4301 S =
new (Context) CXXScalarValueInitExpr(
Empty);
4314 S =
new (Context) CXXDeleteExpr(
Empty);
4318 S =
new (Context) CXXPseudoDestructorExpr(
Empty);
4328 BitsUnpacker DependentScopeMemberBits(
4330 bool HasTemplateKWAndArgsInfo = DependentScopeMemberBits.getNextBit();
4332 bool HasFirstQualifierFoundInScope =
4333 DependentScopeMemberBits.getNextBit();
4335 Context, HasTemplateKWAndArgsInfo, NumTemplateArgs,
4336 HasFirstQualifierFoundInScope);
4341 BitsUnpacker DependentScopeDeclRefBits(
4344 bool HasTemplateKWAndArgsInfo = DependentScopeDeclRefBits.getNextBit();
4345 unsigned NumTemplateArgs =
4346 HasTemplateKWAndArgsInfo
4347 ? DependentScopeDeclRefBits.getNextBits(16)
4350 Context, HasTemplateKWAndArgsInfo, NumTemplateArgs);
4362 auto HasTemplateKWAndArgsInfo = OverloadExprBits.getNextBit();
4363 auto NumTemplateArgs = HasTemplateKWAndArgsInfo
4367 Context, NumResults, HasTemplateKWAndArgsInfo, NumTemplateArgs);
4374 auto HasTemplateKWAndArgsInfo = OverloadExprBits.getNextBit();
4375 auto NumTemplateArgs = HasTemplateKWAndArgsInfo
4379 Context, NumResults, HasTemplateKWAndArgsInfo, NumTemplateArgs);
4390 S =
new (Context) ArrayTypeTraitExpr(
Empty);
4394 S =
new (Context) ExpressionTraitExpr(
Empty);
4398 S =
new (Context) CXXNoexceptExpr(
Empty);
4402 S =
new (Context) PackExpansionExpr(
Empty);
4418 S =
new (Context) SubstNonTypeTemplateParmExpr(
Empty);
4422 S =
new (Context) SubstNonTypeTemplateParmPackExpr(
Empty);
4431 S =
new (Context) MaterializeTemporaryExpr(
Empty);
4435 S =
new (Context) CXXFoldExpr(
Empty);
4444 S =
new (Context) OpaqueValueExpr(
Empty);
4450 CallExprBits.advance(1);
4451 auto HasFPFeatures = CallExprBits.getNextBit();
4458 S =
new (Context) AsTypeExpr(
Empty);
4468 S =
new (Context) AtomicExpr(
Empty);
4484 S =
new (Context) CoreturnStmt(
Empty);
4488 S =
new (Context) CoawaitExpr(
Empty);
4492 S =
new (Context) CoyieldExpr(
Empty);
4496 S =
new (Context) DependentCoawaitExpr(
Empty);
4500 S =
new (Context) ConceptSpecializationExpr(
Empty);
4505 S = OpenACCComputeConstruct::CreateEmpty(Context, NumClauses);
4594 ++NumStatementsRead;
4596 if (S && !IsStmtReference) {
4598 StmtEntries[
Cursor.GetCurrentBitNo()] = S;
4602 "Invalid deserialization of statement");
4603 StmtStack.push_back(S);
4606 assert(StmtStack.size() > PrevNumStmts &&
"Read too many sub-stmts!");
4607 assert(StmtStack.size() == PrevNumStmts + 1 &&
"Extra expressions on stack!");
4608 return StmtStack.pop_back_val();
This file provides AST data structures related to concepts.
Defines the clang::ASTContext interface.
static concepts::Requirement::SubstitutionDiagnostic * readSubstitutionDiagnostic(ASTRecordReader &Record)
static ConstraintSatisfaction readConstraintSatisfaction(ASTRecordReader &Record)
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Defines the C++ template declaration subclasses.
Defines the clang::Expr interface and subclasses for C++ expressions.
Defines enumerations for expression traits intrinsics.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Defines the clang::LangOptions interface.
llvm::MachO::Record Record
This file defines OpenMP AST classes for clauses.
Defines some OpenMP-specific enums and functions.
static std::string toString(const clang::SanitizerSet &Sanitizers)
Produce a string containing comma-separated names of sanitizers in Sanitizers set.
Defines the clang::SourceLocation class and associated facilities.
Defines various enumerations that describe declaration and type specifiers.
Defines the Objective-C statement AST node classes.
This file defines OpenMP AST classes for executable directives and clauses.
This file defines SYCL AST classes used to represent calls to SYCL kernels.
Defines enumerations for the type traits support.
C Language Family Type Representation.
static OMPAssumeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
static OMPCancelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPCancellationPointDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static OMPDispatchDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPErrorDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPFuseDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses)
Build an empty 'pragma omp fuse' AST node for deserialization.
static OMPGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with a place for NumClauses clauses.
static OMPInterchangeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty 'pragma omp interchange' AST node for deserialization.
static OMPInteropDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPMaskedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPMaskedTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPMaskedTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPMasterTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPMasterTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPParallelGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPParallelMaskedTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPParallelMaskedTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPParallelMasterTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPParallelMasterTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPReverseDirective * CreateEmpty(const ASTContext &C, unsigned NumLoops)
Build an empty 'pragma omp reverse' AST node for deserialization.
static OMPScanDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPStripeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty 'pragma omp stripe' AST node for deserialization.
static OMPTargetDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
static OMPTargetDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetEnterDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
static OMPTargetExitDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
static OMPTargetParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetParallelGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetTeamsGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetUpdateDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTeamsGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTileDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty 'pragma omp tile' AST node for deserialization.
static OMPUnrollDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses)
Build an empty 'pragma omp unroll' AST node for deserialization.
static OpenACCAtomicConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
ArrayRef< Expr * > getVarList() const
static OpenACCCacheConstruct * CreateEmpty(const ASTContext &C, unsigned NumVars)
static OpenACCCombinedConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCDataConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCEnterDataConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCExitDataConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCHostDataConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCInitConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCLoopConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCSetConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCShutdownConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCUpdateConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCWaitConstruct * CreateEmpty(const ASTContext &C, unsigned NumExprs, unsigned NumClauses)
void setValue(const ASTContext &C, const llvm::APInt &Val)
bool needsCleanup() const
Returns whether the object performed allocations.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
ASTContext & getContext()
Retrieve the AST context that this AST reader supplements.
Stmt * ReadSubStmt()
Reads a sub-statement operand during statement reading.
Expr * ReadSubExpr()
Reads a sub-expression operand during statement reading.
Expr * ReadExpr(ModuleFile &F)
Reads an expression.
Stmt * ReadStmt(ModuleFile &F)
Reads a statement.
serialization::ModuleFile ModuleFile
An object for streaming information from a record.
static const unsigned NumExprFields
The number of record fields required for the Expr class itself.
static const unsigned NumObjCObjectLiteralFields
The number of record fields required for the ObjCObjectLiteral class itself (Expr fields + isExpressi...
static const unsigned NumStmtFields
The number of record fields required for the Stmt class itself.
static const unsigned NumExprBits
The number of bits required for the packing bits for the Expr class.
void ReadTemplateKWAndArgsInfo(ASTTemplateKWAndArgsInfo &Args, TemplateArgumentLoc *ArgsLocArray, unsigned NumTemplateArgs)
Read and initialize a ExplicitTemplateArgumentList structure.
ASTStmtReader(ASTRecordReader &Record, llvm::BitstreamCursor &Cursor)
AddrLabelExpr - The GNU address of label extension, representing &&label.
void setLabel(LabelDecl *L)
void setLabelLoc(SourceLocation L)
void setAmpAmpLoc(SourceLocation L)
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
Represents a loop initializing the elements of an array.
This class represents BOTH the OpenMP Array Section and OpenACC 'subarray', with a boolean differenti...
bool isOMPArraySection() const
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
void setRBracketLoc(SourceLocation L)
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent.
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
AsmStmt is the base class for GCCAsmStmt and MSAsmStmt.
void setAsmLoc(SourceLocation L)
unsigned getNumClobbers() const
unsigned getNumOutputs() const
unsigned getNumInputs() const
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load,...
unsigned getNumSubExprs() const
Represents an attribute applied to a statement.
static AttributedStmt * CreateEmpty(const ASTContext &C, unsigned NumAttrs)
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
A builtin binary operation expression such as "x + y" or "x <= y".
void setHasStoredFPFeatures(bool B)
Set and fetch the bit that shows whether FPFeatures needs to be allocated in Trailing Storage.
void setOperatorLoc(SourceLocation L)
void setExcludedOverflowPattern(bool B)
Set and get the bit that informs arithmetic overflow sanitizers whether or not they should exclude ce...
static BinaryOperator * CreateEmpty(const ASTContext &C, bool hasFPFeatures)
void setStoredFPFeatures(FPOptionsOverride F)
Set FPFeatures in trailing storage, used only by Serialization.
void setOpcode(Opcode Opc)
BinaryOperatorKind Opcode
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
void setBlockDecl(BlockDecl *BD)
BreakStmt - This represents a break.
Represents a C++2a __builtin_bit_cast(T, v) expression.
CStyleCastExpr - An explicit cast in C (C99 6.5.4) or a C-style cast in C++ (C++ [expr....
static CStyleCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize, bool HasFPFeatures)
void setRParenLoc(SourceLocation L)
void setLParenLoc(SourceLocation L)
Represents a call to a CUDA kernel function.
static CUDAKernelCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty)
A C++ addrspace_cast expression (currently only enabled for OpenCL).
static CXXAddrspaceCastExpr * CreateEmpty(const ASTContext &Context)
Represents binding an expression to a temporary.
void setTemporary(CXXTemporary *T)
A boolean literal, per ([C++ lex.bool] Boolean literals).
void setLocation(SourceLocation L)
CXXCatchStmt - This represents a C++ catch block.
A C++ const_cast expression (C++ [expr.const.cast]).
static CXXConstCastExpr * CreateEmpty(const ASTContext &Context)
Represents a call to a C++ constructor.
void setArg(unsigned Arg, Expr *ArgExpr)
Set the specified argument.
unsigned getNumArgs() const
Return the number of arguments to the constructor call.
static CXXConstructExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs)
Create an empty C++ construction expression.
A default argument (C++ [dcl.fct.default]).
static CXXDefaultArgExpr * CreateEmpty(const ASTContext &C, bool HasRewrittenInit)
A use of a default initializer in a constructor or in aggregate initialization.
static CXXDefaultInitExpr * CreateEmpty(const ASTContext &C, bool HasRewrittenInit)
Represents a delete expression for memory deallocation and destructor calls, e.g.
Represents a C++ member access expression where the actual member referenced could not be resolved be...
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
static CXXDependentScopeMemberExpr * CreateEmpty(const ASTContext &Ctx, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs, bool HasFirstQualifierFoundInScope)
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
static CXXDynamicCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
Represents a folding of a pack over an operator.
CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for statement, represented as 'for (ra...
void setLoopVarStmt(Stmt *S)
void setRangeStmt(Stmt *S)
void setBeginStmt(Stmt *S)
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr....
void setLParenLoc(SourceLocation L)
static CXXFunctionalCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize, bool HasFPFeatures)
void setRParenLoc(SourceLocation L)
Represents a call to an inherited base class constructor from an inheriting constructor.
Represents a call to a member function that may be written either with member call syntax (e....
static CXXMemberCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty)
Abstract class common to all of the C++ "named"/"keyword" casts.
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
static CXXNewExpr * CreateEmpty(const ASTContext &Ctx, bool IsArray, bool HasInit, unsigned NumPlacementArgs, bool IsParenTypeId)
Create an empty c++ new expression.
bool hasInitializer() const
Whether this new-expression has any initializer at all.
void setOperatorDelete(FunctionDecl *D)
unsigned getNumPlacementArgs() const
bool isParenTypeId() const
raw_arg_iterator raw_arg_end()
raw_arg_iterator raw_arg_begin()
void setOperatorNew(FunctionDecl *D)
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
The null pointer literal (C++11 [lex.nullptr])
void setLocation(SourceLocation L)
A call to an overloaded operator written using operator syntax.
static CXXOperatorCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty)
Represents a list-initialization with parenthesis.
void setInitializedFieldInUnion(FieldDecl *FD)
static CXXParenListInitExpr * CreateEmpty(ASTContext &C, unsigned numExprs, EmptyShell Empty)
void setArrayFiller(Expr *E)
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
void setDestroyedType(IdentifierInfo *II, SourceLocation Loc)
Set the name of destroyed type for a dependent pseudo-destructor expression.
Represents a C++26 reflect expression [expr.reflect].
static CXXReflectExpr * CreateEmpty(ASTContext &C)
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
static CXXReinterpretCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
A rewritten comparison expression that was originally written using operator syntax.
An expression "T()" which creates an rvalue of a non-class type T.
A C++ static_cast expression (C++ [expr.static.cast]).
static CXXStaticCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize, bool hasFPFeatures)
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
Represents a C++ functional cast expression that builds a temporary object.
static CXXTemporaryObjectExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs)
Represents the this expression in C++.
void setCapturedByCopyInLambdaWithExplicitObjectParameter(bool Set)
void setLocation(SourceLocation L)
static CXXThisExpr * CreateEmpty(const ASTContext &Ctx)
A C++ throw-expression (C++ [except.throw]).
CXXTryStmt - A C++ try block, including all handlers.
unsigned getNumHandlers() const
static CXXTryStmt * Create(const ASTContext &C, SourceLocation tryLoc, CompoundStmt *tryBlock, ArrayRef< Stmt * > handlers)
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
bool isTypeOperand() const
void setSourceRange(SourceRange R)
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
void setRParenLoc(SourceLocation L)
void setArg(unsigned I, Expr *E)
void setLParenLoc(SourceLocation L)
unsigned getNumArgs() const
Retrieve the number of arguments.
static CXXUnresolvedConstructExpr * CreateEmpty(const ASTContext &Context, unsigned NumArgs)
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
bool isTypeOperand() const
void setSourceRange(SourceRange R)
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
void setRParenLoc(SourceLocation L)
void setCoroElideSafe(bool V=true)
void setArg(unsigned Arg, Expr *ArgExpr)
setArg - Set the specified argument.
void setADLCallKind(ADLCallKind V=UsesADL)
static CallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty)
Create an empty call expression, for deserialization.
void setUsesMemberSyntax(bool V=true)
void setPreArg(unsigned I, Stmt *PreArg)
void setStoredFPFeatures(FPOptionsOverride F)
Set FPOptionsOverride in trailing storage. Used only by Serialization.
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
This captures a statement into a function.
static CapturedStmt * CreateDeserialized(const ASTContext &Context, unsigned NumCaptures)
Expr ** capture_init_iterator
Iterator that walks over the capture initialization arguments.
void setCapturedRegionKind(CapturedRegionKind Kind)
Set the captured region kind.
CapturedDecl * getCapturedDecl()
Retrieve the outlined function declaration.
Stmt * getCapturedStmt()
Retrieve the statement being captured.
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument.
void setCapturedDecl(CapturedDecl *D)
Set the outlined function declaration.
void setCapturedRecordDecl(RecordDecl *D)
Set the record declaration for captured variables.
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument.
VariableCaptureKind
The different capture forms: by 'this', by reference, capture for variable-length array type etc.
CaseStmt - Represent a case statement.
void setEllipsisLoc(SourceLocation L)
Set the location of the ... in a case statement of the form LHS ... RHS.
static CaseStmt * CreateEmpty(const ASTContext &Ctx, bool CaseStmtIsGNURange)
Build an empty case statement.
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
FPOptionsOverride * getTrailingFPFeatures()
Return a pointer to the trailing FPOptions.
path_iterator path_begin()
unsigned path_size() const
void setCastKind(CastKind K)
bool hasStoredFPFeatures() const
CXXBaseSpecifier ** path_iterator
void setValue(unsigned Val)
void setLocation(SourceLocation Location)
void setKind(CharacterLiteralKind kind)
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
void setRParenLoc(SourceLocation L)
void setIsConditionTrue(bool isTrue)
void setBuiltinLoc(SourceLocation L)
Represents a 'co_await' expression.
void setIsImplicit(bool value=true)
CompoundAssignOperator - For compound assignments (e.g.
void setComputationResultType(QualType T)
static CompoundAssignOperator * CreateEmpty(const ASTContext &C, bool hasFPFeatures)
void setComputationLHSType(QualType T)
CompoundLiteralExpr - [C99 6.5.2.5].
void setFileScope(bool FS)
void setTypeSourceInfo(TypeSourceInfo *tinfo)
void setLParenLoc(SourceLocation L)
void setInitializer(Expr *E)
CompoundStmt - This represents a group of statements like { stmt stmt }.
static CompoundStmt * CreateEmpty(const ASTContext &C, unsigned NumStmts, bool HasFPFeatures)
bool hasStoredFPFeatures() const
Represents the specialization of a concept - evaluates to a prvalue of type bool.
ConditionalOperator - The ?
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
ConstantResultStorageKind getResultStorageKind() const
static ConstantExpr * CreateEmpty(const ASTContext &Context, ConstantResultStorageKind StorageKind)
The result of a constraint satisfaction check, containing the necessary information to diagnose an un...
llvm::SmallVector< UnsatisfiedConstraintRecord, 4 > Details
The substituted constraint expr, if the template arguments could be substituted into them,...
ContinueStmt - This represents a continue.
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
static ConvertVectorExpr * CreateEmpty(const ASTContext &C, bool hasFPFeatures)
void setStoredFPFeatures(FPOptionsOverride F)
Set FPFeatures in trailing storage, used by Serialization & ASTImporter.
bool hasStoredFPFeatures() const
Is FPFeatures in Trailing Storage?
Represents a 'co_return' statement in the C++ Coroutines TS.
Represents the body of a coroutine.
static CoroutineBodyStmt * Create(const ASTContext &C, CtorArgs const &Args)
Represents a 'co_yield' expression.
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
static DeclGroup * Create(ASTContext &C, Decl **Decls, unsigned NumDecls)
A reference to a declared variable, function, enum, etc.
bool hasTemplateKWAndArgsInfo() const
static DeclRefExpr * CreateEmpty(const ASTContext &Context, bool HasQualifier, bool HasFoundDecl, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Construct an empty declaration reference expression.
void setLocation(SourceLocation L)
bool hasQualifier() const
Determine whether this declaration reference was preceded by a C++ nested-name-specifier,...
DeclStmt - Adaptor class for mixing declarations with statements and expressions.
void setStartLoc(SourceLocation L)
void setEndLoc(SourceLocation L)
void setDeclGroup(DeclGroupRef DGR)
Decl - This represents one declaration (or definition), e.g.
DeferStmt - This represents a deferred statement.
void setDeferLoc(SourceLocation DeferLoc)
static DeferStmt * CreateEmpty(ASTContext &Context, EmptyShell Empty)
Represents a 'co_await' expression while the type of the promise is dependent.
A qualified reference to a name whose declaration cannot yet be resolved.
static DependentScopeDeclRefExpr * CreateEmpty(const ASTContext &Context, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Represents a C99 designated initializer expression.
static DesignatedInitExpr * CreateEmpty(const ASTContext &C, unsigned NumIndexExprs)
void setSubExpr(unsigned Idx, Expr *E)
void setGNUSyntax(bool GNU)
void setEqualOrColonLoc(SourceLocation L)
void setDesignators(const ASTContext &C, const Designator *Desigs, unsigned NumDesigs)
unsigned getNumSubExprs() const
Retrieve the total number of subexpressions in this designated initializer expression,...
void setUpdater(Expr *Updater)
static Designator CreateArrayRangeDesignator(Expr *Start, Expr *End, SourceLocation LBracketLoc, SourceLocation EllipsisLoc)
Creates a GNU array-range designator.
static Designator CreateArrayDesignator(Expr *Index, SourceLocation LBracketLoc)
Creates an array designator.
static Designator CreateFieldDesignator(const IdentifierInfo *FieldName, SourceLocation DotLoc, SourceLocation FieldLoc)
Creates a field designator.
DoStmt - This represents a 'do/while' stmt.
void setWhileLoc(SourceLocation L)
void setDoLoc(SourceLocation L)
void setRParenLoc(SourceLocation L)
void setAccessorLoc(SourceLocation L)
void setAccessor(IdentifierInfo *II)
Represents a reference to emded data.
ExplicitCastExpr - An explicit cast written in the source code.
void setTypeInfoAsWritten(TypeSourceInfo *writtenTy)
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
unsigned getNumObjects() const
llvm::PointerUnion< BlockDecl *, CompoundLiteralExpr * > CleanupObject
The type of objects that are kept in the cleanup.
static ExprWithCleanups * Create(const ASTContext &C, EmptyShell empty, unsigned numObjects)
This represents one expression.
bool isValueDependent() const
Determines whether the value of this expression depends on.
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on.
void setValueKind(ExprValueKind Cat)
setValueKind - Set the value kind produced by this expression.
void setObjectKind(ExprObjectKind Cat)
setObjectKind - Set the object kind produced by this expression.
void setDependence(ExprDependence Deps)
Each concrete expr subclass is expected to compute its dependence and call this in the constructor.
An expression trait intrinsic.
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
static FPOptionsOverride getFromOpaqueInt(storage_type I)
static FixedPointLiteral * Create(const ASTContext &C, EmptyShell Empty)
Returns an empty fixed-point literal.
void setLocation(SourceLocation Location)
void setScale(unsigned S)
static FloatingLiteral * Create(const ASTContext &C, const llvm::APFloat &V, bool isexact, QualType Type, SourceLocation L)
const llvm::fltSemantics & getSemantics() const
Return the APFloat semantics this literal uses.
void setValue(const ASTContext &C, const llvm::APFloat &Val)
void setRawSemantics(llvm::APFloatBase::Semantics Sem)
Set the raw enumeration value representing the floating-point semantics of this literal (32-bit IEEE,...
void setLocation(SourceLocation L)
ForStmt - This represents a 'for (init;cond;inc)' stmt.
void setForLoc(SourceLocation L)
void setLParenLoc(SourceLocation L)
void setConditionVariableDeclStmt(DeclStmt *CondVar)
void setRParenLoc(SourceLocation L)
void setSubExpr(Expr *E)
As with any mutator of the AST, be very careful when modifying an existing AST to preserve its invari...
Represents a reference to a function parameter pack, init-capture pack, or binding pack that has been...
static FunctionParmPackExpr * CreateEmpty(const ASTContext &Context, unsigned NumParams)
This represents a GCC inline-assembly statement extension.
unsigned getNumLabels() const
void setAsmStringExpr(Expr *E)
void setRParenLoc(SourceLocation L)
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
void setTokenLocation(SourceLocation L)
Represents a C11 generic selection.
unsigned getNumAssocs() const
The number of association expressions.
static GenericSelectionExpr * CreateEmpty(const ASTContext &Context, unsigned NumAssocs)
Create an empty generic selection expression for deserialization.
GotoStmt - This represents a direct goto.
void setLabel(LabelDecl *D)
void setLabelLoc(SourceLocation L)
void setGotoLoc(SourceLocation L)
This class represents temporary values used to represent inout and out arguments in HLSL.
static HLSLOutArgExpr * CreateEmpty(const ASTContext &Ctx)
IfStmt - This represents an if/then/else.
void setConditionVariableDeclStmt(DeclStmt *CondVar)
void setLParenLoc(SourceLocation Loc)
void setElseLoc(SourceLocation ElseLoc)
static IfStmt * CreateEmpty(const ASTContext &Ctx, bool HasElse, bool HasVar, bool HasInit)
Create an empty IfStmt optionally with storage for an else statement, condition variable and init exp...
void setStatementKind(IfStatementKind Kind)
void setRParenLoc(SourceLocation Loc)
void setIfLoc(SourceLocation IfLoc)
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1....
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
static ImplicitCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize, bool HasFPFeatures)
void setIsPartOfExplicitCast(bool PartOfExplicitCast)
Represents an implicitly-generated value initialization of an object of a given type.
IndirectGotoStmt - This represents an indirect goto.
void setGotoLoc(SourceLocation L)
void setStarLoc(SourceLocation L)
Describes an C or C++ initializer list.
void setSyntacticForm(InitListExpr *Init)
Expr * updateInit(const ASTContext &C, unsigned Init, Expr *expr)
Updates the initializer at index Init with the new expression expr, and returns the old expression at...
void setLBraceLoc(SourceLocation Loc)
void setRBraceLoc(SourceLocation Loc)
void sawArrayRangeDesignator(bool ARD=true)
void reserveInits(const ASTContext &C, unsigned NumInits)
Reserve space for some number of initializers.
void setLocation(SourceLocation Location)
static IntegerLiteral * Create(const ASTContext &C, const llvm::APInt &V, QualType type, SourceLocation l)
Returns a new integer literal with value 'V' and type 'type'.
LabelStmt - Represents a label, which has a substatement.
void setSubStmt(Stmt *SS)
void setDecl(LabelDecl *D)
void setIdentLoc(SourceLocation L)
void setSideEntry(bool SE)
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
Expr ** capture_init_iterator
Iterator that walks over the capture initialization arguments.
static LambdaExpr * CreateDeserialized(const ASTContext &C, unsigned NumCaptures)
Construct a new lambda expression that will be deserialized from an external source.
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument for this lambda expression.
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
Base class for BreakStmt and ContinueStmt.
void setLabelDecl(LabelDecl *S)
void setLabelLoc(SourceLocation L)
void setKwLoc(SourceLocation L)
This represents a Microsoft inline-assembly statement extension.
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name.
A member reference to an MSPropertyDecl.
MS property subscript expression.
void setRBracketLoc(SourceLocation L)
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
MatrixSingleSubscriptExpr - Matrix single subscript expression for the MatrixType extension when you ...
void setRBracketLoc(SourceLocation L)
MatrixSubscriptExpr - Matrix subscript expression for the MatrixType extension.
void setColumnIdx(Expr *E)
void setRBracketLoc(SourceLocation L)
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
static MemberExpr * CreateEmpty(const ASTContext &Context, bool HasQualifier, bool HasFoundDecl, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Represents a place-holder for an object not to be initialized by anything.
NullStmt - This is the null statement ";": C99 6.8.3p3.
void setSemiLoc(SourceLocation L)
An explicit cast in C or a C-style cast in C++, which uses the syntax ([s1][s2]......
void setLParenLoc(SourceLocation L)
static OMPArrayShapingExpr * CreateEmpty(const ASTContext &Context, unsigned NumDims)
void setRParenLoc(SourceLocation L)
OpenMP 5.0 [2.1.6 Iterators] Iterators are identifiers that expand to multiple values in the clause o...
void setLParenLoc(SourceLocation L)
static OMPIteratorExpr * CreateEmpty(const ASTContext &Context, unsigned NumIterators)
void setRParenLoc(SourceLocation L)
void setIteratorKwLoc(SourceLocation L)
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp,...
static ObjCArrayLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements)
Expr ** getElements()
Retrieve elements of array of literals.
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c array literal.
Represents Objective-C's @catch statement.
void setCatchParamDecl(VarDecl *D)
void setCatchBody(Stmt *S)
void setRParenLoc(SourceLocation Loc)
void setAtCatchLoc(SourceLocation Loc)
Represents Objective-C's @finally statement.
void setFinallyBody(Stmt *S)
void setAtFinallyLoc(SourceLocation Loc)
Represents Objective-C's @synchronized statement.
void setSynchBody(Stmt *S)
void setAtSynchronizedLoc(SourceLocation Loc)
void setSynchExpr(Stmt *S)
Represents Objective-C's @throw statement.
void setThrowLoc(SourceLocation Loc)
void setThrowExpr(Stmt *S)
Represents Objective-C's @try ... @catch ... @finally statement.
void setAtTryLoc(SourceLocation Loc)
void setFinallyStmt(Stmt *S)
static ObjCAtTryStmt * CreateEmpty(const ASTContext &Context, unsigned NumCatchStmts, bool HasFinally)
unsigned getNumCatchStmts() const
Retrieve the number of @catch statements in this try-catch-finally block.
void setCatchStmt(unsigned I, ObjCAtCatchStmt *S)
Set a particular catch statement.
Represents Objective-C's @autoreleasepool Statement.
void setAtLoc(SourceLocation Loc)
A runtime availability query.
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
void setLocation(SourceLocation L)
ObjCBoxedExpr - used for generalized expression boxing.
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers,...
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
static ObjCDictionaryLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements, bool HasPackExpansions)
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c dictionary literal.
ObjCEncodeExpr, used for @encode in Objective-C.
void setEncodedTypeSourceInfo(TypeSourceInfo *EncType)
void setRParenLoc(SourceLocation L)
void setAtLoc(SourceLocation L)
Represents Objective-C's collection statement.
void setCollection(Expr *E)
void setForLoc(SourceLocation Loc)
void setRParenLoc(SourceLocation Loc)
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
void setIsaMemberLoc(SourceLocation L)
void setOpLoc(SourceLocation L)
ObjCIvarRefExpr - A reference to an ObjC instance variable.
void setDecl(ObjCIvarDecl *d)
void setIsFreeIvar(bool A)
void setOpLoc(SourceLocation L)
void setLocation(SourceLocation L)
An expression that sends a message to the given Objective-C object or class.
static ObjCMessageExpr * CreateEmpty(const ASTContext &Context, unsigned NumArgs, unsigned NumStoredSelLocs)
Create an empty Objective-C message expression, to be filled in by subsequent calls.
void setMethodDecl(ObjCMethodDecl *MD)
void setClassReceiver(TypeSourceInfo *TSInfo)
void setInstanceReceiver(Expr *rec)
Turn this message send into an instance message that computes the receiver object with the given expr...
void setSuper(SourceLocation Loc, QualType T, bool IsInstanceSuper)
ReceiverKind
The kind of receiver this message is sending to.
@ SuperInstance
The receiver is the instance of the superclass object.
@ Instance
The receiver is an object instance.
@ SuperClass
The receiver is a superclass.
@ Class
The receiver is a class.
void setDelegateInitCall(bool isDelegate)
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
unsigned getNumArgs() const
Return the number of actual arguments in this message, not counting the receiver.
void setSelector(Selector S)
void setArg(unsigned Arg, Expr *ArgExpr)
setArg - Set the specified argument.
Base class for Objective-C object literals ("...", @42, @[],}).
void setExpressibleAsConstantInitializer(bool ExpressibleAsConstantInitializer)
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
ObjCProtocolExpr used for protocol expression in Objective-C.
void setProtocol(ObjCProtocolDecl *P)
void setRParenLoc(SourceLocation L)
void setAtLoc(SourceLocation L)
ObjCSelectorExpr used for @selector in Objective-C.
void setSelector(Selector S)
void setAtLoc(SourceLocation L)
void setRParenLoc(SourceLocation L)
ObjCStringLiteral, used for Objective-C string literals i.e.
void setAtLoc(SourceLocation L)
void setString(StringLiteral *S)
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
void setRBracket(SourceLocation RB)
void setBaseExpr(Stmt *S)
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type,...
void setOperatorLoc(SourceLocation L)
static OffsetOfExpr * CreateEmpty(const ASTContext &C, unsigned NumComps, unsigned NumExprs)
void setIndexExpr(unsigned Idx, Expr *E)
void setTypeSourceInfo(TypeSourceInfo *tsi)
void setComponent(unsigned Idx, OffsetOfNode ON)
unsigned getNumExpressions() const
void setRParenLoc(SourceLocation R)
unsigned getNumComponents() const
Kind
The kind of offsetof node we have.
@ Array
An index into an array.
@ Identifier
A field in a dependent type, known only by its name.
@ Base
An implicit indirection through a C++ base class, when the field found is in a base class.
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class.
This is a base class for any OpenACC statement-level constructs that have an associated statement.
void setAssociatedStmt(Stmt *S)
This expression type represents an asterisk in an OpenACC Size-Expr, used in the 'tile' and 'gang' cl...
static OpenACCAsteriskSizeExpr * CreateEmpty(const ASTContext &C)
This is the base class for an OpenACC statement-level construct, other construct types are expected t...
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr.
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
unsigned getNumDecls() const
Gets the number of declarations in the unresolved set.
TemplateArgumentLoc * getTrailingTemplateArgumentLoc()
Return the optional template arguments.
DeclAccessPair * getTrailingResults()
Return the results. Defined after UnresolvedMemberExpr.
bool hasTemplateKWAndArgsInfo() const
unsigned getNumTemplateArgs() const
Represents a C++11 pack expansion that produces a sequence of expressions.
static PackIndexingExpr * CreateDeserialized(ASTContext &Context, unsigned NumTransformedExprs)
ParenExpr - This represents a parenthesized expression, e.g.
void setLParen(SourceLocation Loc)
void setIsProducedByFoldExpansion(bool ProducedByFoldExpansion=true)
void setRParen(SourceLocation Loc)
static ParenListExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumExprs)
Create an empty paren list.
unsigned getNumExprs() const
Return the number of expressions in this paren list.
[C99 6.4.2.2] - A predefined identifier such as func.
void setLocation(SourceLocation L)
static PredefinedExpr * CreateEmpty(const ASTContext &Ctx, bool HasFunctionName)
Create an empty PredefinedExpr.
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
static PseudoObjectExpr * Create(const ASTContext &Context, Expr *syntactic, ArrayRef< Expr * > semantic, unsigned resultIndex)
Frontend produces RecoveryExprs on semantic errors that prevent creating other well-formed expression...
static RecoveryExpr * CreateEmpty(ASTContext &Ctx, unsigned NumSubExprs)
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
static RequiresExpr * Create(ASTContext &C, SourceLocation RequiresKWLoc, RequiresExprBodyDecl *Body, SourceLocation LParenLoc, ArrayRef< ParmVarDecl * > LocalParameters, SourceLocation RParenLoc, ArrayRef< concepts::Requirement * > Requirements, SourceLocation RBraceLoc)
ReturnStmt - This represents a return, optionally of an expression: return; return 4;.
void setRetValue(Expr *E)
void setReturnLoc(SourceLocation L)
void setNRVOCandidate(const VarDecl *Var)
Set the variable that might be used for the named return value optimization.
static ReturnStmt * CreateEmpty(const ASTContext &Ctx, bool HasNRVOCandidate)
Create an empty return statement, optionally with storage for an NRVO candidate.
Represents a __leave statement.
void setLeaveLoc(SourceLocation L)
SYCLKernelCallStmt represents the transformation that is applied to the body of a function declared w...
void setOriginalStmt(CompoundStmt *CS)
void setKernelLaunchStmt(Stmt *S)
void setOutlinedFunctionDecl(OutlinedFunctionDecl *OFD)
static SYCLUniqueStableNameExpr * CreateEmpty(const ASTContext &Ctx)
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
void setExprs(const ASTContext &C, ArrayRef< Expr * > Exprs)
void setRParenLoc(SourceLocation L)
void setBuiltinLoc(SourceLocation L)
Represents an expression that computes the length of a parameter pack.
static SizeOfPackExpr * CreateDeserialized(ASTContext &Context, unsigned NumPartialArgs)
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof... expression, such as is produced f...
Represents a function call to one of __builtin_LINE(), __builtin_COLUMN(), __builtin_FUNCTION(),...
Encodes a location in the source.
A trivial tuple used to represent a source range.
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
void setRParenLoc(SourceLocation L)
void setLParenLoc(SourceLocation L)
void setSubStmt(CompoundStmt *S)
StmtVisitor - This class implements a simple visitor for Stmt subclasses.
Stmt - This represents one statement.
ExpressionTraitExprBitfields ExpressionTraitExprBits
GenericSelectionExprBitfields GenericSelectionExprBits
LambdaExprBitfields LambdaExprBits
AttributedStmtBitfields AttributedStmtBits
UnresolvedLookupExprBitfields UnresolvedLookupExprBits
SubstNonTypeTemplateParmExprBitfields SubstNonTypeTemplateParmExprBits
CXXNoexceptExprBitfields CXXNoexceptExprBits
CXXRewrittenBinaryOperatorBitfields CXXRewrittenBinaryOperatorBits
ExprWithCleanupsBitfields ExprWithCleanupsBits
StmtClass getStmtClass() const
CXXScalarValueInitExprBitfields CXXScalarValueInitExprBits
CXXConstructExprBitfields CXXConstructExprBits
CXXDependentScopeMemberExprBitfields CXXDependentScopeMemberExprBits
TypeTraitExprBitfields TypeTraitExprBits
CXXNewExprBitfields CXXNewExprBits
SourceLocExprBitfields SourceLocExprBits
ConstantExprBitfields ConstantExprBits
RequiresExprBitfields RequiresExprBits
CXXFoldExprBitfields CXXFoldExprBits
StmtExprBitfields StmtExprBits
StringLiteralBitfields StringLiteralBits
OpaqueValueExprBitfields OpaqueValueExprBits
CXXThrowExprBitfields CXXThrowExprBits
MemberExprBitfields MemberExprBits
PackIndexingExprBitfields PackIndexingExprBits
DeclRefExprBitfields DeclRefExprBits
CXXOperatorCallExprBitfields CXXOperatorCallExprBits
CXXDefaultInitExprBitfields CXXDefaultInitExprBits
NullStmtBitfields NullStmtBits
ArrayTypeTraitExprBitfields ArrayTypeTraitExprBits
PredefinedExprBitfields PredefinedExprBits
UnresolvedMemberExprBitfields UnresolvedMemberExprBits
PseudoObjectExprBitfields PseudoObjectExprBits
CXXDeleteExprBitfields CXXDeleteExprBits
CXXDefaultArgExprBitfields CXXDefaultArgExprBits
StringLiteral - This represents a string literal expression, e.g.
unsigned getLength() const
StringLiteralKind getKind() const
static StringLiteral * CreateEmpty(const ASTContext &Ctx, unsigned NumConcatenated, unsigned Length, unsigned CharByteWidth)
Construct an empty string literal.
unsigned getNumConcatenated() const
getNumConcatenated - Get the number of string literal tokens that were concatenated in translation ph...
unsigned getCharByteWidth() const
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
void setColonLoc(SourceLocation L)
void setKeywordLoc(SourceLocation L)
void setNextSwitchCase(SwitchCase *SC)
SwitchStmt - This represents a 'switch' stmt.
void setSwitchLoc(SourceLocation L)
void setConditionVariableDeclStmt(DeclStmt *CondVar)
void setRParenLoc(SourceLocation Loc)
void setLParenLoc(SourceLocation Loc)
static SwitchStmt * CreateEmpty(const ASTContext &Ctx, bool HasInit, bool HasVar)
Create an empty switch statement optionally with storage for an init expression and a condition varia...
void setAllEnumCasesCovered()
Set a flag in the SwitchStmt indicating that if the 'switch (X)' is a switch over an enum value then ...
void setSwitchCaseList(SwitchCase *SC)
A convenient class for passing around template argument information.
void setLAngleLoc(SourceLocation Loc)
void setRAngleLoc(SourceLocation Loc)
void addArgument(const TemplateArgumentLoc &Loc)
Location wrapper for a TemplateArgument.
pack_iterator pack_begin() const
Iterator referencing the first argument of a template argument pack.
unsigned pack_size() const
The number of template arguments in the given template argument pack.
@ Pack
The template argument is actually a parameter pack.
ArgKind getKind() const
Return the kind of stored template argument.
A container of type source information.
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
static TypeTraitExpr * CreateDeserialized(const ASTContext &C, bool IsStoredAsBool, unsigned NumArgs)
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand.
void setKind(UnaryExprOrTypeTrait K)
void setOperatorLoc(SourceLocation L)
void setRParenLoc(SourceLocation L)
void setArgument(Expr *E)
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
void setOperatorLoc(SourceLocation L)
void setCanOverflow(bool C)
bool hasStoredFPFeatures() const
Is FPFeatures in Trailing Storage?
void setOpcode(Opcode Opc)
void setStoredFPFeatures(FPOptionsOverride F)
Set FPFeatures in trailing storage, used by Serialization & ASTImporter.
static UnaryOperator * CreateEmpty(const ASTContext &C, bool hasFPFeatures)
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
static UnresolvedLookupExpr * CreateEmpty(const ASTContext &Context, unsigned NumResults, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Represents a C++ member access expression for which lookup produced a set of overloaded functions.
static UnresolvedMemberExpr * CreateEmpty(const ASTContext &Context, unsigned NumResults, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
static UnresolvedSYCLKernelCallStmt * CreateEmpty(const ASTContext &C)
void addDecl(NamedDecl *D)
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit....
static UserDefinedLiteral * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPOptions, EmptyShell Empty)
Represents a call to the builtin function __builtin_va_arg.
void setRParenLoc(SourceLocation L)
void setIsMicrosoftABI(bool IsMS)
void setBuiltinLoc(SourceLocation L)
void setWrittenTypeInfo(TypeSourceInfo *TI)
WhileStmt - This represents a 'while' stmt.
void setLParenLoc(SourceLocation L)
void setRParenLoc(SourceLocation L)
void setWhileLoc(SourceLocation L)
static WhileStmt * CreateEmpty(const ASTContext &Ctx, bool HasVar)
Create an empty while statement optionally with storage for a condition variable.
void setConditionVariableDeclStmt(DeclStmt *CondVar)
@ SS_ConstraintsNotSatisfied
@ SS_ExprSubstitutionFailure
Information about a module that has been loaded by the ASTReader.
llvm::BitstreamCursor DeclsCursor
DeclsCursor - This is a cursor to the start of the DECLTYPES_BLOCK block.
StmtCode
Record codes for each kind of statement or expression.
DesignatorTypes
The kinds of designators that can occur in a DesignatedInitExpr.
@ STMT_OMP_SECTION_DIRECTIVE
@ STMT_OPENACC_COMBINED_CONSTRUCT
@ EXPR_DESIGNATED_INIT
A DesignatedInitExpr record.
@ EXPR_COMPOUND_LITERAL
A CompoundLiteralExpr record.
@ STMT_OMP_ASSUME_DIRECTIVE
@ STMT_OPENACC_HOST_DATA_CONSTRUCT
@ STMT_OMP_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE
@ EXPR_OBJC_IVAR_REF_EXPR
An ObjCIvarRefExpr record.
@ STMT_OMP_SCOPE_DIRECTIVE
@ STMT_OMP_PARALLEL_FOR_SIMD_DIRECTIVE
@ EXPR_MEMBER
A MemberExpr record.
@ STMT_OMP_TARGET_TEAMS_DIRECTIVE
@ EXPR_CXX_TEMPORARY_OBJECT
A CXXTemporaryObjectExpr record.
@ EXPR_CXX_UNRESOLVED_LOOKUP
@ STMT_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE
@ EXPR_COMPOUND_ASSIGN_OPERATOR
A CompoundAssignOperator record.
@ EXPR_EXPR_WITH_CLEANUPS
@ EXPR_CXX_STATIC_CAST
A CXXStaticCastExpr record.
@ STMT_OMP_META_DIRECTIVE
@ EXPR_OBJC_STRING_LITERAL
An ObjCStringLiteral record.
@ EXPR_CXX_PROPERTY_REF_EXPR
@ EXPR_SYCL_UNIQUE_STABLE_NAME
@ STMT_OMP_TARGET_DATA_DIRECTIVE
@ STMT_OMP_BARRIER_DIRECTIVE
@ EXPR_VA_ARG
A VAArgExpr record.
@ STMT_OMP_TEAMS_DISTRIBUTE_SIMD_DIRECTIVE
@ STMT_OPENACC_SHUTDOWN_CONSTRUCT
@ EXPR_OBJC_ISA
An ObjCIsa Expr record.
@ STMT_OMP_SINGLE_DIRECTIVE
@ STMT_OPENACC_EXIT_DATA_CONSTRUCT
@ EXPR_CXX_OPERATOR_CALL
A CXXOperatorCallExpr record.
@ STMT_OBJC_AT_TRY
An ObjCAtTryStmt record.
@ STMT_OMP_TARGET_EXIT_DATA_DIRECTIVE
@ EXPR_CXX_UNRESOLVED_CONSTRUCT
@ EXPR_FIXEDPOINT_LITERAL
@ STMT_DO
A DoStmt record.
@ STMT_OBJC_CATCH
An ObjCAtCatchStmt record.
@ STMT_OMP_TARGET_DIRECTIVE
@ STMT_IF
An IfStmt record.
@ EXPR_CXX_EXPRESSION_TRAIT
@ EXPR_STRING_LITERAL
A StringLiteral record.
@ EXPR_OBJC_AVAILABILITY_CHECK
An ObjCAvailabilityCheckExpr record.
@ STMT_OMP_PARALLEL_MASKED_TASKLOOP_DIRECTIVE
@ EXPR_MATRIX_SUBSCRIPT
An MatrixSubscriptExpr record.
@ EXPR_PSEUDO_OBJECT
A PseudoObjectExpr record.
@ STMT_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_DIRECTIVE
@ EXPR_IMPLICIT_CAST
An ImplicitCastExpr record.
@ STMT_OMP_FLUSH_DIRECTIVE
@ STMT_CAPTURED
A CapturedStmt record.
@ STMT_OMP_TARGET_PARALLEL_FOR_SIMD_DIRECTIVE
@ STMT_OMP_MASTER_TASKLOOP_DIRECTIVE
@ STMT_OMP_TILE_DIRECTIVE
@ STMT_OMP_CANCELLATION_POINT_DIRECTIVE
@ STMT_GCCASM
A GCC-style AsmStmt record.
@ EXPR_IMAGINARY_LITERAL
An ImaginaryLiteral record.
@ STMT_OMP_INTERCHANGE_DIRECTIVE
@ STMT_WHILE
A WhileStmt record.
@ EXPR_CONVERT_VECTOR
A ConvertVectorExpr record.
@ EXPR_OBJC_SUBSCRIPT_REF_EXPR
An ObjCSubscriptRefExpr record.
@ STMT_OPENACC_COMPUTE_CONSTRUCT
@ STMT_OMP_TASKWAIT_DIRECTIVE
@ STMT_OMP_TASKYIELD_DIRECTIVE
@ EXPR_STMT
A StmtExpr record.
@ STMT_OMP_PARALLEL_GENERIC_LOOP_DIRECTIVE
@ EXPR_CXX_REINTERPRET_CAST
A CXXReinterpretCastExpr record.
@ EXPR_DESIGNATED_INIT_UPDATE
A DesignatedInitUpdateExpr record.
@ STMT_OBJC_AT_SYNCHRONIZED
An ObjCAtSynchronizedStmt record.
@ STMT_OMP_DISTRIBUTE_PARALLEL_FOR_DIRECTIVE
@ STMT_OMP_TASKLOOP_SIMD_DIRECTIVE
@ STMT_MS_DEPENDENT_EXISTS
@ EXPR_BUILTIN_BIT_CAST
A BuiltinBitCastExpr record.
@ EXPR_CXX_PROPERTY_SUBSCRIPT_EXPR
@ STMT_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD_DIRECTIVE
@ EXPR_CXX_PSEUDO_DESTRUCTOR
@ STMT_OMP_MASKED_DIRECTIVE
@ STMT_SYCLKERNELCALL
A SYCLKernelCallStmt record.
@ STMT_OMP_TARGET_ENTER_DATA_DIRECTIVE
@ EXPR_CHARACTER_LITERAL
A CharacterLiteral record.
@ EXPR_OBJC_ENCODE
An ObjCEncodeExpr record.
@ STMT_OMP_PARALLEL_SECTIONS_DIRECTIVE
@ STMT_OMP_PARALLEL_FOR_DIRECTIVE
@ EXPR_CSTYLE_CAST
A CStyleCastExpr record.
@ STMT_OMP_PARALLEL_DIRECTIVE
@ EXPR_OBJC_BOXED_EXPRESSION
@ EXPR_OBJC_BOOL_LITERAL
An ObjCBoolLiteralExpr record.
@ EXPR_CXX_BIND_TEMPORARY
@ STMT_OMP_ATOMIC_DIRECTIVE
@ STMT_OPENACC_ATOMIC_CONSTRUCT
@ STMT_OMP_ORDERED_DIRECTIVE
@ EXPR_EXT_VECTOR_ELEMENT
An ExtVectorElementExpr record.
@ STMT_OMP_TEAMS_GENERIC_LOOP_DIRECTIVE
@ STMT_OMP_CRITICAL_DIRECTIVE
@ EXPR_ATOMIC
An AtomicExpr record.
@ STMT_OPENACC_ENTER_DATA_CONSTRUCT
@ STMT_OMP_CANCEL_DIRECTIVE
@ EXPR_OFFSETOF
An OffsetOfExpr record.
@ STMT_RETURN
A ReturnStmt record.
@ STMT_OBJC_FOR_COLLECTION
An ObjCForCollectionStmt record.
@ STMT_OPENACC_CACHE_CONSTRUCT
@ STMT_OMP_TARGET_TEAMS_DISTRIBUTE_DIRECTIVE
@ EXPR_ARRAY_INIT_LOOP
An ArrayInitLoopExpr record.
@ STMT_OMP_PARALLEL_MASTER_TASKLOOP_DIRECTIVE
@ STMT_OMP_PARALLEL_MASKED_TASKLOOP_SIMD_DIRECTIVE
@ STMT_CONTINUE
A ContinueStmt record.
@ EXPR_PREDEFINED
A PredefinedExpr record.
@ EXPR_OPENACC_ASTERISK_SIZE
@ STMT_OMP_DEPOBJ_DIRECTIVE
@ EXPR_CXX_BOOL_LITERAL
A CXXBoolLiteralExpr record.
@ EXPR_PAREN_LIST
A ParenListExpr record.
@ EXPR_CXX_PAREN_LIST_INIT
A CXXParenListInitExpr record.
@ STMT_OMP_DISPATCH_DIRECTIVE
@ STMT_OMP_MASTER_TASKLOOP_SIMD_DIRECTIVE
@ STMT_OPENACC_DATA_CONSTRUCT
@ STMT_OMP_TASKLOOP_DIRECTIVE
@ STMT_COMPOUND
A CompoundStmt record.
@ STMT_OMP_CANONICAL_LOOP
@ STMT_FOR
A ForStmt record.
@ STMT_ATTRIBUTED
An AttributedStmt record.
@ STMT_OMP_PARALLEL_MASTER_DIRECTIVE
@ STMT_OPENACC_WAIT_CONSTRUCT
@ STMT_UNRESOLVED_SYCL_KERNEL_CALL
An UnresolvedSYCLKernelCallStmt record.
@ STMT_OMP_TARGET_TEAMS_GENERIC_LOOP_DIRECTIVE
@ STMT_OMP_TEAMS_DIRECTIVE
@ STMT_OMP_TARGET_PARALLEL_DIRECTIVE
@ EXPR_CXX_REWRITTEN_BINARY_OPERATOR
A CXXRewrittenBinaryOperator record.
@ STMT_GOTO
A GotoStmt record.
@ EXPR_NO_INIT
An NoInitExpr record.
@ EXPR_OBJC_ARRAY_LITERAL
@ STMT_OMP_ERROR_DIRECTIVE
@ EXPR_OBJC_PROTOCOL_EXPR
An ObjCProtocolExpr record.
@ STMT_OMP_GENERIC_LOOP_DIRECTIVE
@ EXPR_ARRAY_INIT_INDEX
An ArrayInitIndexExpr record.
@ STMT_OMP_TASK_DIRECTIVE
@ STMT_OPENACC_INIT_CONSTRUCT
@ EXPR_CXX_CONSTRUCT
A CXXConstructExpr record.
@ STMT_OMP_PARALLEL_MASKED_DIRECTIVE
@ STMT_OMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_DIRECTIVE
@ STMT_OPENACC_UPDATE_CONSTRUCT
@ STMT_OMP_PARALLEL_MASTER_TASKLOOP_SIMD_DIRECTIVE
@ EXPR_OBJC_DICTIONARY_LITERAL
@ STMT_OMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE
@ EXPR_CXX_DYNAMIC_CAST
A CXXDynamicCastExpr record.
@ STMT_CXX_TRY
A CXXTryStmt record.
@ EXPR_GENERIC_SELECTION
A GenericSelectionExpr record.
@ STMT_OMP_TARGET_SIMD_DIRECTIVE
@ EXPR_OBJC_INDIRECT_COPY_RESTORE
An ObjCIndirectCopyRestoreExpr record.
@ EXPR_CXX_INHERITED_CTOR_INIT
A CXXInheritedCtorInitExpr record.
@ EXPR_CALL
A CallExpr record.
@ EXPR_GNU_NULL
A GNUNullExpr record.
@ EXPR_BINARY_CONDITIONAL_OPERATOR
@ EXPR_OBJC_PROPERTY_REF_EXPR
An ObjCPropertyRefExpr record.
@ STMT_OMP_TARGET_PARALLEL_FOR_DIRECTIVE
@ STMT_OMP_FOR_SIMD_DIRECTIVE
@ STMT_OMP_MASKED_TASKLOOP_DIRECTIVE
@ EXPR_CXX_CONST_CAST
A CXXConstCastExpr record.
@ STMT_OMP_SCAN_DIRECTIVE
@ STMT_REF_PTR
A reference to a previously [de]serialized Stmt record.
@ EXPR_OBJC_MESSAGE_EXPR
An ObjCMessageExpr record.
@ EXPR_CXX_DEPENDENT_SCOPE_DECL_REF
@ STMT_OMP_FUSE_DIRECTIVE
@ STMT_OMP_TEAMS_DISTRIBUTE_DIRECTIVE
@ STMT_CASE
A CaseStmt record.
@ EXPR_CONSTANT
A constant expression context.
@ EXPR_FUNCTION_PARM_PACK
@ STMT_STOP
A marker record that indicates that we are at the end of an expression.
@ EXPR_CXX_NULL_PTR_LITERAL
@ STMT_OMP_TARGET_UPDATE_DIRECTIVE
@ STMT_MSASM
A MS-style AsmStmt record.
@ STMT_OMP_DISTRIBUTE_DIRECTIVE
@ EXPR_CONDITIONAL_OPERATOR
A ConditionOperator record.
@ EXPR_BINARY_OPERATOR
A BinaryOperator record.
@ EXPR_CXX_STD_INITIALIZER_LIST
A CXXStdInitializerListExpr record.
@ STMT_OMP_TASKGROUP_DIRECTIVE
@ STMT_OMP_REVERSE_DIRECTIVE
@ EXPR_SHUFFLE_VECTOR
A ShuffleVectorExpr record.
@ STMT_OBJC_FINALLY
An ObjCAtFinallyStmt record.
@ EXPR_OBJC_SELECTOR_EXPR
An ObjCSelectorExpr record.
@ EXPR_FLOATING_LITERAL
A FloatingLiteral record.
@ STMT_OMP_MASTER_DIRECTIVE
@ EXPR_CXX_DEPENDENT_SCOPE_MEMBER
@ STMT_NULL_PTR
A NULL expression.
@ STMP_OMP_STRIPE_DIRECTIVE
@ STMT_DEFAULT
A DefaultStmt record.
@ EXPR_CHOOSE
A ChooseExpr record.
@ STMT_OMP_UNROLL_DIRECTIVE
@ STMT_NULL
A NullStmt record.
@ STMT_OMP_SIMD_DIRECTIVE
@ EXPR_DECL_REF
A DeclRefExpr record.
@ STMT_OPENACC_LOOP_CONSTRUCT
@ EXPR_SUBST_NON_TYPE_TEMPLATE_PARM
@ EXPR_INIT_LIST
An InitListExpr record.
@ EXPR_IMPLICIT_VALUE_INIT
An ImplicitValueInitExpr record.
@ STMT_OBJC_AUTORELEASE_POOL
An ObjCAutoreleasePoolStmt record.
@ STMT_OPENACC_SET_CONSTRUCT
@ EXPR_RECOVERY
A RecoveryExpr record.
@ EXPR_PAREN
A ParenExpr record.
@ STMT_OMP_TARGET_PARALLEL_GENERIC_LOOP_DIRECTIVE
@ STMT_LABEL
A LabelStmt record.
@ EXPR_CXX_FUNCTIONAL_CAST
A CXXFunctionalCastExpr record.
@ EXPR_USER_DEFINED_LITERAL
A UserDefinedLiteral record.
@ EXPR_INTEGER_LITERAL
An IntegerLiteral record.
@ EXPR_SOURCE_LOC
A SourceLocExpr record.
@ EXPR_MATERIALIZE_TEMPORARY
@ EXPR_CXX_MEMBER_CALL
A CXXMemberCallExpr record.
@ STMT_OMP_INTEROP_DIRECTIVE
@ STMT_SWITCH
A SwitchStmt record.
@ STMT_DECL
A DeclStmt record.
@ EXPR_CXX_UNRESOLVED_MEMBER
@ EXPR_OBJC_KVC_REF_EXPR
UNUSED.
@ STMT_OMP_SECTIONS_DIRECTIVE
@ EXPR_SUBST_NON_TYPE_TEMPLATE_PARM_PACK
@ EXPR_CXX_SCALAR_VALUE_INIT
@ STMT_OMP_MASKED_TASKLOOP_SIMD_DIRECTIVE
@ STMT_OMP_DISTRIBUTE_SIMD_DIRECTIVE
@ EXPR_SIZEOF_ALIGN_OF
A SizefAlignOfExpr record.
@ STMT_BREAK
A BreakStmt record.
@ STMT_OBJC_AT_THROW
An ObjCAtThrowStmt record.
@ EXPR_ADDR_LABEL
An AddrLabelExpr record.
@ EXPR_MATRIX_ELEMENT
A MatrixElementExpr record.
@ STMT_CXX_FOR_RANGE
A CXXForRangeStmt record.
@ EXPR_CXX_ADDRSPACE_CAST
A CXXAddrspaceCastExpr record.
@ EXPR_ARRAY_SUBSCRIPT
An ArraySubscriptExpr record.
@ EXPR_CONCEPT_SPECIALIZATION
@ EXPR_UNARY_OPERATOR
A UnaryOperator record.
@ STMT_CXX_CATCH
A CXXCatchStmt record.
@ EXPR_BUILTIN_PP_EMBED
A EmbedExpr record.
@ STMT_INDIRECT_GOTO
An IndirectGotoStmt record.
@ DESIG_ARRAY_RANGE
GNU array range designator.
@ DESIG_FIELD_NAME
Field designator where only the field name is known.
@ DESIG_FIELD_DECL
Field designator where the field has been resolved to a declaration.
@ DESIG_ARRAY
Array designator.
The JSON file list parser is used to communicate input to InstallAPI.
ConstantResultStorageKind
Describes the kind of result that can be tail-allocated.
ArrayTypeTrait
Names for the array type traits.
ExprDependenceScope::ExprDependence ExprDependence
IfStatementKind
In an if statement, this denotes whether the statement is a constexpr or consteval if statement.
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
SmallVector< Attr *, 4 > AttrVec
AttrVec - A vector of Attr, which is how they are stored on the AST.
nullptr
This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...
CapturedRegionKind
The different kinds of captured statement.
OpenACCComputeConstruct(OpenACCDirectiveKind K, SourceLocation Start, SourceLocation DirectiveLoc, SourceLocation End, ArrayRef< const OpenACCClause * > Clauses, Stmt *StructuredBlock)
UnaryExprOrTypeTrait
Names for the "expression or type" traits.
std::pair< SourceLocation, StringRef > ConstraintSubstitutionDiagnostic
Unsatisfied constraint expressions if the template arguments could be substituted into them,...
CastKind
CastKind - The kind of operation required for a conversion.
llvm::omp::Directive OpenMPDirectiveKind
OpenMP directives.
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
U cast(CodeGen::Address addr)
@ Implicit
An implicit conversion.
static ASTConstraintSatisfaction * Create(const ASTContext &C, const ConstraintSatisfaction &Satisfaction)
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
void initializeFrom(SourceLocation TemplateKWLoc, const TemplateArgumentListInfo &List, TemplateArgumentLoc *OutArgArray)
Expr * CounterUpdate
Updater for the internal counter: ++CounterVD;.
Expr * Upper
Normalized upper bound.
Expr * Update
Update expression for the originally specified iteration variable, calculated as VD = Begin + Counter...
VarDecl * CounterVD
Internal normalized counter.
A placeholder type used to construct an empty shell of a type, that will be filled in later (e....