51#include "llvm/ADT/DenseMap.h"
52#include "llvm/ADT/SmallVector.h"
53#include "llvm/ADT/StringRef.h"
54#include "llvm/Bitstream/BitstreamReader.h"
55#include "llvm/Support/ErrorHandling.h"
69 llvm::BitstreamCursor &DeclsCursor;
71 std::optional<BitsUnpacker> CurrentUnpackingBits;
74 return Record.readSourceLocation();
78 return Record.readSourceRange();
81 std::string readString() {
82 return Record.readString();
86 return Record.readTypeSourceInfo();
90 return Record.readDecl();
95 return Record.readDeclAs<
T>();
100 : Record(Record), DeclsCursor(Cursor) {}
120 unsigned NumTemplateArgs);
123#define STMT(Type, Base) \
124 void Visit##Type(Type *);
125#include "clang/AST/StmtNodes.inc"
132 unsigned NumTemplateArgs) {
137 for (
unsigned i = 0; i != NumTemplateArgs; ++i)
138 ArgInfo.
addArgument(Record.readTemplateArgumentLoc());
143 assert(Record.getIdx() ==
NumStmtFields &&
"Incorrect statement field count");
146void ASTStmtReader::VisitNullStmt(
NullStmt *S) {
155 unsigned NumStmts =
Record.readInt();
156 unsigned HasFPFeatures =
Record.readInt();
159 Stmts.push_back(
Record.readSubStmt());
162 S->setStoredFPFeatures(
164 S->LBraceLoc = readSourceLocation();
165 S->RBraceLoc = readSourceLocation();
168void ASTStmtReader::VisitSwitchCase(
SwitchCase *S) {
170 Record.recordSwitchCaseID(S, Record.readInt());
175void ASTStmtReader::VisitCaseStmt(
CaseStmt *S) {
177 bool CaseStmtIsGNURange = Record.readInt();
178 S->
setLHS(Record.readSubExpr());
180 if (CaseStmtIsGNURange) {
181 S->
setRHS(Record.readSubExpr());
186void ASTStmtReader::VisitDefaultStmt(
DefaultStmt *S) {
191void ASTStmtReader::VisitLabelStmt(
LabelStmt *S) {
193 bool IsSideEntry = Record.readInt();
194 auto *LD = readDeclAs<LabelDecl>();
207 uint64_t NumAttrs = Record.readInt();
209 Record.readAttributes(Attrs);
212 assert(NumAttrs == Attrs.size());
213 std::copy(Attrs.begin(), Attrs.end(), S->getAttrArrayPtr());
214 S->SubStmt = Record.readSubStmt();
218void ASTStmtReader::VisitIfStmt(
IfStmt *S) {
221 CurrentUnpackingBits.emplace(Record.readInt());
223 bool HasElse = CurrentUnpackingBits->getNextBit();
224 bool HasVar = CurrentUnpackingBits->getNextBit();
225 bool HasInit = CurrentUnpackingBits->getNextBit();
228 S->
setCond(Record.readSubExpr());
229 S->
setThen(Record.readSubStmt());
231 S->
setElse(Record.readSubStmt());
235 S->
setInit(Record.readSubStmt());
244void ASTStmtReader::VisitSwitchStmt(
SwitchStmt *S) {
247 bool HasInit = Record.readInt();
248 bool HasVar = Record.readInt();
249 bool AllEnumCasesCovered = Record.readInt();
250 if (AllEnumCasesCovered)
253 S->
setCond(Record.readSubExpr());
254 S->
setBody(Record.readSubStmt());
256 S->
setInit(Record.readSubStmt());
264 SwitchCase *PrevSC =
nullptr;
265 for (
auto E = Record.size(); Record.getIdx() != E; ) {
266 SwitchCase *SC = Record.getSwitchCaseWithID(Record.readInt());
276void ASTStmtReader::VisitWhileStmt(
WhileStmt *S) {
279 bool HasVar = Record.readInt();
281 S->
setCond(Record.readSubExpr());
282 S->
setBody(Record.readSubStmt());
291void ASTStmtReader::VisitDoStmt(
DoStmt *S) {
293 S->
setCond(Record.readSubExpr());
294 S->
setBody(Record.readSubStmt());
300void ASTStmtReader::VisitForStmt(
ForStmt *S) {
302 S->
setInit(Record.readSubStmt());
303 S->
setCond(Record.readSubExpr());
305 S->
setInc(Record.readSubExpr());
306 S->
setBody(Record.readSubStmt());
312void ASTStmtReader::VisitGotoStmt(
GotoStmt *S) {
314 S->
setLabel(readDeclAs<LabelDecl>());
329 if (Record.readBool()) {
336 VisitLoopControlStmt(S);
339void ASTStmtReader::VisitBreakStmt(
BreakStmt *S) { VisitLoopControlStmt(S); }
341void ASTStmtReader::VisitDeferStmt(
DeferStmt *S) {
344 S->
setBody(Record.readSubStmt());
347void ASTStmtReader::VisitReturnStmt(
ReturnStmt *S) {
350 bool HasNRVOCandidate = Record.readInt();
353 if (HasNRVOCandidate)
359void ASTStmtReader::VisitDeclStmt(
DeclStmt *S) {
364 if (Record.size() - Record.getIdx() == 1) {
368 SmallVector<Decl *, 16> Decls;
369 int N = Record.size() - Record.getIdx();
371 for (
int I = 0; I < N; ++I)
372 Decls.push_back(readDecl());
379void ASTStmtReader::VisitAsmStmt(
AsmStmt *S) {
389void ASTStmtReader::VisitGCCAsmStmt(
GCCAsmStmt *S) {
391 S->NumLabels = Record.readInt();
401 SmallVector<IdentifierInfo *, 16> Names;
402 SmallVector<Expr *, 16> Constraints;
403 SmallVector<Stmt*, 16> Exprs;
404 for (
unsigned I = 0, N = NumOutputs + NumInputs; I != N; ++I) {
405 Names.push_back(Record.readIdentifier());
406 Constraints.push_back(cast_or_null<Expr>(Record.readSubStmt()));
407 Exprs.push_back(Record.readSubStmt());
411 SmallVector<Expr *, 16> Clobbers;
412 for (
unsigned I = 0; I != NumClobbers; ++I)
413 Clobbers.push_back(cast_or_null<Expr>(Record.readSubStmt()));
416 for (
unsigned I = 0, N = NumLabels; I != N; ++I) {
417 Names.push_back(Record.readIdentifier());
418 Exprs.push_back(Record.readSubStmt());
421 S->setOutputsAndInputsAndClobbers(Record.getContext(),
422 Names.data(), Constraints.data(),
423 Exprs.data(), NumOutputs, NumInputs,
425 Clobbers.data(), NumClobbers);
428void ASTStmtReader::VisitMSAsmStmt(
MSAsmStmt *S) {
430 S->LBraceLoc = readSourceLocation();
431 S->EndLoc = readSourceLocation();
432 S->NumAsmToks = Record.readInt();
433 std::string AsmStr = readString();
436 SmallVector<Token, 16> AsmToks;
437 AsmToks.reserve(S->NumAsmToks);
438 for (
unsigned i = 0, e = S->NumAsmToks; i != e; ++i) {
439 AsmToks.push_back(Record.readToken());
446 SmallVector<std::string, 16> ClobbersData;
447 SmallVector<StringRef, 16> Clobbers;
450 for (
unsigned i = 0, e = S->
NumClobbers; i != e; ++i) {
451 ClobbersData.push_back(readString());
452 Clobbers.push_back(ClobbersData.back());
457 SmallVector<Expr*, 16> Exprs;
458 SmallVector<std::string, 16> ConstraintsData;
459 SmallVector<StringRef, 16> Constraints;
460 Exprs.reserve(NumOperands);
461 ConstraintsData.reserve(NumOperands);
462 Constraints.reserve(NumOperands);
463 for (
unsigned i = 0; i != NumOperands; ++i) {
464 Exprs.push_back(
cast<Expr>(Record.readSubStmt()));
465 ConstraintsData.push_back(readString());
466 Constraints.push_back(ConstraintsData.back());
469 S->initialize(Record.getContext(), AsmStr, AsmToks,
470 Constraints, Exprs, Clobbers);
475 assert(Record.peekInt() == S->NumParams);
477 auto *StoredStmts = S->getStoredStmts();
479 i < CoroutineBodyStmt::SubStmt::FirstParamMove + S->NumParams; ++i)
480 StoredStmts[i] = Record.readSubStmt();
485 S->CoreturnLoc = Record.readSourceLocation();
486 for (
auto &SubStmt: S->SubStmts)
487 SubStmt = Record.readSubStmt();
488 S->IsImplicit = Record.readInt() != 0;
491void ASTStmtReader::VisitCoawaitExpr(
CoawaitExpr *E) {
493 E->KeywordLoc = readSourceLocation();
494 for (
auto &SubExpr: E->SubExprs)
495 SubExpr = Record.readSubStmt();
496 E->OpaqueValue = cast_or_null<OpaqueValueExpr>(Record.readSubStmt());
500void ASTStmtReader::VisitCoyieldExpr(
CoyieldExpr *E) {
502 E->KeywordLoc = readSourceLocation();
503 for (
auto &SubExpr: E->SubExprs)
504 SubExpr = Record.readSubStmt();
505 E->OpaqueValue = cast_or_null<OpaqueValueExpr>(Record.readSubStmt());
510 E->KeywordLoc = readSourceLocation();
511 for (
auto &SubExpr: E->SubExprs)
512 SubExpr = Record.readSubStmt();
526 *I = Record.readSubExpr();
529 S->setCapturedStmt(Record.readSubStmt());
534 I.VarAndKind.setPointer(readDeclAs<VarDecl>());
537 I.Loc = readSourceLocation();
545 E->CaretCaretLoc = readSourceLocation();
549 assert(
false &&
"null reflection can't be constructed from parsing a "
550 "reflection operand");
551 E->Operand =
nullptr;
554 E->Operand = Record.readTypeSourceInfo();
566void ASTStmtReader::VisitExpr(
Expr *E) {
568 CurrentUnpackingBits.emplace(Record.readInt());
570 CurrentUnpackingBits->getNextBits(5)));
572 CurrentUnpackingBits->getNextBits(2)));
574 CurrentUnpackingBits->getNextBits(3)));
578 "Incorrect expression field count");
593 switch (StorageKind) {
598 E->Int64Result() = Record.readInt();
602 E->APValueResult() = Record.readAPValue();
605 Record.getContext().addDestruction(&E->APValueResult());
615 E->setAsteriskLocation(readSourceLocation());
621 E->setLocation(readSourceLocation());
622 E->setLParenLocation(readSourceLocation());
623 E->setRParenLocation(readSourceLocation());
625 E->setTypeSourceInfo(Record.readTypeSourceInfo());
628void ASTStmtReader::VisitUnresolvedSYCLKernelCallStmt(
633 S->setKernelLaunchIdExpr(Record.readExpr());
638 bool HasFunctionName = Record.readInt();
647void ASTStmtReader::VisitDeclRefExpr(
DeclRefExpr *E) {
650 CurrentUnpackingBits.emplace(Record.readInt());
651 E->
DeclRefExprBits.HadMultipleCandidates = CurrentUnpackingBits->getNextBit();
653 CurrentUnpackingBits->getNextBit();
655 CurrentUnpackingBits->getNextBits(2);
656 E->
DeclRefExprBits.IsImmediateEscalating = CurrentUnpackingBits->getNextBit();
660 CurrentUnpackingBits->getNextBit();
661 E->
DeclRefExprBits.CapturedByCopyInLambdaWithExplicitObjectParameter =
false;
662 unsigned NumTemplateArgs = 0;
664 NumTemplateArgs = Record.readInt();
667 new (E->getTrailingObjects<NestedNameSpecifierLoc>())
668 NestedNameSpecifierLoc(Record.readNestedNameSpecifierLoc());
670 if (E->hasFoundDecl())
671 *E->getTrailingObjects<NamedDecl *>() = readDeclAs<NamedDecl>();
675 *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
676 E->getTrailingObjects<TemplateArgumentLoc>(), NumTemplateArgs);
678 E->D = readDeclAs<ValueDecl>();
686 E->
setValue(Record.getContext(), Record.readAPInt());
693 E->
setValue(Record.getContext(), Record.readAPInt());
699 static_cast<llvm::APFloatBase::Semantics
>(Record.readInt()));
715 unsigned NumConcatenated = Record.readInt();
716 unsigned Length = Record.readInt();
717 unsigned CharByteWidth = Record.readInt();
719 "Wrong number of concatenated tokens!");
720 assert((Length == E->
getLength()) &&
"Wrong Length!");
721 assert((CharByteWidth == E->
getCharByteWidth()) &&
"Wrong character width!");
728 assert((CharByteWidth ==
729 StringLiteral::mapCharByteWidth(Record.getContext().getTargetInfo(),
731 "Wrong character width!");
734 for (
unsigned I = 0; I < NumConcatenated; ++I)
735 E->setStrTokenLoc(I, readSourceLocation());
738 char *StrData = E->getStrDataAsChar();
739 for (
unsigned I = 0; I < Length * CharByteWidth; ++I)
740 StrData[I] = Record.readInt();
750void ASTStmtReader::VisitParenExpr(
ParenExpr *E) {
760 unsigned NumExprs = Record.readInt();
761 assert((NumExprs == E->
getNumExprs()) &&
"Wrong NumExprs!");
762 for (
unsigned I = 0; I != NumExprs; ++I)
763 E->getTrailingObjects()[I] = Record.readSubStmt();
764 E->LParenLoc = readSourceLocation();
765 E->RParenLoc = readSourceLocation();
770 bool hasFP_Features = CurrentUnpackingBits->getNextBit();
793 SourceLocation Start = readSourceLocation();
794 SourceLocation End = readSourceLocation();
797 E->
setComponent(I, OffsetOfNode(Start, Record.readInt(), End));
802 I, OffsetOfNode(Start, readDeclAs<FieldDecl>(), End));
808 OffsetOfNode(Start, Record.readIdentifier(), End));
812 auto *
Base =
new (Record.getContext()) CXXBaseSpecifier();
813 *
Base = Record.readCXXBaseSpecifier();
826 E->
setKind(
static_cast<UnaryExprOrTypeTrait
>(Record.readInt()));
827 if (Record.peekInt() == 0) {
844 unsigned NumDetailRecords =
Record.readInt();
845 for (
unsigned i = 0; i != NumDetailRecords; ++i) {
846 auto Kind =
Record.readInt();
849 StringRef DiagMessage =
C.backupStr(
Record.readString());
851 Satisfaction.
Details.emplace_back(
new (
853 }
else if (Kind == 1) {
857 Satisfaction.
Details.emplace_back(
Record.readConceptReference());
864void ASTStmtReader::VisitConceptSpecializationExpr(
867 E->SpecDecl = Record.readDeclAs<ImplicitConceptSpecializationDecl>();
868 if (Record.readBool())
869 E->ConceptRef = Record.readConceptReference();
878 StringRef SubstitutedEntity =
C.backupStr(
Record.readString());
880 StringRef DiagMessage =
C.backupStr(
Record.readString());
882 return new (
Record.getContext())
889 unsigned NumLocalParameters = Record.readInt();
890 unsigned NumRequirements = Record.readInt();
893 E->Body = Record.readDeclAs<RequiresExprBodyDecl>();
894 llvm::SmallVector<ParmVarDecl *, 4> LocalParameters;
895 for (
unsigned i = 0; i < NumLocalParameters; ++i)
897 std::copy(LocalParameters.begin(), LocalParameters.end(),
898 E->getTrailingObjects<ParmVarDecl *>());
899 llvm::SmallVector<concepts::Requirement *, 4> Requirements;
900 for (
unsigned i = 0; i < NumRequirements; ++i) {
903 concepts::Requirement *
R =
nullptr;
910 R =
new (Record.getContext())
913 R =
new (Record.getContext())
914 concepts::TypeRequirement(Record.readTypeSourceInfo());
921 llvm::PointerUnion<concepts::Requirement::SubstitutionDiagnostic *,
926 E = Record.readExpr();
928 std::optional<concepts::ExprRequirement::ReturnTypeRequirement> Req;
929 ConceptSpecializationExpr *SubstitutedConstraintExpr =
nullptr;
930 SourceLocation NoexceptLoc;
934 NoexceptLoc = Record.readSourceLocation();
935 switch (Record.readInt()) {
942 TemplateParameterList *TPL = Record.readTemplateParameterList();
945 SubstitutedConstraintExpr =
955 if (Expr *Ex = dyn_cast<Expr *>(E))
956 R =
new (Record.getContext()) concepts::ExprRequirement(
958 std::move(*Req), Status, SubstitutedConstraintExpr);
960 R =
new (Record.getContext()) concepts::ExprRequirement(
966 ASTContext &
C = Record.getContext();
967 bool HasInvalidConstraint = Record.readInt();
968 if (HasInvalidConstraint) {
969 StringRef InvalidConstraint =
C.backupStr(Record.readString());
970 R =
new (
C) concepts::NestedRequirement(
971 Record.getContext(), InvalidConstraint,
975 Expr *E = Record.readExpr();
977 R =
new (
C) concepts::NestedRequirement(E);
979 R =
new (
C) concepts::NestedRequirement(
985 Requirements.push_back(R);
987 std::copy(Requirements.begin(), Requirements.end(),
988 E->getTrailingObjects<concepts::Requirement *>());
989 E->LParenLoc = Record.readSourceLocation();
990 E->RParenLoc = Record.readSourceLocation();
991 E->RBraceLoc = Record.readSourceLocation();
996 E->
setLHS(Record.readSubExpr());
997 E->
setRHS(Record.readSubExpr());
1001void ASTStmtReader::VisitMatrixSingleSubscriptExpr(
1004 E->
setBase(Record.readSubExpr());
1011 E->
setBase(Record.readSubExpr());
1021 E->setBase(Record.readSubExpr());
1022 E->setLowerBound(Record.readSubExpr());
1023 E->setLength(Record.readSubExpr());
1026 E->setStride(Record.readSubExpr());
1028 E->setColonLocFirst(readSourceLocation());
1031 E->setColonLocSecond(readSourceLocation());
1033 E->setRBracketLoc(readSourceLocation());
1038 unsigned NumDims = Record.readInt();
1039 E->setBase(Record.readSubExpr());
1040 SmallVector<Expr *, 4> Dims(NumDims);
1041 for (
unsigned I = 0; I < NumDims; ++I)
1042 Dims[I] = Record.readSubExpr();
1043 E->setDimensions(Dims);
1044 SmallVector<SourceRange, 4> SRs(NumDims);
1045 for (
unsigned I = 0; I < NumDims; ++I)
1046 SRs[I] = readSourceRange();
1047 E->setBracketsRanges(SRs);
1054 unsigned NumIters = Record.readInt();
1058 for (
unsigned I = 0; I < NumIters; ++I) {
1059 E->setIteratorDeclaration(I, Record.readDeclRef());
1060 E->setAssignmentLoc(I, readSourceLocation());
1061 Expr *Begin = Record.readSubExpr();
1062 Expr *End = Record.readSubExpr();
1063 Expr *Step = Record.readSubExpr();
1064 SourceLocation ColonLoc = readSourceLocation();
1065 SourceLocation SecColonLoc;
1067 SecColonLoc = readSourceLocation();
1068 E->setIteratorRange(I, Begin, ColonLoc, End, SecColonLoc, Step);
1070 OMPIteratorHelperData HD;
1071 HD.
CounterVD = cast_or_null<VarDecl>(Record.readDeclRef());
1072 HD.
Upper = Record.readSubExpr();
1073 HD.
Update = Record.readSubExpr();
1075 E->setHelper(I, HD);
1079void ASTStmtReader::VisitCallExpr(
CallExpr *E) {
1082 unsigned NumArgs = Record.readInt();
1083 CurrentUnpackingBits.emplace(Record.readInt());
1086 bool HasFPFeatures = CurrentUnpackingBits->getNextBit();
1089 assert((NumArgs == E->
getNumArgs()) &&
"Wrong NumArgs!");
1092 for (
unsigned I = 0; I != NumArgs; ++I)
1093 E->
setArg(I, Record.readSubExpr());
1100 E->updateTrailingSourceLoc();
1107void ASTStmtReader::VisitMemberExpr(
MemberExpr *E) {
1110 CurrentUnpackingBits.emplace(Record.readInt());
1111 bool HasQualifier = CurrentUnpackingBits->getNextBit();
1112 bool HasFoundDecl = CurrentUnpackingBits->getNextBit();
1113 bool HasTemplateInfo = CurrentUnpackingBits->getNextBit();
1114 unsigned NumTemplateArgs = Record.readInt();
1116 E->Base = Record.readSubExpr();
1117 E->MemberDecl = Record.readDeclAs<ValueDecl>();
1118 E->MemberDNLoc = Record.readDeclarationNameLoc(E->MemberDecl->
getDeclName());
1119 E->MemberLoc = Record.readSourceLocation();
1124 E->
MemberExprBits.HadMultipleCandidates = CurrentUnpackingBits->getNextBit();
1126 CurrentUnpackingBits->getNextBits(2);
1130 new (E->getTrailingObjects<NestedNameSpecifierLoc>())
1131 NestedNameSpecifierLoc(Record.readNestedNameSpecifierLoc());
1134 auto *FoundD = Record.readDeclAs<NamedDecl>();
1139 if (HasTemplateInfo)
1141 *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
1142 E->getTrailingObjects<TemplateArgumentLoc>(), NumTemplateArgs);
1145void ASTStmtReader::VisitObjCIsaExpr(
ObjCIsaExpr *E) {
1147 E->
setBase(Record.readSubExpr());
1156 E->Operand = Record.readSubExpr();
1157 E->setShouldCopy(Record.readInt());
1161 VisitExplicitCastExpr(E);
1162 E->LParenLoc = readSourceLocation();
1163 E->BridgeKeywordLoc = readSourceLocation();
1164 E->Kind = Record.readInt();
1167void ASTStmtReader::VisitCastExpr(
CastExpr *E) {
1169 unsigned NumBaseSpecs = Record.readInt();
1172 CurrentUnpackingBits.emplace(Record.readInt());
1174 unsigned HasFPFeatures = CurrentUnpackingBits->getNextBit();
1180 while (NumBaseSpecs--) {
1181 auto *BaseSpec =
new (Record.getContext()) CXXBaseSpecifier;
1182 *BaseSpec = Record.readCXXBaseSpecifier();
1183 *BaseI++ = BaseSpec;
1192 CurrentUnpackingBits.emplace(Record.readInt());
1195 bool hasFP_Features = CurrentUnpackingBits->getNextBit();
1198 E->
setLHS(Record.readSubExpr());
1199 E->
setRHS(Record.readSubExpr());
1207 VisitBinaryOperator(E);
1214 E->SubExprs[ConditionalOperator::COND] = Record.readSubExpr();
1215 E->SubExprs[ConditionalOperator::LHS] = Record.readSubExpr();
1216 E->SubExprs[ConditionalOperator::RHS] = Record.readSubExpr();
1217 E->QuestionLoc = readSourceLocation();
1218 E->ColonLoc = readSourceLocation();
1225 E->SubExprs[BinaryConditionalOperator::COMMON] = Record.readSubExpr();
1226 E->SubExprs[BinaryConditionalOperator::COND] = Record.readSubExpr();
1227 E->SubExprs[BinaryConditionalOperator::LHS] = Record.readSubExpr();
1228 E->SubExprs[BinaryConditionalOperator::RHS] = Record.readSubExpr();
1229 E->QuestionLoc = readSourceLocation();
1230 E->ColonLoc = readSourceLocation();
1244 VisitExplicitCastExpr(E);
1259 E->
setBase(Record.readSubExpr());
1266 E->
setBase(Record.readSubExpr());
1271void ASTStmtReader::VisitInitListExpr(
InitListExpr *E) {
1273 if (
auto *SyntForm = cast_or_null<InitListExpr>(Record.readSubStmt()))
1277 bool isArrayFiller = Record.readInt();
1278 Expr *filler =
nullptr;
1279 if (isArrayFiller) {
1280 filler = Record.readSubExpr();
1281 E->ArrayFillerOrUnionFieldInit = filler;
1283 E->ArrayFillerOrUnionFieldInit = readDeclAs<FieldDecl>();
1285 unsigned NumInits = Record.readInt();
1287 if (isArrayFiller) {
1288 for (
unsigned I = 0; I != NumInits; ++I) {
1289 Expr *init = Record.readSubExpr();
1290 E->
updateInit(Record.getContext(), I, init ? init : filler);
1293 for (
unsigned I = 0; I != NumInits; ++I)
1294 E->
updateInit(Record.getContext(), I, Record.readSubExpr());
1300 using Designator = DesignatedInitExpr::Designator;
1303 unsigned NumSubExprs = Record.readInt();
1304 assert(NumSubExprs == E->
getNumSubExprs() &&
"Wrong number of subexprs");
1305 for (
unsigned I = 0; I != NumSubExprs; ++I)
1310 SmallVector<Designator, 4> Designators;
1311 while (Record.getIdx() < Record.size()) {
1314 auto *
Field = readDeclAs<FieldDecl>();
1315 SourceLocation DotLoc = readSourceLocation();
1316 SourceLocation FieldLoc = readSourceLocation();
1318 Field->getIdentifier(), DotLoc, FieldLoc));
1319 Designators.back().setFieldDecl(Field);
1324 const IdentifierInfo *Name = Record.readIdentifier();
1325 SourceLocation DotLoc = readSourceLocation();
1326 SourceLocation FieldLoc = readSourceLocation();
1333 unsigned Index = Record.readInt();
1334 SourceLocation LBracketLoc = readSourceLocation();
1335 SourceLocation RBracketLoc = readSourceLocation();
1343 unsigned Index = Record.readInt();
1344 SourceLocation LBracketLoc = readSourceLocation();
1345 SourceLocation EllipsisLoc = readSourceLocation();
1346 SourceLocation RBracketLoc = readSourceLocation();
1348 Index, LBracketLoc, EllipsisLoc, RBracketLoc));
1354 Designators.data(), Designators.size());
1359 E->
setBase(Record.readSubExpr());
1363void ASTStmtReader::VisitNoInitExpr(
NoInitExpr *E) {
1369 E->SubExprs[0] = Record.readSubExpr();
1370 E->SubExprs[1] = Record.readSubExpr();
1381void ASTStmtReader::VisitVAArgExpr(
VAArgExpr *E) {
1392 E->ParentContext = readDeclAs<DeclContext>();
1393 E->BuiltinLoc = readSourceLocation();
1394 E->RParenLoc = readSourceLocation();
1398void ASTStmtReader::VisitEmbedExpr(
EmbedExpr *E) {
1400 E->EmbedKeywordLoc = readSourceLocation();
1401 EmbedDataStorage *
Data =
new (Record.getContext()) EmbedDataStorage;
1404 E->Begin = Record.readUInt32();
1405 E->NumOfElements = Record.readUInt32();
1406 ASTContext &Ctx = Record.getContext();
1411 E->EmbedKeywordLoc);
1418 E->
setLabel(readDeclAs<LabelDecl>());
1421void ASTStmtReader::VisitStmtExpr(
StmtExpr *E) {
1425 E->
setSubStmt(cast_or_null<CompoundStmt>(Record.readSubStmt()));
1429void ASTStmtReader::VisitChooseExpr(
ChooseExpr *E) {
1431 E->
setCond(Record.readSubExpr());
1432 E->
setLHS(Record.readSubExpr());
1433 E->
setRHS(Record.readSubExpr());
1439void ASTStmtReader::VisitGNUNullExpr(
GNUNullExpr *E) {
1446 SmallVector<Expr *, 16> Exprs;
1447 unsigned NumExprs = Record.readInt();
1449 Exprs.push_back(Record.readSubExpr());
1450 E->
setExprs(Record.getContext(), Exprs);
1457 bool HasFPFeatures = CurrentUnpackingBits->getNextBit();
1459 E->BuiltinLoc = readSourceLocation();
1460 E->RParenLoc = readSourceLocation();
1461 E->TInfo = readTypeSourceInfo();
1462 E->SrcExpr = Record.readSubExpr();
1468void ASTStmtReader::VisitBlockExpr(
BlockExpr *E) {
1476 unsigned NumAssocs = Record.readInt();
1477 assert(NumAssocs == E->
getNumAssocs() &&
"Wrong NumAssocs!");
1478 E->IsExprPredicate = Record.readInt();
1479 E->ResultIndex = Record.readInt();
1481 E->DefaultLoc = readSourceLocation();
1482 E->RParenLoc = readSourceLocation();
1487 Stmt **Stmts = E->getTrailingObjects<Stmt *>();
1488 for (
unsigned I = 0, N = NumAssocs + (E->IsExprPredicate ? 1 : 0); I < N; ++I)
1489 Stmts[I] = Record.readSubExpr();
1491 TypeSourceInfo **TSIs = E->getTrailingObjects<TypeSourceInfo *>();
1492 for (
unsigned I = 0, N = NumAssocs + (!E->IsExprPredicate ? 1 : 0); I < N;
1494 TSIs[I] = readTypeSourceInfo();
1499 unsigned numSemanticExprs = Record.readInt();
1504 E->getTrailingObjects()[0] = Record.readSubExpr();
1507 for (
unsigned i = 0; i != numSemanticExprs; ++i) {
1508 Expr *subExpr = Record.readSubExpr();
1509 E->getTrailingObjects()[i + 1] = subExpr;
1513void ASTStmtReader::VisitAtomicExpr(
AtomicExpr *E) {
1517 for (
unsigned I = 0; I != E->NumSubExprs; ++I)
1518 E->SubExprs[I] = Record.readSubExpr();
1519 E->BuiltinLoc = readSourceLocation();
1520 E->RParenLoc = readSourceLocation();
1532 VisitObjCObjectLiteral(E);
1538 VisitObjCObjectLiteral(E);
1540 E->SubExpr = Record.readSubStmt();
1541 E->BoxingMethod = readDeclAs<ObjCMethodDecl>();
1542 E->Range = readSourceRange();
1546 VisitObjCObjectLiteral(E);
1547 unsigned NumElements = Record.readInt();
1548 assert(NumElements == E->
getNumElements() &&
"Wrong number of elements");
1550 for (
unsigned I = 0, N = NumElements; I != N; ++I)
1551 Elements[I] = Record.readSubExpr();
1552 E->ArrayWithObjectsMethod = readDeclAs<ObjCMethodDecl>();
1553 E->Range = readSourceRange();
1557 VisitObjCObjectLiteral(E);
1558 unsigned NumElements = Record.readInt();
1559 assert(NumElements == E->
getNumElements() &&
"Wrong number of elements");
1560 bool HasPackExpansions = Record.readInt();
1561 assert(HasPackExpansions == E->HasPackExpansions &&
"Pack expansion mismatch");
1563 E->getTrailingObjects<ObjCDictionaryLiteral::KeyValuePair>();
1565 E->getTrailingObjects<ObjCDictionaryLiteral::ExpansionData>();
1566 for (
unsigned I = 0; I != NumElements; ++I) {
1567 KeyValues[I].Key = Record.readSubExpr();
1568 KeyValues[I].Value = Record.readSubExpr();
1569 if (HasPackExpansions) {
1570 Expansions[I].EllipsisLoc = readSourceLocation();
1571 Expansions[I].NumExpansionsPlusOne = Record.readInt();
1574 E->DictWithObjectsMethod = readDeclAs<ObjCMethodDecl>();
1575 E->Range = readSourceRange();
1597 E->ProtoLoc = readSourceLocation();
1603 E->
setDecl(readDeclAs<ObjCIvarDecl>());
1606 E->
setBase(Record.readSubExpr());
1613 unsigned MethodRefFlags = Record.readInt();
1614 bool Implicit = Record.readInt() != 0;
1616 auto *Getter = readDeclAs<ObjCMethodDecl>();
1617 auto *Setter = readDeclAs<ObjCMethodDecl>();
1618 E->setImplicitProperty(Getter, Setter, MethodRefFlags);
1620 E->setExplicitProperty(readDeclAs<ObjCPropertyDecl>(), MethodRefFlags);
1622 E->setLocation(readSourceLocation());
1623 E->setReceiverLocation(readSourceLocation());
1624 switch (Record.readInt()) {
1626 E->setBase(Record.readSubExpr());
1629 E->setSuperReceiver(Record.readType());
1632 E->setClassReceiver(readDeclAs<ObjCInterfaceDecl>());
1642 E->GetAtIndexMethodDecl = readDeclAs<ObjCMethodDecl>();
1643 E->SetAtIndexMethodDecl = readDeclAs<ObjCMethodDecl>();
1650 unsigned NumStoredSelLocs = Record.readInt();
1651 E->SelLocsKind = Record.readInt();
1653 E->IsImplicit = Record.readInt();
1666 QualType
T = Record.readType();
1667 SourceLocation SuperLoc = readSourceLocation();
1675 if (Record.readInt())
1680 E->LBracLoc = readSourceLocation();
1681 E->RBracLoc = readSourceLocation();
1683 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I)
1684 E->
setArg(I, Record.readSubExpr());
1686 SourceLocation *Locs = E->getStoredSelLocs();
1687 for (
unsigned I = 0; I != NumStoredSelLocs; ++I)
1688 Locs[I] = readSourceLocation();
1695 S->
setBody(Record.readSubStmt());
1724 bool HasFinally = Record.readInt();
1727 S->
setCatchStmt(I, cast_or_null<ObjCAtCatchStmt>(Record.readSubStmt()));
1755 SourceRange
R = Record.readSourceRange();
1756 E->AtLoc =
R.getBegin();
1757 E->RParen =
R.getEnd();
1758 E->VersionToCheck = Record.readVersionTuple();
1765void ASTStmtReader::VisitCXXCatchStmt(
CXXCatchStmt *S) {
1767 S->CatchLoc = readSourceLocation();
1768 S->ExceptionDecl = readDeclAs<VarDecl>();
1769 S->HandlerBlock = Record.readSubStmt();
1772void ASTStmtReader::VisitCXXTryStmt(
CXXTryStmt *S) {
1774 assert(Record.peekInt() == S->
getNumHandlers() &&
"NumStmtFields is wrong ?");
1776 S->TryLoc = readSourceLocation();
1777 S->getStmts()[0] = Record.readSubStmt();
1779 S->getStmts()[i + 1] = Record.readSubStmt();
1784 S->ForLoc = readSourceLocation();
1785 S->CoawaitLoc = readSourceLocation();
1786 S->ColonLoc = readSourceLocation();
1787 S->RParenLoc = readSourceLocation();
1788 S->
setInit(Record.readSubStmt());
1792 S->
setCond(Record.readSubExpr());
1793 S->
setInc(Record.readSubExpr());
1795 S->
setBody(Record.readSubStmt());
1801 S->LParenLoc = readSourceLocation();
1802 S->ColonLoc = readSourceLocation();
1803 S->RParenLoc = readSourceLocation();
1805 for (Stmt *&SubStmt : S->
children())
1806 SubStmt = Record.readSubStmt();
1809void ASTStmtReader::VisitCXXExpansionStmtInstantiation(
1827 S->KeywordLoc = readSourceLocation();
1828 S->IsIfExists = Record.readInt();
1829 S->QualifierLoc = Record.readNestedNameSpecifierLoc();
1830 S->NameInfo = Record.readDeclarationNameInfo();
1831 S->SubStmt = Record.readSubStmt();
1838 E->BeginLoc = Record.readSourceLocation();
1841void ASTStmtReader::VisitCXXRewrittenBinaryOperator(
1845 E->SemanticForm = Record.readSubExpr();
1851 unsigned NumArgs = Record.readInt();
1852 assert((NumArgs == E->
getNumArgs()) &&
"Wrong NumArgs!");
1862 E->Constructor = readDeclAs<CXXConstructorDecl>();
1863 E->ParenOrBraceRange = readSourceRange();
1865 for (
unsigned I = 0; I != NumArgs; ++I)
1866 E->
setArg(I, Record.readSubExpr());
1871 E->Constructor = readDeclAs<CXXConstructorDecl>();
1872 E->Loc = readSourceLocation();
1873 E->ConstructsVirtualBase = Record.readInt();
1874 E->InheritedFromVirtualBase = Record.readInt();
1878 VisitCXXConstructExpr(E);
1879 E->TSI = readTypeSourceInfo();
1882void ASTStmtReader::VisitLambdaExpr(
LambdaExpr *E) {
1884 unsigned NumCaptures = Record.readInt();
1887 E->IntroducerRange = readSourceRange();
1889 E->CaptureDefaultLoc = readSourceLocation();
1892 E->ClosingBrace = readSourceLocation();
1898 *
C = Record.readSubExpr();
1907 E->SubExpr = Record.readSubExpr();
1911 VisitExplicitCastExpr(E);
1912 SourceRange
R = readSourceRange();
1913 E->Loc =
R.getBegin();
1914 E->RParenLoc =
R.getEnd();
1915 if (CurrentUnpackingBits->getNextBit())
1916 E->AngleBrackets = readSourceRange();
1920 return VisitCXXNamedCastExpr(E);
1924 return VisitCXXNamedCastExpr(E);
1928 return VisitCXXNamedCastExpr(E);
1932 return VisitCXXNamedCastExpr(E);
1936 return VisitCXXNamedCastExpr(E);
1940 VisitExplicitCastExpr(E);
1946 VisitExplicitCastExpr(E);
1947 E->KWLoc = readSourceLocation();
1948 E->RParenLoc = readSourceLocation();
1953 E->UDSuffixLoc = readSourceLocation();
1971 E->Operand = readTypeSourceInfo();
1973 E->Operand = Record.readSubExpr();
1976void ASTStmtReader::VisitCXXThisExpr(
CXXThisExpr *E) {
1983void ASTStmtReader::VisitCXXThrowExpr(
CXXThrowExpr *E) {
1986 E->Operand = Record.readSubExpr();
1992 E->Param = readDeclAs<ParmVarDecl>();
1993 E->UsedContext = readDeclAs<DeclContext>();
1997 *E->getTrailingObjects() = Record.readSubExpr();
2003 E->Field = readDeclAs<FieldDecl>();
2004 E->UsedContext = readDeclAs<DeclContext>();
2007 *E->getTrailingObjects() = Record.readSubExpr();
2018 E->TypeInfo = readTypeSourceInfo();
2022void ASTStmtReader::VisitCXXNewExpr(
CXXNewExpr *E) {
2025 bool IsArray = Record.readInt();
2026 bool HasInit = Record.readInt();
2027 unsigned NumPlacementArgs = Record.readInt();
2028 bool IsParenTypeId = Record.readInt();
2037 assert((IsArray == E->
isArray()) &&
"Wrong IsArray!");
2040 "Wrong NumPlacementArgs!");
2041 assert((IsParenTypeId == E->
isParenTypeId()) &&
"Wrong IsParenTypeId!");
2044 (void)NumPlacementArgs;
2048 E->AllocatedTypeInfo = readTypeSourceInfo();
2050 E->getTrailingObjects<SourceRange>()[0] = readSourceRange();
2051 E->Range = readSourceRange();
2052 E->DirectInitRange = readSourceRange();
2058 *I = Record.readSubStmt();
2067 E->OperatorDelete = readDeclAs<FunctionDecl>();
2068 E->Argument = Record.readSubExpr();
2075 E->Base = Record.readSubExpr();
2076 E->IsArrow = Record.readInt();
2077 E->OperatorLoc = readSourceLocation();
2078 E->QualifierLoc = Record.readNestedNameSpecifierLoc();
2079 E->ScopeType = readTypeSourceInfo();
2080 E->ColonColonLoc = readSourceLocation();
2081 E->TildeLoc = readSourceLocation();
2083 IdentifierInfo *II = Record.readIdentifier();
2093 unsigned NumObjects = Record.readInt();
2095 for (
unsigned i = 0; i != NumObjects; ++i) {
2099 Obj = readDeclAs<BlockDecl>();
2103 llvm_unreachable(
"unexpected cleanup object type");
2104 E->getTrailingObjects()[i] = Obj;
2108 E->
SubExpr = Record.readSubExpr();
2113 unsigned NumTemplateArgs = Record.readInt();
2115 "Wrong NumTemplateArgs!");
2118 E->NameInfo = Record.readDeclarationNameInfo();
2119 E->Name = Record.readTemplateName();
2122void ASTStmtReader::VisitCXXDependentScopeMemberExpr(
2126 unsigned NumTemplateArgs = Record.readInt();
2127 CurrentUnpackingBits.emplace(Record.readInt());
2128 bool HasTemplateKWAndArgsInfo = CurrentUnpackingBits->getNextBit();
2129 bool HasFirstQualifierFoundInScope = CurrentUnpackingBits->getNextBit();
2131 assert((HasTemplateKWAndArgsInfo == E->hasTemplateKWAndArgsInfo()) &&
2132 "Wrong HasTemplateKWAndArgsInfo!");
2134 (HasFirstQualifierFoundInScope == E->hasFirstQualifierFoundInScope()) &&
2135 "Wrong HasFirstQualifierFoundInScope!");
2137 if (HasTemplateKWAndArgsInfo)
2139 *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
2140 E->getTrailingObjects<TemplateArgumentLoc>(), NumTemplateArgs);
2143 "Wrong NumTemplateArgs!");
2146 CurrentUnpackingBits->getNextBit();
2148 E->BaseType = Record.readType();
2149 E->QualifierLoc = Record.readNestedNameSpecifierLoc();
2151 if (CurrentUnpackingBits->getNextBit())
2152 E->Base = Record.readSubExpr();
2158 if (HasFirstQualifierFoundInScope)
2159 *E->getTrailingObjects<NamedDecl *>() = readDeclAs<NamedDecl>();
2161 E->MemberNameInfo = Record.readDeclarationNameInfo();
2168 if (CurrentUnpackingBits->getNextBit())
2170 *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
2171 E->getTrailingObjects<TemplateArgumentLoc>(),
2172 CurrentUnpackingBits->getNextBits(16));
2174 E->QualifierLoc = Record.readNestedNameSpecifierLoc();
2175 E->NameInfo = Record.readDeclarationNameInfo();
2181 assert(Record.peekInt() == E->
getNumArgs() &&
2182 "Read wrong record during creation ?");
2184 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I)
2185 E->
setArg(I, Record.readSubExpr());
2186 E->TypeAndInitForm.setPointer(readTypeSourceInfo());
2189 E->TypeAndInitForm.setInt(Record.readInt());
2192void ASTStmtReader::VisitOverloadExpr(
OverloadExpr *E) {
2195 unsigned NumResults = Record.readInt();
2196 CurrentUnpackingBits.emplace(Record.readInt());
2197 bool HasTemplateKWAndArgsInfo = CurrentUnpackingBits->getNextBit();
2198 assert((E->
getNumDecls() == NumResults) &&
"Wrong NumResults!");
2200 "Wrong HasTemplateKWAndArgsInfo!");
2202 unsigned NumTemplateArgs = 0;
2203 if (HasTemplateKWAndArgsInfo) {
2204 NumTemplateArgs = Record.readInt();
2210 UnresolvedSet<8> Decls;
2211 for (
unsigned I = 0; I != NumResults; ++I) {
2212 auto *D = readDeclAs<NamedDecl>();
2218 UnresolvedSetIterator Iter = Decls.
begin();
2219 for (
unsigned I = 0; I != NumResults; ++I) {
2220 Results[I] = (Iter + I).getPair();
2224 "Wrong NumTemplateArgs!");
2226 E->NameInfo = Record.readDeclarationNameInfo();
2227 E->QualifierLoc = Record.readNestedNameSpecifierLoc();
2231 VisitOverloadExpr(E);
2234 CurrentUnpackingBits->getNextBit();
2236 if (CurrentUnpackingBits->getNextBit())
2237 E->Base = Record.readSubExpr();
2241 E->OperatorLoc = readSourceLocation();
2243 E->BaseType = Record.readType();
2247 VisitOverloadExpr(E);
2249 E->NamingClass = readDeclAs<CXXRecordDecl>();
2262 *E->getTrailingObjects<
APValue>() = Record.readAPValue();
2264 SourceRange
Range = readSourceRange();
2265 E->Loc =
Range.getBegin();
2266 E->RParenLoc =
Range.getEnd();
2268 auto **Args = E->getTrailingObjects<TypeSourceInfo *>();
2269 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I)
2270 Args[I] = readTypeSourceInfo();
2276 E->Value = (
unsigned int)Record.readInt();
2277 SourceRange
Range = readSourceRange();
2278 E->Loc =
Range.getBegin();
2279 E->RParen =
Range.getEnd();
2280 E->QueriedType = readTypeSourceInfo();
2281 E->Dimension = Record.readSubExpr();
2288 SourceRange
Range = readSourceRange();
2289 E->QueriedExpression = Record.readSubExpr();
2290 E->Loc =
Range.getBegin();
2291 E->RParen =
Range.getEnd();
2297 E->Range = readSourceRange();
2298 E->Operand = Record.readSubExpr();
2303 E->EllipsisLoc = readSourceLocation();
2304 E->NumExpansions = Record.readInt();
2305 E->Pattern = Record.readSubExpr();
2310 unsigned NumPartialArgs = Record.readInt();
2311 E->OperatorLoc = readSourceLocation();
2312 E->PackLoc = readSourceLocation();
2313 E->RParenLoc = readSourceLocation();
2314 E->Pack = Record.readDeclAs<NamedDecl>();
2316 assert(E->Length == NumPartialArgs);
2317 for (
auto *I = E->getTrailingObjects(), *E = I + NumPartialArgs; I != E;
2319 new (I) TemplateArgument(Record.readTemplateArgument());
2321 E->Length = Record.readInt();
2329 E->EllipsisLoc = readSourceLocation();
2330 E->RSquareLoc = readSourceLocation();
2331 E->SubExprs[0] = Record.readStmt();
2332 E->SubExprs[1] = Record.readStmt();
2333 auto **Exprs = E->getTrailingObjects();
2335 Exprs[I] = Record.readExpr();
2338void ASTStmtReader::VisitSubstNonTypeTemplateParmExpr(
2341 E->AssociatedDeclAndFinal.setPointer(readDeclAs<Decl>());
2342 E->AssociatedDeclAndFinal.setInt(CurrentUnpackingBits->getNextBit());
2343 E->Index = CurrentUnpackingBits->getNextBits(12);
2344 E->PackIndex = Record.readUnsignedOrNone().toInternalRepresentation();
2345 E->ParamType = Record.readType();
2347 E->Replacement = Record.readSubExpr();
2350void ASTStmtReader::VisitSubstNonTypeTemplateParmPackExpr(
2353 E->AssociatedDecl = readDeclAs<Decl>();
2354 E->Final = CurrentUnpackingBits->getNextBit();
2355 E->Index = Record.readInt();
2356 TemplateArgument ArgPack = Record.readTemplateArgument();
2362 E->NameLoc = readSourceLocation();
2367 E->NumParameters = Record.readInt();
2368 E->ParamPack = readDeclAs<ValueDecl>();
2369 E->NameLoc = readSourceLocation();
2370 auto **Parms = E->getTrailingObjects();
2371 for (
unsigned i = 0, n = E->NumParameters; i != n; ++i)
2372 Parms[i] = readDeclAs<ValueDecl>();
2377 bool HasMaterialzedDecl = Record.readInt();
2378 if (HasMaterialzedDecl)
2381 E->State = Record.readSubExpr();
2384void ASTStmtReader::VisitCXXFoldExpr(
CXXFoldExpr *E) {
2386 E->LParenLoc = readSourceLocation();
2387 E->EllipsisLoc = readSourceLocation();
2388 E->RParenLoc = readSourceLocation();
2389 E->NumExpansions = Record.readUnsignedOrNone();
2390 E->SubExprs[0] = Record.readSubExpr();
2391 E->SubExprs[1] = Record.readSubExpr();
2392 E->SubExprs[2] = Record.readSubExpr();
2398 unsigned ExpectedNumExprs = Record.readInt();
2399 assert(E->NumExprs == ExpectedNumExprs &&
2400 "expected number of expressions does not equal the actual number of "
2401 "serialized expressions.");
2402 E->NumUserSpecifiedExprs = Record.readInt();
2403 E->InitLoc = readSourceLocation();
2404 E->LParenLoc = readSourceLocation();
2405 E->RParenLoc = readSourceLocation();
2406 for (
unsigned I = 0; I < ExpectedNumExprs; I++)
2407 E->getTrailingObjects()[I] = Record.readSubExpr();
2409 bool HasArrayFillerOrUnionDecl = Record.readBool();
2410 if (HasArrayFillerOrUnionDecl) {
2411 bool HasArrayFiller = Record.readBool();
2412 if (HasArrayFiller) {
2423 E->SourceExpr = Record.readSubExpr();
2428void ASTStmtReader::VisitRecoveryExpr(
RecoveryExpr *E) {
2430 unsigned NumArgs = Record.readInt();
2431 E->BeginLoc = readSourceLocation();
2432 E->EndLoc = readSourceLocation();
2433 assert((NumArgs + 0LL ==
2438 Child = Record.readSubStmt();
2446 E->IsArrow = (Record.readInt() != 0);
2447 E->BaseExpr = Record.readSubExpr();
2448 E->QualifierLoc = Record.readNestedNameSpecifierLoc();
2449 E->MemberLoc = readSourceLocation();
2450 E->TheDecl = readDeclAs<MSPropertyDecl>();
2455 E->setBase(Record.readSubExpr());
2456 E->setIdx(Record.readSubExpr());
2463 E->Guid = readDeclAs<MSGuidDecl>();
2465 E->Operand = readTypeSourceInfo();
2467 E->Operand = Record.readSubExpr();
2470void ASTStmtReader::VisitSEHLeaveStmt(
SEHLeaveStmt *S) {
2477 S->Loc = readSourceLocation();
2478 S->Children[SEHExceptStmt::FILTER_EXPR] = Record.readSubStmt();
2479 S->Children[SEHExceptStmt::BLOCK] = Record.readSubStmt();
2484 S->Loc = readSourceLocation();
2485 S->Block = Record.readSubStmt();
2488void ASTStmtReader::VisitSEHTryStmt(
SEHTryStmt *S) {
2490 S->IsCXXTry = Record.readInt();
2491 S->TryLoc = readSourceLocation();
2492 S->Children[SEHTryStmt::TRY] = Record.readSubStmt();
2493 S->Children[SEHTryStmt::HANDLER] = Record.readSubStmt();
2502 E->
setPreArg(CUDAKernelCallExpr::CONFIG, Record.readSubExpr());
2508void ASTStmtReader::VisitAsTypeExpr(
AsTypeExpr *E) {
2510 E->BuiltinLoc = readSourceLocation();
2511 E->RParenLoc = readSourceLocation();
2512 E->SrcExpr = Record.readSubExpr();
2519void ASTStmtReader::VisitOMPCanonicalLoop(OMPCanonicalLoop *S) {
2521 for (Stmt *&SubStmt : S->SubStmts)
2522 SubStmt = Record.readSubStmt();
2525void ASTStmtReader::VisitOMPExecutableDirective(OMPExecutableDirective *E) {
2526 Record.readOMPChildren(E->Data);
2527 E->setLocStart(readSourceLocation());
2528 E->setLocEnd(readSourceLocation());
2531void ASTStmtReader::VisitOMPLoopBasedDirective(OMPLoopBasedDirective *D) {
2535 VisitOMPExecutableDirective(D);
2538void ASTStmtReader::VisitOMPLoopDirective(OMPLoopDirective *D) {
2539 VisitOMPLoopBasedDirective(D);
2542void ASTStmtReader::VisitOMPMetaDirective(OMPMetaDirective *D) {
2546 VisitOMPExecutableDirective(D);
2549void ASTStmtReader::VisitOMPParallelDirective(OMPParallelDirective *D) {
2551 VisitOMPExecutableDirective(D);
2552 D->setHasCancel(Record.readBool());
2555void ASTStmtReader::VisitOMPSimdDirective(OMPSimdDirective *D) {
2556 VisitOMPLoopDirective(D);
2559void ASTStmtReader::VisitOMPCanonicalLoopNestTransformationDirective(
2560 OMPCanonicalLoopNestTransformationDirective *D) {
2561 VisitOMPLoopBasedDirective(D);
2565void ASTStmtReader::VisitOMPTileDirective(OMPTileDirective *D) {
2566 VisitOMPCanonicalLoopNestTransformationDirective(D);
2569void ASTStmtReader::VisitOMPStripeDirective(OMPStripeDirective *D) {
2570 VisitOMPCanonicalLoopNestTransformationDirective(D);
2573void ASTStmtReader::VisitOMPUnrollDirective(OMPUnrollDirective *D) {
2574 VisitOMPCanonicalLoopNestTransformationDirective(D);
2577void ASTStmtReader::VisitOMPReverseDirective(OMPReverseDirective *D) {
2578 VisitOMPCanonicalLoopNestTransformationDirective(D);
2581void ASTStmtReader::VisitOMPCanonicalLoopSequenceTransformationDirective(
2582 OMPCanonicalLoopSequenceTransformationDirective *D) {
2584 VisitOMPExecutableDirective(D);
2588void ASTStmtReader::VisitOMPInterchangeDirective(OMPInterchangeDirective *D) {
2589 VisitOMPCanonicalLoopNestTransformationDirective(D);
2592void ASTStmtReader::VisitOMPFlattenDirective(OMPFlattenDirective *D) {
2593 VisitOMPCanonicalLoopNestTransformationDirective(D);
2596void ASTStmtReader::VisitOMPSplitDirective(OMPSplitDirective *D) {
2597 VisitOMPCanonicalLoopNestTransformationDirective(D);
2600void ASTStmtReader::VisitOMPFuseDirective(OMPFuseDirective *D) {
2601 VisitOMPCanonicalLoopSequenceTransformationDirective(D);
2604void ASTStmtReader::VisitOMPForDirective(OMPForDirective *D) {
2605 VisitOMPLoopDirective(D);
2606 D->setHasCancel(Record.readBool());
2609void ASTStmtReader::VisitOMPForSimdDirective(OMPForSimdDirective *D) {
2610 VisitOMPLoopDirective(D);
2613void ASTStmtReader::VisitOMPSectionsDirective(OMPSectionsDirective *D) {
2615 VisitOMPExecutableDirective(D);
2616 D->setHasCancel(Record.readBool());
2619void ASTStmtReader::VisitOMPSectionDirective(OMPSectionDirective *D) {
2621 VisitOMPExecutableDirective(D);
2625void ASTStmtReader::VisitOMPScopeDirective(OMPScopeDirective *D) {
2627 VisitOMPExecutableDirective(D);
2630void ASTStmtReader::VisitOMPSingleDirective(OMPSingleDirective *D) {
2632 VisitOMPExecutableDirective(D);
2635void ASTStmtReader::VisitOMPMasterDirective(OMPMasterDirective *D) {
2637 VisitOMPExecutableDirective(D);
2640void ASTStmtReader::VisitOMPCriticalDirective(OMPCriticalDirective *D) {
2642 VisitOMPExecutableDirective(D);
2643 D->DirName = Record.readDeclarationNameInfo();
2646void ASTStmtReader::VisitOMPParallelForDirective(OMPParallelForDirective *D) {
2647 VisitOMPLoopDirective(D);
2648 D->setHasCancel(Record.readBool());
2651void ASTStmtReader::VisitOMPParallelForSimdDirective(
2652 OMPParallelForSimdDirective *D) {
2653 VisitOMPLoopDirective(D);
2656void ASTStmtReader::VisitOMPParallelMasterDirective(
2657 OMPParallelMasterDirective *D) {
2659 VisitOMPExecutableDirective(D);
2662void ASTStmtReader::VisitOMPParallelMaskedDirective(
2663 OMPParallelMaskedDirective *D) {
2665 VisitOMPExecutableDirective(D);
2668void ASTStmtReader::VisitOMPParallelSectionsDirective(
2669 OMPParallelSectionsDirective *D) {
2671 VisitOMPExecutableDirective(D);
2672 D->setHasCancel(Record.readBool());
2675void ASTStmtReader::VisitOMPTaskDirective(OMPTaskDirective *D) {
2677 VisitOMPExecutableDirective(D);
2678 D->setHasCancel(Record.readBool());
2681void ASTStmtReader::VisitOMPTaskyieldDirective(OMPTaskyieldDirective *D) {
2683 VisitOMPExecutableDirective(D);
2686void ASTStmtReader::VisitOMPBarrierDirective(OMPBarrierDirective *D) {
2688 VisitOMPExecutableDirective(D);
2691void ASTStmtReader::VisitOMPTaskwaitDirective(OMPTaskwaitDirective *D) {
2695 VisitOMPExecutableDirective(D);
2698void ASTStmtReader::VisitOMPAssumeDirective(OMPAssumeDirective *D) {
2700 VisitOMPExecutableDirective(D);
2703void ASTStmtReader::VisitOMPErrorDirective(OMPErrorDirective *D) {
2707 VisitOMPExecutableDirective(D);
2710void ASTStmtReader::VisitOMPTaskgroupDirective(OMPTaskgroupDirective *D) {
2712 VisitOMPExecutableDirective(D);
2715void ASTStmtReader::VisitOMPFlushDirective(OMPFlushDirective *D) {
2717 VisitOMPExecutableDirective(D);
2720void ASTStmtReader::VisitOMPDepobjDirective(OMPDepobjDirective *D) {
2722 VisitOMPExecutableDirective(D);
2725void ASTStmtReader::VisitOMPScanDirective(OMPScanDirective *D) {
2727 VisitOMPExecutableDirective(D);
2730void ASTStmtReader::VisitOMPOrderedStandaloneDirective(
2731 OMPOrderedStandaloneDirective *D) {
2733 VisitOMPExecutableDirective(D);
2736void ASTStmtReader::VisitOMPOrderedBlockAssocDirective(
2737 OMPOrderedBlockAssocDirective *D) {
2739 VisitOMPExecutableDirective(D);
2742void ASTStmtReader::VisitOMPAtomicDirective(OMPAtomicDirective *D) {
2744 VisitOMPExecutableDirective(D);
2745 D->Flags.IsXLHSInRHSPart = Record.readBool() ? 1 : 0;
2746 D->Flags.IsPostfixUpdate = Record.readBool() ? 1 : 0;
2747 D->Flags.IsFailOnly = Record.readBool() ? 1 : 0;
2750void ASTStmtReader::VisitOMPTargetDirective(OMPTargetDirective *D) {
2752 VisitOMPExecutableDirective(D);
2755void ASTStmtReader::VisitOMPTargetDataDirective(OMPTargetDataDirective *D) {
2757 VisitOMPExecutableDirective(D);
2760void ASTStmtReader::VisitOMPTargetEnterDataDirective(
2761 OMPTargetEnterDataDirective *D) {
2763 VisitOMPExecutableDirective(D);
2766void ASTStmtReader::VisitOMPTargetExitDataDirective(
2767 OMPTargetExitDataDirective *D) {
2769 VisitOMPExecutableDirective(D);
2772void ASTStmtReader::VisitOMPTargetParallelDirective(
2773 OMPTargetParallelDirective *D) {
2775 VisitOMPExecutableDirective(D);
2776 D->setHasCancel(Record.readBool());
2779void ASTStmtReader::VisitOMPTargetParallelForDirective(
2780 OMPTargetParallelForDirective *D) {
2781 VisitOMPLoopDirective(D);
2782 D->setHasCancel(Record.readBool());
2785void ASTStmtReader::VisitOMPTeamsDirective(OMPTeamsDirective *D) {
2787 VisitOMPExecutableDirective(D);
2790void ASTStmtReader::VisitOMPCancellationPointDirective(
2791 OMPCancellationPointDirective *D) {
2793 VisitOMPExecutableDirective(D);
2797void ASTStmtReader::VisitOMPCancelDirective(OMPCancelDirective *D) {
2799 VisitOMPExecutableDirective(D);
2803void ASTStmtReader::VisitOMPTaskLoopDirective(OMPTaskLoopDirective *D) {
2804 VisitOMPLoopDirective(D);
2805 D->setHasCancel(Record.readBool());
2808void ASTStmtReader::VisitOMPTaskLoopSimdDirective(OMPTaskLoopSimdDirective *D) {
2809 VisitOMPLoopDirective(D);
2812void ASTStmtReader::VisitOMPMasterTaskLoopDirective(
2813 OMPMasterTaskLoopDirective *D) {
2814 VisitOMPLoopDirective(D);
2815 D->setHasCancel(Record.readBool());
2818void ASTStmtReader::VisitOMPMaskedTaskLoopDirective(
2819 OMPMaskedTaskLoopDirective *D) {
2820 VisitOMPLoopDirective(D);
2821 D->setHasCancel(Record.readBool());
2824void ASTStmtReader::VisitOMPMasterTaskLoopSimdDirective(
2825 OMPMasterTaskLoopSimdDirective *D) {
2826 VisitOMPLoopDirective(D);
2829void ASTStmtReader::VisitOMPMaskedTaskLoopSimdDirective(
2830 OMPMaskedTaskLoopSimdDirective *D) {
2831 VisitOMPLoopDirective(D);
2834void ASTStmtReader::VisitOMPParallelMasterTaskLoopDirective(
2835 OMPParallelMasterTaskLoopDirective *D) {
2836 VisitOMPLoopDirective(D);
2837 D->setHasCancel(Record.readBool());
2840void ASTStmtReader::VisitOMPParallelMaskedTaskLoopDirective(
2841 OMPParallelMaskedTaskLoopDirective *D) {
2842 VisitOMPLoopDirective(D);
2843 D->setHasCancel(Record.readBool());
2846void ASTStmtReader::VisitOMPParallelMasterTaskLoopSimdDirective(
2847 OMPParallelMasterTaskLoopSimdDirective *D) {
2848 VisitOMPLoopDirective(D);
2851void ASTStmtReader::VisitOMPParallelMaskedTaskLoopSimdDirective(
2852 OMPParallelMaskedTaskLoopSimdDirective *D) {
2853 VisitOMPLoopDirective(D);
2856void ASTStmtReader::VisitOMPDistributeDirective(OMPDistributeDirective *D) {
2857 VisitOMPLoopDirective(D);
2860void ASTStmtReader::VisitOMPTargetUpdateDirective(OMPTargetUpdateDirective *D) {
2862 VisitOMPExecutableDirective(D);
2865void ASTStmtReader::VisitOMPDistributeParallelForDirective(
2866 OMPDistributeParallelForDirective *D) {
2867 VisitOMPLoopDirective(D);
2868 D->setHasCancel(Record.readBool());
2871void ASTStmtReader::VisitOMPDistributeParallelForSimdDirective(
2872 OMPDistributeParallelForSimdDirective *D) {
2873 VisitOMPLoopDirective(D);
2876void ASTStmtReader::VisitOMPDistributeSimdDirective(
2877 OMPDistributeSimdDirective *D) {
2878 VisitOMPLoopDirective(D);
2881void ASTStmtReader::VisitOMPTargetParallelForSimdDirective(
2882 OMPTargetParallelForSimdDirective *D) {
2883 VisitOMPLoopDirective(D);
2886void ASTStmtReader::VisitOMPTargetSimdDirective(OMPTargetSimdDirective *D) {
2887 VisitOMPLoopDirective(D);
2890void ASTStmtReader::VisitOMPTeamsDistributeDirective(
2891 OMPTeamsDistributeDirective *D) {
2892 VisitOMPLoopDirective(D);
2895void ASTStmtReader::VisitOMPTeamsDistributeSimdDirective(
2896 OMPTeamsDistributeSimdDirective *D) {
2897 VisitOMPLoopDirective(D);
2900void ASTStmtReader::VisitOMPTeamsDistributeParallelForSimdDirective(
2901 OMPTeamsDistributeParallelForSimdDirective *D) {
2902 VisitOMPLoopDirective(D);
2905void ASTStmtReader::VisitOMPTeamsDistributeParallelForDirective(
2906 OMPTeamsDistributeParallelForDirective *D) {
2907 VisitOMPLoopDirective(D);
2908 D->setHasCancel(Record.readBool());
2911void ASTStmtReader::VisitOMPTargetTeamsDirective(OMPTargetTeamsDirective *D) {
2913 VisitOMPExecutableDirective(D);
2916void ASTStmtReader::VisitOMPTargetTeamsDistributeDirective(
2917 OMPTargetTeamsDistributeDirective *D) {
2918 VisitOMPLoopDirective(D);
2921void ASTStmtReader::VisitOMPTargetTeamsDistributeParallelForDirective(
2922 OMPTargetTeamsDistributeParallelForDirective *D) {
2923 VisitOMPLoopDirective(D);
2924 D->setHasCancel(Record.readBool());
2927void ASTStmtReader::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
2928 OMPTargetTeamsDistributeParallelForSimdDirective *D) {
2929 VisitOMPLoopDirective(D);
2932void ASTStmtReader::VisitOMPTargetTeamsDistributeSimdDirective(
2933 OMPTargetTeamsDistributeSimdDirective *D) {
2934 VisitOMPLoopDirective(D);
2937void ASTStmtReader::VisitOMPInteropDirective(OMPInteropDirective *D) {
2939 VisitOMPExecutableDirective(D);
2942void ASTStmtReader::VisitOMPDispatchDirective(OMPDispatchDirective *D) {
2944 VisitOMPExecutableDirective(D);
2945 D->setTargetCallLoc(Record.readSourceLocation());
2948void ASTStmtReader::VisitOMPMaskedDirective(OMPMaskedDirective *D) {
2950 VisitOMPExecutableDirective(D);
2953void ASTStmtReader::VisitOMPGenericLoopDirective(OMPGenericLoopDirective *D) {
2954 VisitOMPLoopDirective(D);
2957void ASTStmtReader::VisitOMPTeamsGenericLoopDirective(
2958 OMPTeamsGenericLoopDirective *D) {
2959 VisitOMPLoopDirective(D);
2962void ASTStmtReader::VisitOMPTargetTeamsGenericLoopDirective(
2963 OMPTargetTeamsGenericLoopDirective *D) {
2964 VisitOMPLoopDirective(D);
2965 D->setCanBeParallelFor(Record.readBool());
2968void ASTStmtReader::VisitOMPParallelGenericLoopDirective(
2969 OMPParallelGenericLoopDirective *D) {
2970 VisitOMPLoopDirective(D);
2973void ASTStmtReader::VisitOMPTargetParallelGenericLoopDirective(
2974 OMPTargetParallelGenericLoopDirective *D) {
2975 VisitOMPLoopDirective(D);
2982 (void)Record.readInt();
2984 S->Range = Record.readSourceRange();
2985 S->DirectiveLoc = Record.readSourceLocation();
2986 Record.readOpenACCClauseList(S->Clauses);
2989void ASTStmtReader::VisitOpenACCAssociatedStmtConstruct(
2991 VisitOpenACCConstructStmt(S);
2997 VisitOpenACCAssociatedStmtConstruct(S);
3000void ASTStmtReader::VisitOpenACCLoopConstruct(OpenACCLoopConstruct *S) {
3002 VisitOpenACCAssociatedStmtConstruct(S);
3006void ASTStmtReader::VisitOpenACCCombinedConstruct(OpenACCCombinedConstruct *S) {
3008 VisitOpenACCAssociatedStmtConstruct(S);
3011void ASTStmtReader::VisitOpenACCDataConstruct(OpenACCDataConstruct *S) {
3013 VisitOpenACCAssociatedStmtConstruct(S);
3016void ASTStmtReader::VisitOpenACCEnterDataConstruct(
3017 OpenACCEnterDataConstruct *S) {
3019 VisitOpenACCConstructStmt(S);
3022void ASTStmtReader::VisitOpenACCExitDataConstruct(OpenACCExitDataConstruct *S) {
3024 VisitOpenACCConstructStmt(S);
3027void ASTStmtReader::VisitOpenACCInitConstruct(OpenACCInitConstruct *S) {
3029 VisitOpenACCConstructStmt(S);
3032void ASTStmtReader::VisitOpenACCShutdownConstruct(OpenACCShutdownConstruct *S) {
3034 VisitOpenACCConstructStmt(S);
3037void ASTStmtReader::VisitOpenACCSetConstruct(OpenACCSetConstruct *S) {
3039 VisitOpenACCConstructStmt(S);
3042void ASTStmtReader::VisitOpenACCUpdateConstruct(OpenACCUpdateConstruct *S) {
3044 VisitOpenACCConstructStmt(S);
3047void ASTStmtReader::VisitOpenACCHostDataConstruct(OpenACCHostDataConstruct *S) {
3049 VisitOpenACCAssociatedStmtConstruct(S);
3052void ASTStmtReader::VisitOpenACCWaitConstruct(OpenACCWaitConstruct *S) {
3055 (void)Record.readInt();
3056 VisitOpenACCConstructStmt(S);
3057 S->LParenLoc = Record.readSourceLocation();
3058 S->RParenLoc = Record.readSourceLocation();
3059 S->QueuesLoc = Record.readSourceLocation();
3061 for (
unsigned I = 0; I < S->NumExprs; ++I) {
3062 S->getExprPtr()[I] = cast_if_present<Expr>(Record.readSubStmt());
3063 assert((I == 0 || S->getExprPtr()[I] !=
nullptr) &&
3064 "Only first expression should be null");
3068void ASTStmtReader::VisitOpenACCCacheConstruct(OpenACCCacheConstruct *S) {
3070 (void)Record.readInt();
3071 VisitOpenACCConstructStmt(S);
3072 S->ParensLoc = Record.readSourceRange();
3073 S->ReadOnlyLoc = Record.readSourceLocation();
3074 for (
unsigned I = 0; I < S->NumVars; ++I)
3078void ASTStmtReader::VisitOpenACCAtomicConstruct(OpenACCAtomicConstruct *S) {
3080 VisitOpenACCConstructStmt(S);
3082 S->setAssociatedStmt(Record.readSubStmt());
3091 S->SubExprs[HLSLOutArgExpr::BaseLValue] = Record.readSubExpr();
3092 S->SubExprs[HLSLOutArgExpr::CastedTemporary] = Record.readSubExpr();
3093 S->SubExprs[HLSLOutArgExpr::WritebackCast] = Record.readSubExpr();
3094 S->IsInOut = Record.readBool();
3102 switch (ReadingKind) {
3104 llvm_unreachable(
"should not call this when not reading anything");
3107 return ReadStmtFromStream(F);
3112 llvm_unreachable(
"ReadingKind not set ?");
3116 return cast_or_null<Expr>(
ReadStmt(F));
3131 ReadingKindTracker ReadingKind(Read_Stmt, *
this);
3136 llvm::DenseMap<uint64_t, Stmt *> StmtEntries;
3139 unsigned PrevNumStmts = StmtStack.size();
3148 Cursor.advanceSkippingSubblocks();
3153 llvm::BitstreamEntry Entry = MaybeEntry.get();
3155 switch (Entry.Kind) {
3156 case llvm::BitstreamEntry::SubBlock:
3157 case llvm::BitstreamEntry::Error:
3158 Error(
"malformed block record in AST file");
3160 case llvm::BitstreamEntry::EndBlock:
3162 case llvm::BitstreamEntry::Record:
3169 bool Finished =
false;
3170 bool IsStmtReference =
false;
3171 Expected<unsigned> MaybeStmtCode =
Record.readRecord(Cursor, Entry.ID);
3172 if (!MaybeStmtCode) {
3176 switch ((
StmtCode)MaybeStmtCode.get()) {
3182 IsStmtReference =
true;
3183 assert(StmtEntries.contains(
Record[0]) &&
3184 "No stmt was recorded for this offset reference!");
3185 S = StmtEntries[
Record.readInt()];
3193 S =
new (Context) NullStmt(
Empty);
3210 S =
new (Context) DefaultStmt(
Empty);
3214 S =
new (Context) LabelStmt(
Empty);
3225 bool HasElse = IfStmtBits.getNextBit();
3226 bool HasVar = IfStmtBits.getNextBit();
3227 bool HasInit = IfStmtBits.getNextBit();
3246 S =
new (Context) DoStmt(
Empty);
3250 S =
new (Context) ForStmt(
Empty);
3254 S =
new (Context) GotoStmt(
Empty);
3258 S =
new (Context) IndirectGotoStmt(
Empty);
3262 S =
new (Context) ContinueStmt(
Empty);
3266 S =
new (Context) BreakStmt(
Empty);
3279 S =
new (Context) DeclStmt(
Empty);
3283 S =
new (Context) GCCAsmStmt(
Empty);
3287 S =
new (Context) MSAsmStmt(
Empty);
3296 S =
new (Context) SYCLKernelCallStmt(
Empty);
3325 DeclRefExprBits.advance(5);
3326 bool HasFoundDecl = DeclRefExprBits.getNextBit();
3327 bool HasQualifier = DeclRefExprBits.getNextBit();
3328 bool HasTemplateKWAndArgsInfo = DeclRefExprBits.getNextBit();
3329 unsigned NumTemplateArgs = HasTemplateKWAndArgsInfo
3333 HasTemplateKWAndArgsInfo, NumTemplateArgs);
3350 S =
new (Context) ImaginaryLiteral(
Empty);
3362 S =
new (Context) CharacterLiteral(
Empty);
3366 S =
new (Context) ParenExpr(
Empty);
3378 bool HasFPFeatures = UnaryOperatorBits.getNextBit();
3390 S =
new (Context) UnaryExprOrTypeTraitExpr(
Empty);
3394 S =
new (Context) ArraySubscriptExpr(
Empty);
3398 S =
new (Context) MatrixSubscriptExpr(
Empty);
3402 S =
new (Context) ArraySectionExpr(
Empty);
3418 CallExprBits.advance(1);
3419 auto HasFPFeatures = CallExprBits.getNextBit();
3431 bool HasQualifier = ExprMemberBits.getNextBit();
3432 bool HasFoundDecl = ExprMemberBits.getNextBit();
3433 bool HasTemplateInfo = ExprMemberBits.getNextBit();
3436 HasTemplateInfo, NumTemplateArgs);
3442 BinaryOperatorBits.advance( 6);
3443 bool HasFPFeatures = BinaryOperatorBits.getNextBit();
3450 BinaryOperatorBits.advance( 6);
3451 bool HasFPFeatures = BinaryOperatorBits.getNextBit();
3457 S =
new (Context) ConditionalOperator(
Empty);
3461 S =
new (Context) BinaryConditionalOperator(
Empty);
3467 CastExprBits.advance(7);
3468 bool HasFPFeatures = CastExprBits.getNextBit();
3476 CastExprBits.advance(7);
3477 bool HasFPFeatures = CastExprBits.getNextBit();
3483 S =
new (Context) CompoundLiteralExpr(
Empty);
3487 S =
new (Context) ExtVectorElementExpr(
Empty);
3491 S =
new (Context) MatrixElementExpr(
Empty);
3495 S =
new (Context) InitListExpr(
Empty);
3505 S =
new (Context) DesignatedInitUpdateExpr(
Empty);
3509 S =
new (Context) ImplicitValueInitExpr(
Empty);
3513 S =
new (Context) NoInitExpr(
Empty);
3517 S =
new (Context) ArrayInitLoopExpr(
Empty);
3521 S =
new (Context) ArrayInitIndexExpr(
Empty);
3525 S =
new (Context) VAArgExpr(
Empty);
3529 S =
new (Context) SourceLocExpr(
Empty);
3533 S =
new (Context) EmbedExpr(
Empty);
3537 S =
new (Context) AddrLabelExpr(
Empty);
3541 S =
new (Context) StmtExpr(
Empty);
3545 S =
new (Context) ChooseExpr(
Empty);
3549 S =
new (Context) GNUNullExpr(
Empty);
3553 S =
new (Context) ShuffleVectorExpr(
Empty);
3559 bool HasFPFeatures = ConvertVectorExprBits.getNextBit();
3565 S =
new (Context) BlockExpr(
Empty);
3575 S =
new (Context) ObjCStringLiteral(
Empty);
3579 S =
new (Context) ObjCBoxedExpr(
Empty);
3594 S =
new (Context) ObjCEncodeExpr(
Empty);
3598 S =
new (Context) ObjCSelectorExpr(
Empty);
3602 S =
new (Context) ObjCProtocolExpr(
Empty);
3606 S =
new (Context) ObjCIvarRefExpr(
Empty);
3610 S =
new (Context) ObjCPropertyRefExpr(
Empty);
3614 S =
new (Context) ObjCSubscriptRefExpr(
Empty);
3618 llvm_unreachable(
"mismatching AST file");
3627 S =
new (Context) ObjCIsaExpr(
Empty);
3631 S =
new (Context) ObjCIndirectCopyRestoreExpr(
Empty);
3635 S =
new (Context) ObjCBridgedCastExpr(
Empty);
3639 S =
new (Context) ObjCForCollectionStmt(
Empty);
3643 S =
new (Context) ObjCAtCatchStmt(
Empty);
3647 S =
new (Context) ObjCAtFinallyStmt(
Empty);
3657 S =
new (Context) ObjCAtSynchronizedStmt(
Empty);
3661 S =
new (Context) ObjCAtThrowStmt(
Empty);
3665 S =
new (Context) ObjCAutoreleasePoolStmt(
Empty);
3669 S =
new (Context) ObjCBoolLiteralExpr(
Empty);
3673 S =
new (Context) ObjCAvailabilityCheckExpr(
Empty);
3677 S =
new (Context) SEHLeaveStmt(
Empty);
3681 S =
new (Context) SEHExceptStmt(
Empty);
3685 S =
new (Context) SEHFinallyStmt(
Empty);
3689 S =
new (Context) SEHTryStmt(
Empty);
3693 S =
new (Context) CXXCatchStmt(
Empty);
3715 S =
new (Context) CXXForRangeStmt(
Empty);
3719 S =
new (Context) MSDependentExistsStmt(SourceLocation(),
true,
3720 NestedNameSpecifierLoc(),
3721 DeclarationNameInfo(),
3726 S = OMPCanonicalLoop::createEmpty(Context);
3736 OMPParallelDirective::CreateEmpty(Context,
3745 CollapsedNum,
Empty);
3773 "Reverse directive has no clauses");
3853 CollapsedNum,
Empty);
3861 CollapsedNum,
Empty);
3971 CollapsedNum,
Empty);
4006 CollapsedNum,
Empty);
4014 CollapsedNum,
Empty);
4022 CollapsedNum,
Empty);
4030 CollapsedNum,
Empty);
4038 CollapsedNum,
Empty);
4046 CollapsedNum,
Empty);
4054 CollapsedNum,
Empty);
4062 Context, NumClauses, CollapsedNum,
Empty);
4070 Context, NumClauses, CollapsedNum,
Empty);
4086 CollapsedNum,
Empty);
4103 CollapsedNum,
Empty);
4111 CollapsedNum,
Empty);
4127 CollapsedNum,
Empty);
4135 CollapsedNum,
Empty);
4143 Context, NumClauses, CollapsedNum,
Empty);
4151 Context, NumClauses, CollapsedNum,
Empty);
4164 CollapsedNum,
Empty);
4172 Context, NumClauses, CollapsedNum,
Empty);
4180 Context, NumClauses, CollapsedNum,
Empty);
4188 Context, NumClauses, CollapsedNum,
Empty);
4211 CollapsedNum,
Empty);
4219 CollapsedNum,
Empty);
4227 CollapsedNum,
Empty);
4235 CollapsedNum,
Empty);
4243 Context, NumClauses, CollapsedNum,
Empty);
4256 CallExprBits.advance(1);
4257 auto HasFPFeatures = CallExprBits.getNextBit();
4266 CallExprBits.advance(1);
4267 auto HasFPFeatures = CallExprBits.getNextBit();
4274 S =
new (Context) CXXRewrittenBinaryOperator(
Empty);
4284 S =
new (Context) CXXInheritedCtorInitExpr(
Empty);
4296 CastExprBits.advance(7);
4297 bool HasFPFeatures = CastExprBits.getNextBit();
4325 CastExprBits.advance(7);
4326 bool HasFPFeatures = CastExprBits.getNextBit();
4334 assert(PathSize == 0 &&
"Wrong PathSize!");
4336 S =
new (Context) BuiltinBitCastExpr(
Empty);
4343 CallExprBits.advance(1);
4344 auto HasFPFeatures = CallExprBits.getNextBit();
4351 S =
new (Context) CXXStdInitializerListExpr(
Empty);
4355 S =
new (Context) CXXBoolLiteralExpr(
Empty);
4359 S =
new (Context) CXXNullPtrLiteralExpr(
Empty);
4363 S =
new (Context) CXXTypeidExpr(
Empty,
true);
4367 S =
new (Context) CXXTypeidExpr(
Empty,
false);
4371 S =
new (Context) CXXUuidofExpr(
Empty,
true);
4375 S =
new (Context) MSPropertyRefExpr(
Empty);
4379 S =
new (Context) MSPropertySubscriptExpr(
Empty);
4383 S =
new (Context) CXXUuidofExpr(
Empty,
false);
4391 S =
new (Context) CXXThrowExpr(
Empty);
4405 S =
new (Context) CXXBindTemporaryExpr(
Empty);
4409 S =
new (Context) CXXScalarValueInitExpr(
Empty);
4422 S =
new (Context) CXXDeleteExpr(
Empty);
4426 S =
new (Context) CXXPseudoDestructorExpr(
Empty);
4436 BitsUnpacker DependentScopeMemberBits(
4438 bool HasTemplateKWAndArgsInfo = DependentScopeMemberBits.getNextBit();
4440 bool HasFirstQualifierFoundInScope =
4441 DependentScopeMemberBits.getNextBit();
4443 Context, HasTemplateKWAndArgsInfo, NumTemplateArgs,
4444 HasFirstQualifierFoundInScope);
4454 BitsUnpacker DependentScopeDeclRefBits(
4457 bool HasTemplateKWAndArgsInfo = DependentScopeDeclRefBits.getNextBit();
4458 unsigned NumTemplateArgs =
4459 HasTemplateKWAndArgsInfo
4460 ? DependentScopeDeclRefBits.getNextBits(16)
4463 Context, HasTemplateKWAndArgsInfo, NumTemplateArgs);
4475 auto HasTemplateKWAndArgsInfo = OverloadExprBits.getNextBit();
4476 auto NumTemplateArgs = HasTemplateKWAndArgsInfo
4480 Context, NumResults, HasTemplateKWAndArgsInfo, NumTemplateArgs);
4487 auto HasTemplateKWAndArgsInfo = OverloadExprBits.getNextBit();
4488 auto NumTemplateArgs = HasTemplateKWAndArgsInfo
4492 Context, NumResults, HasTemplateKWAndArgsInfo, NumTemplateArgs);
4503 S =
new (Context) ArrayTypeTraitExpr(
Empty);
4507 S =
new (Context) ExpressionTraitExpr(
Empty);
4511 S =
new (Context) CXXNoexceptExpr(
Empty);
4515 S =
new (Context) PackExpansionExpr(
Empty);
4531 S =
new (Context) SubstNonTypeTemplateParmExpr(
Empty);
4535 S =
new (Context) SubstNonTypeTemplateParmPackExpr(
Empty);
4544 S =
new (Context) MaterializeTemporaryExpr(
Empty);
4548 S =
new (Context) CXXFoldExpr(
Empty);
4557 S =
new (Context) OpaqueValueExpr(
Empty);
4563 CallExprBits.advance(1);
4564 auto HasFPFeatures = CallExprBits.getNextBit();
4571 S =
new (Context) AsTypeExpr(
Empty);
4581 S =
new (Context) AtomicExpr(
Empty);
4597 S =
new (Context) CoreturnStmt(
Empty);
4601 S =
new (Context) CoawaitExpr(
Empty);
4605 S =
new (Context) CoyieldExpr(
Empty);
4609 S =
new (Context) DependentCoawaitExpr(
Empty);
4613 S =
new (Context) ConceptSpecializationExpr(
Empty);
4618 S =
new (Context) CXXExpansionSelectExpr(
Empty);
4623 S = OpenACCComputeConstruct::CreateEmpty(Context, NumClauses);
4712 ++NumStatementsRead;
4714 if (S && !IsStmtReference) {
4716 StmtEntries[
Cursor.GetCurrentBitNo()] = S;
4720 "Invalid deserialization of statement");
4721 StmtStack.push_back(S);
4724 assert(StmtStack.size() > PrevNumStmts &&
"Read too many sub-stmts!");
4725 assert(StmtStack.size() == PrevNumStmts + 1 &&
"Extra expressions on stack!");
4726 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 enumerations for traits support.
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.
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.
C Language Family Type Representation.
static OMPAssumeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
static OMPAtomicDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPBarrierDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
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 OMPCriticalDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPDepobjDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
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 OMPFlattenDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty 'pragma omp flatten' AST node for deserialization.
static OMPFlushDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
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 OMPMasterDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
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 OMPOrderedBlockAssocDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPOrderedStandaloneDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPParallelForSimdDirective * 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 OMPParallelMaskedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, 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 OMPParallelMasterDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, 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 OMPParallelSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, 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 OMPScopeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
void setHasCancel(bool Has)
Set cancel state.
static OMPSectionDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static OMPSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPSingleDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPSplitDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty 'pragma omp split' AST node for deserialization.
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 OMPTaskDirective * 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 OMPTaskgroupDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPTaskwaitDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPTaskyieldDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
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 ...
uint64_t getTypeSize(QualType T) const
Return the size of the specified (complete) type T, in bits.
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)
Helper that selects an expression from an InitListExpr depending on the current expansion index.
void setIndexExpr(Expr *E)
void setRangeExpr(InitListExpr *E)
Represents the code generated for an expanded expansion statement.
ArrayRef< Stmt * > getAllSubStmts() const
unsigned getNumSubStmts() const
static CXXExpansionStmtInstantiation * CreateEmpty(ASTContext &C, EmptyShell Empty, unsigned NumInstantiations, unsigned NumPreambleStmts)
void setShouldApplyLifetimeExtensionToPreamble(bool Apply)
CXXExpansionStmtPattern - Represents an unexpanded C++ expansion statement.
static CXXExpansionStmtPattern * CreateEmpty(ASTContext &Context, EmptyShell Empty, ExpansionStmtKind Kind)
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)
A template-id naming a variable template or a concept through a template template parameter.
static DependentTemplateIdExpr * CreateEmpty(const ASTContext &Context, unsigned NumTemplateArgs)
unsigned getNumTemplateArgs() const
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 setSelectorNameLoc(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
InitListExprBitfields InitListExprBits
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
Get the number of string literal tokens that were concatenated in translation phase #6 to form this s...
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 setVarargABI(VarArgKind Kind)
void setRParenLoc(SourceLocation L)
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
@ 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
@ STMT_OMP_ORDERED_STANDALONE_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_ORDERED_BLOCK_ASSOC_DIRECTIVE
@ 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
@ STMT_OMP_FLATTEN_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_CXX_EXPANSION_INSTANTIATION
A CXXExpansionInstantiationStmt.
@ 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.
@ STMT_CXX_EXPANSION_PATTERN
A CXXExpansionPatternStmt.
@ 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_SPLIT_DIRECTIVE
@ 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
@ EXPR_DEPENDENT_TEMPLATE_ID
@ 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.
@ EXPR_CXX_EXPANSION_SELECT
@ 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.
Top level wrappers for InstallAPI frontend operations.
ConstantResultStorageKind
Describes the kind of result that can be tail-allocated.
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)
const FunctionProtoType * T
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....