52 #include "llvm/ADT/DenseMap.h" 53 #include "llvm/ADT/SmallString.h" 54 #include "llvm/ADT/SmallVector.h" 55 #include "llvm/ADT/StringRef.h" 56 #include "llvm/Bitstream/BitstreamReader.h" 57 #include "llvm/Support/Casting.h" 58 #include "llvm/Support/ErrorHandling.h" 64 using namespace clang;
65 using namespace serialization;
71 llvm::BitstreamCursor &DeclsCursor;
81 std::string readString() {
100 : Record(Record), DeclsCursor(Cursor) {}
104 static const unsigned NumStmtFields = 1;
108 static const unsigned NumExprFields = NumStmtFields + 7;
113 unsigned NumTemplateArgs);
117 unsigned NumTemplateArgs);
119 void VisitStmt(
Stmt *S);
120 #define STMT(Type, Base) \ 121 void Visit##Type(Type *); 122 #include "clang/AST/StmtNodes.inc" 129 unsigned NumTemplateArgs) {
134 for (
unsigned i = 0; i != NumTemplateArgs; ++i)
135 ArgInfo.
addArgument(Record.readTemplateArgumentLoc());
141 assert(Record.getIdx() == NumStmtFields &&
"Incorrect statement field count");
144 void ASTStmtReader::VisitNullStmt(
NullStmt *S) {
147 S->
NullStmtBits.HasLeadingEmptyMacro = Record.readInt();
150 void ASTStmtReader::VisitCompoundStmt(
CompoundStmt *S) {
153 unsigned NumStmts = Record.readInt();
155 Stmts.push_back(Record.readSubStmt());
158 S->RBraceLoc = readSourceLocation();
161 void ASTStmtReader::VisitSwitchCase(
SwitchCase *S) {
163 Record.recordSwitchCaseID(S, Record.readInt());
168 void ASTStmtReader::VisitCaseStmt(
CaseStmt *S) {
170 bool CaseStmtIsGNURange = Record.readInt();
171 S->
setLHS(Record.readSubExpr());
173 if (CaseStmtIsGNURange) {
174 S->
setRHS(Record.readSubExpr());
179 void ASTStmtReader::VisitDefaultStmt(
DefaultStmt *S) {
184 void ASTStmtReader::VisitLabelStmt(
LabelStmt *S) {
186 auto *LD = readDeclAs<LabelDecl>();
198 uint64_t NumAttrs = Record.readInt();
200 Record.readAttributes(Attrs);
203 assert(NumAttrs == Attrs.size());
204 std::copy(Attrs.begin(), Attrs.end(), S->getAttrArrayPtr());
205 S->SubStmt = Record.readSubStmt();
209 void ASTStmtReader::VisitIfStmt(
IfStmt *S) {
213 bool HasElse = Record.readInt();
214 bool HasVar = Record.readInt();
215 bool HasInit = Record.readInt();
217 S->
setCond(Record.readSubExpr());
218 S->
setThen(Record.readSubStmt());
220 S->
setElse(Record.readSubStmt());
224 S->
setInit(Record.readSubStmt());
231 void ASTStmtReader::VisitSwitchStmt(
SwitchStmt *S) {
234 bool HasInit = Record.readInt();
235 bool HasVar = Record.readInt();
236 bool AllEnumCasesCovered = Record.readInt();
237 if (AllEnumCasesCovered)
240 S->
setCond(Record.readSubExpr());
241 S->
setBody(Record.readSubStmt());
243 S->
setInit(Record.readSubStmt());
250 for (
auto E = Record.size(); Record.getIdx() != E; ) {
251 SwitchCase *SC = Record.getSwitchCaseWithID(Record.readInt());
261 void ASTStmtReader::VisitWhileStmt(
WhileStmt *S) {
264 bool HasVar = Record.readInt();
266 S->
setCond(Record.readSubExpr());
267 S->
setBody(Record.readSubStmt());
274 void ASTStmtReader::VisitDoStmt(
DoStmt *S) {
276 S->
setCond(Record.readSubExpr());
277 S->
setBody(Record.readSubStmt());
283 void ASTStmtReader::VisitForStmt(
ForStmt *S) {
285 S->
setInit(Record.readSubStmt());
286 S->
setCond(Record.readSubExpr());
288 S->
setInc(Record.readSubExpr());
289 S->
setBody(Record.readSubStmt());
295 void ASTStmtReader::VisitGotoStmt(
GotoStmt *S) {
297 S->
setLabel(readDeclAs<LabelDecl>());
309 void ASTStmtReader::VisitContinueStmt(
ContinueStmt *S) {
314 void ASTStmtReader::VisitBreakStmt(
BreakStmt *S) {
319 void ASTStmtReader::VisitReturnStmt(
ReturnStmt *S) {
322 bool HasNRVOCandidate = Record.readInt();
325 if (HasNRVOCandidate)
331 void ASTStmtReader::VisitDeclStmt(
DeclStmt *S) {
336 if (Record.size() - Record.getIdx() == 1) {
341 int N = Record.size() - Record.getIdx();
343 for (
int I = 0; I < N; ++I)
344 Decls.push_back(readDecl());
351 void ASTStmtReader::VisitAsmStmt(
AsmStmt *S) {
361 void ASTStmtReader::VisitGCCAsmStmt(
GCCAsmStmt *S) {
363 S->NumLabels = Record.readInt();
365 S->
setAsmString(cast_or_null<StringLiteral>(Record.readSubStmt()));
376 for (
unsigned I = 0, N = NumOutputs + NumInputs; I != N; ++I) {
377 Names.push_back(Record.readIdentifier());
378 Constraints.push_back(cast_or_null<StringLiteral>(Record.readSubStmt()));
379 Exprs.push_back(Record.readSubStmt());
384 for (
unsigned I = 0; I != NumClobbers; ++I)
385 Clobbers.push_back(cast_or_null<StringLiteral>(Record.readSubStmt()));
388 for (
unsigned I = 0, N = NumLabels; I != N; ++I)
389 Exprs.push_back(Record.readSubStmt());
391 S->setOutputsAndInputsAndClobbers(Record.getContext(),
392 Names.data(), Constraints.data(),
393 Exprs.data(), NumOutputs, NumInputs,
395 Clobbers.data(), NumClobbers);
398 void ASTStmtReader::VisitMSAsmStmt(
MSAsmStmt *S) {
400 S->LBraceLoc = readSourceLocation();
401 S->EndLoc = readSourceLocation();
402 S->NumAsmToks = Record.readInt();
403 std::string AsmStr = readString();
407 AsmToks.reserve(S->NumAsmToks);
408 for (
unsigned i = 0, e = S->NumAsmToks; i != e; ++i) {
409 AsmToks.push_back(Record.readToken());
420 for (
unsigned i = 0, e = S->
NumClobbers; i != e; ++i) {
421 ClobbersData.push_back(readString());
422 Clobbers.push_back(ClobbersData.back());
430 Exprs.reserve(NumOperands);
431 ConstraintsData.reserve(NumOperands);
432 Constraints.reserve(NumOperands);
433 for (
unsigned i = 0; i != NumOperands; ++i) {
434 Exprs.push_back(cast<Expr>(Record.readSubStmt()));
435 ConstraintsData.push_back(readString());
436 Constraints.push_back(ConstraintsData.back());
439 S->initialize(Record.getContext(), AsmStr, AsmToks,
440 Constraints, Exprs, Clobbers);
445 assert(Record.peekInt() == S->NumParams);
447 auto *StoredStmts = S->getStoredStmts();
449 i < CoroutineBodyStmt::SubStmt::FirstParamMove + S->NumParams; ++i)
450 StoredStmts[i] = Record.readSubStmt();
453 void ASTStmtReader::VisitCoreturnStmt(
CoreturnStmt *S) {
455 S->CoreturnLoc = Record.readSourceLocation();
456 for (
auto &SubStmt: S->SubStmts)
457 SubStmt = Record.readSubStmt();
458 S->IsImplicit = Record.readInt() != 0;
461 void ASTStmtReader::VisitCoawaitExpr(
CoawaitExpr *E) {
463 E->KeywordLoc = readSourceLocation();
464 for (
auto &SubExpr: E->SubExprs)
465 SubExpr = Record.readSubStmt();
466 E->OpaqueValue = cast_or_null<OpaqueValueExpr>(Record.readSubStmt());
470 void ASTStmtReader::VisitCoyieldExpr(
CoyieldExpr *E) {
472 E->KeywordLoc = readSourceLocation();
473 for (
auto &SubExpr: E->SubExprs)
474 SubExpr = Record.readSubStmt();
475 E->OpaqueValue = cast_or_null<OpaqueValueExpr>(Record.readSubStmt());
480 E->KeywordLoc = readSourceLocation();
481 for (
auto &SubExpr: E->SubExprs)
482 SubExpr = Record.readSubStmt();
485 void ASTStmtReader::VisitCapturedStmt(
CapturedStmt *S) {
496 *I = Record.readSubExpr();
499 S->setCapturedStmt(Record.readSubStmt());
504 I.VarAndKind.setPointer(readDeclAs<VarDecl>());
506 static_cast<CapturedStmt::VariableCaptureKind>(Record.readInt()));
507 I.Loc = readSourceLocation();
511 void ASTStmtReader::VisitExpr(
Expr *E) {
517 E->
ExprBits.ContainsUnexpandedParameterPack = Record.readInt();
518 E->
setValueKind(static_cast<ExprValueKind>(Record.readInt()));
519 E->
setObjectKind(static_cast<ExprObjectKind>(Record.readInt()));
520 assert(Record.getIdx() == NumExprFields &&
521 "Incorrect expression field count");
524 void ASTStmtReader::VisitConstantExpr(
ConstantExpr *E) {
529 E->Int64Result() = Record.readInt();
530 uint64_t tmp = Record.readInt();
536 E->APValueResult() = Record.readAPValue();
543 bool HasFunctionName = Record.readInt();
548 E->setFunctionName(cast<StringLiteral>(Record.readSubExpr()));
551 void ASTStmtReader::VisitDeclRefExpr(
DeclRefExpr *E) {
558 E->
DeclRefExprBits.RefersToEnclosingVariableOrCapture = Record.readInt();
560 unsigned NumTemplateArgs = 0;
562 NumTemplateArgs = Record.readInt();
568 if (E->hasFoundDecl())
569 *E->getTrailingObjects<
NamedDecl *>() = readDeclAs<NamedDecl>();
572 ReadTemplateKWAndArgsInfo(
576 E->
setDecl(readDeclAs<ValueDecl>());
584 E->
setValue(Record.getContext(), Record.readAPInt());
590 E->
setValue(Record.getContext(), Record.readAPInt());
596 static_cast<llvm::APFloatBase::Semantics>(Record.readInt()));
612 unsigned NumConcatenated = Record.readInt();
613 unsigned Length = Record.readInt();
614 unsigned CharByteWidth = Record.readInt();
616 "Wrong number of concatenated tokens!");
617 assert((Length == E->
getLength()) &&
"Wrong Length!");
618 assert((CharByteWidth == E->
getCharByteWidth()) &&
"Wrong character width!");
625 assert((CharByteWidth ==
626 StringLiteral::mapCharByteWidth(Record.getContext().getTargetInfo(),
628 "Wrong character width!");
631 for (
unsigned I = 0; I < NumConcatenated; ++I)
632 E->setStrTokenLoc(I, readSourceLocation());
635 char *StrData = E->getStrDataAsChar();
636 for (
unsigned I = 0; I < Length * CharByteWidth; ++I)
637 StrData[I] = Record.readInt();
644 E->
setKind(static_cast<CharacterLiteral::CharacterKind>(Record.readInt()));
647 void ASTStmtReader::VisitParenExpr(
ParenExpr *E) {
656 unsigned NumExprs = Record.readInt();
657 assert((NumExprs == E->
getNumExprs()) &&
"Wrong NumExprs!");
658 for (
unsigned I = 0; I != NumExprs; ++I)
659 E->getTrailingObjects<
Stmt *>()[I] = Record.readSubStmt();
660 E->LParenLoc = readSourceLocation();
661 E->RParenLoc = readSourceLocation();
672 void ASTStmtReader::VisitOffsetOfExpr(
OffsetOfExpr *E) {
703 *
Base = Record.readCXXBaseSpecifier();
716 E->
setKind(static_cast<UnaryExprOrTypeTrait>(Record.readInt()));
717 if (Record.peekInt() == 0) {
732 unsigned NumDetailRecords = Record.
readInt();
733 for (
unsigned i = 0; i != NumDetailRecords; ++i) {
735 if (
bool IsDiagnostic = Record.
readInt()) {
737 std::string DiagMessage = Record.
readString();
738 Satisfaction.
Details.emplace_back(
741 DiagLocation, DiagMessage});
749 void ASTStmtReader::VisitConceptSpecializationExpr(
752 unsigned NumTemplateArgs = Record.readInt();
759 for (
unsigned I = 0; I < NumTemplateArgs; ++I)
760 Args.push_back(Record.readTemplateArgument());
769 std::string SubstitutedEntity = Record.
readString();
771 std::string DiagMessage = Record.
readString();
777 void ASTStmtReader::VisitRequiresExpr(
RequiresExpr *E) {
779 unsigned NumLocalParameters = Record.readInt();
780 unsigned NumRequirements = Record.readInt();
785 for (
unsigned i = 0; i < NumLocalParameters; ++i)
786 LocalParameters.push_back(cast<ParmVarDecl>(Record.readDecl()));
787 std::copy(LocalParameters.begin(), LocalParameters.end(),
790 for (
unsigned i = 0; i < NumRequirements; ++i) {
800 R =
new (Record.getContext())
803 R =
new (Record.getContext())
816 E = Record.readExpr();
824 NoexceptLoc = Record.readSourceLocation();
825 switch (
auto returnTypeRequirementKind = Record.readInt()) {
835 SubstitutedConstraintExpr =
836 cast<ConceptSpecializationExpr>(Record.readExpr());
845 if (
Expr *Ex = E.dyn_cast<
Expr *>())
848 std::move(*Req), Status, SubstitutedConstraintExpr);
851 E.get<concepts::Requirement::SubstitutionDiagnostic *>(),
856 if (
bool IsSubstitutionDiagnostic = Record.readInt()) {
861 Expr *E = Record.readExpr();
865 R =
new (Record.getContext())
872 Requirements.push_back(R);
874 std::copy(Requirements.begin(), Requirements.end(),
876 E->RBraceLoc = Record.readSourceLocation();
881 E->
setLHS(Record.readSubExpr());
882 E->
setRHS(Record.readSubExpr());
888 E->
setBase(Record.readSubExpr());
895 void ASTStmtReader::VisitCallExpr(
CallExpr *E) {
897 unsigned NumArgs = Record.readInt();
898 assert((NumArgs == E->
getNumArgs()) &&
"Wrong NumArgs!");
901 for (
unsigned I = 0; I != NumArgs; ++I)
902 E->
setArg(I, Record.readSubExpr());
903 E->
setADLCallKind(static_cast<CallExpr::ADLCallKind>(Record.readInt()));
910 void ASTStmtReader::VisitMemberExpr(
MemberExpr *E) {
913 bool HasQualifier = Record.readInt();
914 bool HasFoundDecl = Record.readInt();
915 bool HasTemplateInfo = Record.readInt();
916 unsigned NumTemplateArgs = Record.readInt();
918 E->Base = Record.readSubExpr();
919 E->MemberDecl = Record.readDeclAs<
ValueDecl>();
920 E->MemberDNLoc = Record.readDeclarationNameLoc(E->MemberDecl->
getDeclName());
921 E->MemberLoc = Record.readSourceLocation();
923 E->
MemberExprBits.HasQualifierOrFoundDecl = HasQualifier || HasFoundDecl;
929 if (HasQualifier || HasFoundDecl) {
932 auto *FoundD = Record.readDeclAs<
NamedDecl>();
943 QualifierLoc = Record.readNestedNameSpecifierLoc();
949 ReadTemplateKWAndArgsInfo(
954 void ASTStmtReader::VisitObjCIsaExpr(
ObjCIsaExpr *E) {
956 E->
setBase(Record.readSubExpr());
965 E->Operand = Record.readSubExpr();
966 E->setShouldCopy(Record.readInt());
970 VisitExplicitCastExpr(E);
971 E->LParenLoc = readSourceLocation();
972 E->BridgeKeywordLoc = readSourceLocation();
973 E->Kind = Record.readInt();
976 void ASTStmtReader::VisitCastExpr(
CastExpr *E) {
978 unsigned NumBaseSpecs = Record.readInt();
983 while (NumBaseSpecs--) {
985 *BaseSpec = Record.readCXXBaseSpecifier();
992 E->
setLHS(Record.readSubExpr());
993 E->
setRHS(Record.readSubExpr());
1000 VisitBinaryOperator(E);
1007 E->SubExprs[ConditionalOperator::COND] = Record.readSubExpr();
1008 E->SubExprs[ConditionalOperator::LHS] = Record.readSubExpr();
1009 E->SubExprs[ConditionalOperator::RHS] = Record.readSubExpr();
1010 E->QuestionLoc = readSourceLocation();
1011 E->ColonLoc = readSourceLocation();
1017 E->OpaqueValue = cast<OpaqueValueExpr>(Record.readSubExpr());
1018 E->SubExprs[BinaryConditionalOperator::COMMON] = Record.readSubExpr();
1019 E->SubExprs[BinaryConditionalOperator::COND] = Record.readSubExpr();
1020 E->SubExprs[BinaryConditionalOperator::LHS] = Record.readSubExpr();
1021 E->SubExprs[BinaryConditionalOperator::RHS] = Record.readSubExpr();
1022 E->QuestionLoc = readSourceLocation();
1023 E->ColonLoc = readSourceLocation();
1037 VisitExplicitCastExpr(E);
1052 E->
setBase(Record.readSubExpr());
1057 void ASTStmtReader::VisitInitListExpr(
InitListExpr *E) {
1059 if (
auto *SyntForm = cast_or_null<InitListExpr>(Record.readSubStmt()))
1063 bool isArrayFiller = Record.readInt();
1064 Expr *filler =
nullptr;
1065 if (isArrayFiller) {
1066 filler = Record.readSubExpr();
1067 E->ArrayFillerOrUnionFieldInit = filler;
1069 E->ArrayFillerOrUnionFieldInit = readDeclAs<FieldDecl>();
1071 unsigned NumInits = Record.readInt();
1073 if (isArrayFiller) {
1074 for (
unsigned I = 0; I != NumInits; ++I) {
1075 Expr *init = Record.readSubExpr();
1076 E->
updateInit(Record.getContext(), I, init ? init : filler);
1079 for (
unsigned I = 0; I != NumInits; ++I)
1080 E->
updateInit(Record.getContext(), I, Record.readSubExpr());
1088 unsigned NumSubExprs = Record.readInt();
1089 assert(NumSubExprs == E->
getNumSubExprs() &&
"Wrong number of subexprs");
1090 for (
unsigned I = 0; I != NumSubExprs; ++I)
1096 while (Record.getIdx() < Record.size()) {
1099 auto *Field = readDeclAs<FieldDecl>();
1102 Designators.push_back(
Designator(Field->getIdentifier(), DotLoc,
1104 Designators.back().setField(Field);
1112 Designators.push_back(
Designator(Name, DotLoc, FieldLoc));
1117 unsigned Index = Record.readInt();
1120 Designators.push_back(
Designator(Index, LBracketLoc, RBracketLoc));
1125 unsigned Index = Record.readInt();
1129 Designators.push_back(
Designator(Index, LBracketLoc, EllipsisLoc,
1136 Designators.data(), Designators.size());
1141 E->
setBase(Record.readSubExpr());
1145 void ASTStmtReader::VisitNoInitExpr(
NoInitExpr *E) {
1151 E->SubExprs[0] = Record.readSubExpr();
1152 E->SubExprs[1] = Record.readSubExpr();
1163 void ASTStmtReader::VisitVAArgExpr(
VAArgExpr *E) {
1174 E->ParentContext = readDeclAs<DeclContext>();
1175 E->BuiltinLoc = readSourceLocation();
1176 E->RParenLoc = readSourceLocation();
1185 E->
setLabel(readDeclAs<LabelDecl>());
1188 void ASTStmtReader::VisitStmtExpr(
StmtExpr *E) {
1192 E->
setSubStmt(cast_or_null<CompoundStmt>(Record.readSubStmt()));
1195 void ASTStmtReader::VisitChooseExpr(
ChooseExpr *E) {
1197 E->
setCond(Record.readSubExpr());
1198 E->
setLHS(Record.readSubExpr());
1199 E->
setRHS(Record.readSubExpr());
1205 void ASTStmtReader::VisitGNUNullExpr(
GNUNullExpr *E) {
1213 unsigned NumExprs = Record.readInt();
1215 Exprs.push_back(Record.readSubExpr());
1216 E->
setExprs(Record.getContext(), Exprs);
1223 E->BuiltinLoc = readSourceLocation();
1224 E->RParenLoc = readSourceLocation();
1225 E->TInfo = readTypeSourceInfo();
1226 E->SrcExpr = Record.readSubExpr();
1229 void ASTStmtReader::VisitBlockExpr(
BlockExpr *E) {
1237 unsigned NumAssocs = Record.readInt();
1238 assert(NumAssocs == E->
getNumAssocs() &&
"Wrong NumAssocs!");
1239 E->ResultIndex = Record.readInt();
1241 E->DefaultLoc = readSourceLocation();
1242 E->RParenLoc = readSourceLocation();
1244 Stmt **Stmts = E->getTrailingObjects<
Stmt *>();
1248 for (
unsigned I = 0, N = NumAssocs + 1; I < N; ++I)
1249 Stmts[I] = Record.readSubExpr();
1252 for (
unsigned I = 0, N = NumAssocs; I < N; ++I)
1253 TSIs[I] = readTypeSourceInfo();
1258 unsigned numSemanticExprs = Record.readInt();
1263 E->getSubExprsBuffer()[0] = Record.readSubExpr();
1266 for (
unsigned i = 0; i != numSemanticExprs; ++i) {
1267 Expr *subExpr = Record.readSubExpr();
1268 E->getSubExprsBuffer()[i+1] = subExpr;
1272 void ASTStmtReader::VisitAtomicExpr(
AtomicExpr *E) {
1276 for (
unsigned I = 0; I != E->NumSubExprs; ++I)
1277 E->SubExprs[I] = Record.readSubExpr();
1278 E->BuiltinLoc = readSourceLocation();
1279 E->RParenLoc = readSourceLocation();
1287 E->
setString(cast<StringLiteral>(Record.readSubStmt()));
1294 E->SubExpr = Record.readSubStmt();
1295 E->BoxingMethod = readDeclAs<ObjCMethodDecl>();
1296 E->Range = readSourceRange();
1301 unsigned NumElements = Record.readInt();
1302 assert(NumElements == E->
getNumElements() &&
"Wrong number of elements");
1304 for (
unsigned I = 0, N = NumElements; I != N; ++I)
1305 Elements[I] = Record.readSubExpr();
1306 E->ArrayWithObjectsMethod = readDeclAs<ObjCMethodDecl>();
1307 E->Range = readSourceRange();
1312 unsigned NumElements = Record.readInt();
1313 assert(NumElements == E->
getNumElements() &&
"Wrong number of elements");
1314 bool HasPackExpansions = Record.readInt();
1315 assert(HasPackExpansions == E->HasPackExpansions &&
"Pack expansion mismatch");
1320 for (
unsigned I = 0; I != NumElements; ++I) {
1321 KeyValues[I].Key = Record.readSubExpr();
1322 KeyValues[I].Value = Record.readSubExpr();
1323 if (HasPackExpansions) {
1324 Expansions[I].EllipsisLoc = readSourceLocation();
1325 Expansions[I].NumExpansionsPlusOne = Record.readInt();
1328 E->DictWithObjectsMethod = readDeclAs<ObjCMethodDecl>();
1329 E->Range = readSourceRange();
1350 E->ProtoLoc = readSourceLocation();
1356 E->
setDecl(readDeclAs<ObjCIvarDecl>());
1359 E->
setBase(Record.readSubExpr());
1366 unsigned MethodRefFlags = Record.readInt();
1367 bool Implicit = Record.readInt() != 0;
1369 auto *Getter = readDeclAs<ObjCMethodDecl>();
1370 auto *Setter = readDeclAs<ObjCMethodDecl>();
1371 E->setImplicitProperty(Getter, Setter, MethodRefFlags);
1373 E->setExplicitProperty(readDeclAs<ObjCPropertyDecl>(), MethodRefFlags);
1375 E->setLocation(readSourceLocation());
1376 E->setReceiverLocation(readSourceLocation());
1377 switch (Record.readInt()) {
1379 E->setBase(Record.readSubExpr());
1382 E->setSuperReceiver(Record.readType());
1385 E->setClassReceiver(readDeclAs<ObjCInterfaceDecl>());
1395 E->GetAtIndexMethodDecl = readDeclAs<ObjCMethodDecl>();
1396 E->SetAtIndexMethodDecl = readDeclAs<ObjCMethodDecl>();
1403 unsigned NumStoredSelLocs = Record.readInt();
1404 E->SelLocsKind = Record.readInt();
1406 E->IsImplicit = Record.readInt();
1428 if (Record.readInt())
1433 E->LBracLoc = readSourceLocation();
1434 E->RBracLoc = readSourceLocation();
1436 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I)
1437 E->
setArg(I, Record.readSubExpr());
1440 for (
unsigned I = 0; I != NumStoredSelLocs; ++I)
1441 Locs[I] = readSourceLocation();
1448 S->
setBody(Record.readSubStmt());
1477 bool HasFinally = Record.readInt();
1480 S->
setCatchStmt(I, cast_or_null<ObjCAtCatchStmt>(Record.readSubStmt()));
1511 E->VersionToCheck = Record.readVersionTuple();
1518 void ASTStmtReader::VisitCXXCatchStmt(
CXXCatchStmt *S) {
1520 S->CatchLoc = readSourceLocation();
1521 S->ExceptionDecl = readDeclAs<VarDecl>();
1522 S->HandlerBlock = Record.readSubStmt();
1525 void ASTStmtReader::VisitCXXTryStmt(
CXXTryStmt *S) {
1527 assert(Record.peekInt() == S->
getNumHandlers() &&
"NumStmtFields is wrong ?");
1529 S->TryLoc = readSourceLocation();
1530 S->getStmts()[0] = Record.readSubStmt();
1532 S->getStmts()[i + 1] = Record.readSubStmt();
1537 S->ForLoc = readSourceLocation();
1538 S->CoawaitLoc = readSourceLocation();
1539 S->ColonLoc = readSourceLocation();
1540 S->RParenLoc = readSourceLocation();
1541 S->
setInit(Record.readSubStmt());
1545 S->
setCond(Record.readSubExpr());
1546 S->
setInc(Record.readSubExpr());
1548 S->
setBody(Record.readSubStmt());
1553 S->KeywordLoc = readSourceLocation();
1554 S->IsIfExists = Record.readInt();
1555 S->QualifierLoc = Record.readNestedNameSpecifierLoc();
1556 S->NameInfo = Record.readDeclarationNameInfo();
1557 S->SubStmt = Record.readSubStmt();
1564 E->Range = Record.readSourceRange();
1567 void ASTStmtReader::VisitCXXRewrittenBinaryOperator(
1571 E->SemanticForm = Record.readSubExpr();
1577 unsigned NumArgs = Record.readInt();
1578 assert((NumArgs == E->
getNumArgs()) &&
"Wrong NumArgs!");
1587 E->Constructor = readDeclAs<CXXConstructorDecl>();
1588 E->ParenOrBraceRange = readSourceRange();
1590 for (
unsigned I = 0; I != NumArgs; ++I)
1591 E->
setArg(I, Record.readSubExpr());
1596 E->Constructor = readDeclAs<CXXConstructorDecl>();
1597 E->Loc = readSourceLocation();
1598 E->ConstructsVirtualBase = Record.readInt();
1599 E->InheritedFromVirtualBase = Record.readInt();
1603 VisitCXXConstructExpr(E);
1604 E->TSI = readTypeSourceInfo();
1607 void ASTStmtReader::VisitLambdaExpr(
LambdaExpr *E) {
1609 unsigned NumCaptures = Record.readInt();
1610 assert(NumCaptures == E->NumCaptures);(void)NumCaptures;
1611 E->IntroducerRange = readSourceRange();
1613 E->CaptureDefaultLoc = readSourceLocation();
1614 E->ExplicitParams = Record.readInt();
1615 E->ExplicitResultType = Record.readInt();
1616 E->ClosingBrace = readSourceLocation();
1622 *C = Record.readSubExpr();
1628 E->SubExpr = Record.readSubExpr();
1632 VisitExplicitCastExpr(E);
1635 E->RParenLoc = R.
getEnd();
1636 R = readSourceRange();
1637 E->AngleBrackets = R;
1641 return VisitCXXNamedCastExpr(E);
1645 return VisitCXXNamedCastExpr(E);
1649 return VisitCXXNamedCastExpr(E);
1653 return VisitCXXNamedCastExpr(E);
1657 VisitExplicitCastExpr(E);
1663 VisitExplicitCastExpr(E);
1664 E->KWLoc = readSourceLocation();
1665 E->RParenLoc = readSourceLocation();
1670 E->UDSuffixLoc = readSourceLocation();
1689 readTypeSourceInfo());
1697 void ASTStmtReader::VisitCXXThisExpr(
CXXThisExpr *E) {
1703 void ASTStmtReader::VisitCXXThrowExpr(
CXXThrowExpr *E) {
1706 E->Operand = Record.readSubExpr();
1712 E->Param = readDeclAs<ParmVarDecl>();
1713 E->UsedContext = readDeclAs<DeclContext>();
1719 E->Field = readDeclAs<FieldDecl>();
1720 E->UsedContext = readDeclAs<DeclContext>();
1732 E->TypeInfo = readTypeSourceInfo();
1736 void ASTStmtReader::VisitCXXNewExpr(
CXXNewExpr *E) {
1739 bool IsArray = Record.readInt();
1740 bool HasInit = Record.readInt();
1741 unsigned NumPlacementArgs = Record.readInt();
1742 bool IsParenTypeId = Record.readInt();
1749 assert((IsArray == E->
isArray()) &&
"Wrong IsArray!");
1752 "Wrong NumPlacementArgs!");
1753 assert((IsParenTypeId == E->
isParenTypeId()) &&
"Wrong IsParenTypeId!");
1756 (void)NumPlacementArgs;
1760 E->AllocatedTypeInfo = readTypeSourceInfo();
1762 E->getTrailingObjects<
SourceRange>()[0] = readSourceRange();
1763 E->Range = readSourceRange();
1764 E->DirectInitRange = readSourceRange();
1770 *I = Record.readSubStmt();
1779 E->OperatorDelete = readDeclAs<FunctionDecl>();
1780 E->Argument = Record.readSubExpr();
1787 E->Base = Record.readSubExpr();
1788 E->IsArrow = Record.readInt();
1789 E->OperatorLoc = readSourceLocation();
1790 E->QualifierLoc = Record.readNestedNameSpecifierLoc();
1791 E->ScopeType = readTypeSourceInfo();
1792 E->ColonColonLoc = readSourceLocation();
1793 E->TildeLoc = readSourceLocation();
1805 unsigned NumObjects = Record.readInt();
1807 for (
unsigned i = 0; i != NumObjects; ++i)
1808 E->getTrailingObjects<
BlockDecl *>()[i] =
1809 readDeclAs<BlockDecl>();
1812 E->
SubExpr = Record.readSubExpr();
1815 void ASTStmtReader::VisitCXXDependentScopeMemberExpr(
1819 bool HasTemplateKWAndArgsInfo = Record.readInt();
1820 unsigned NumTemplateArgs = Record.readInt();
1821 bool HasFirstQualifierFoundInScope = Record.readInt();
1823 assert((HasTemplateKWAndArgsInfo == E->hasTemplateKWAndArgsInfo()) &&
1824 "Wrong HasTemplateKWAndArgsInfo!");
1826 (HasFirstQualifierFoundInScope == E->hasFirstQualifierFoundInScope()) &&
1827 "Wrong HasFirstQualifierFoundInScope!");
1829 if (HasTemplateKWAndArgsInfo)
1830 ReadTemplateKWAndArgsInfo(
1835 "Wrong NumTemplateArgs!");
1839 E->BaseType = Record.readType();
1840 E->QualifierLoc = Record.readNestedNameSpecifierLoc();
1841 E->Base = Record.readSubExpr();
1843 if (HasFirstQualifierFoundInScope)
1844 *E->getTrailingObjects<
NamedDecl *>() = readDeclAs<NamedDecl>();
1846 E->MemberNameInfo = Record.readDeclarationNameInfo();
1853 if (Record.readInt())
1854 ReadTemplateKWAndArgsInfo(
1859 E->QualifierLoc = Record.readNestedNameSpecifierLoc();
1860 E->NameInfo = Record.readDeclarationNameInfo();
1866 assert(Record.peekInt() == E->
arg_size() &&
1867 "Read wrong record during creation ?");
1869 for (
unsigned I = 0, N = E->
arg_size(); I != N; ++I)
1870 E->
setArg(I, Record.readSubExpr());
1871 E->TSI = readTypeSourceInfo();
1876 void ASTStmtReader::VisitOverloadExpr(
OverloadExpr *E) {
1879 unsigned NumResults = Record.readInt();
1880 bool HasTemplateKWAndArgsInfo = Record.readInt();
1881 assert((E->
getNumDecls() == NumResults) &&
"Wrong NumResults!");
1883 "Wrong HasTemplateKWAndArgsInfo!");
1885 if (HasTemplateKWAndArgsInfo) {
1886 unsigned NumTemplateArgs = Record.readInt();
1891 "Wrong NumTemplateArgs!");
1895 for (
unsigned I = 0; I != NumResults; ++I) {
1896 auto *D = readDeclAs<NamedDecl>();
1903 for (
unsigned I = 0; I != NumResults; ++I) {
1904 Results[I] = (Iter + I).getPair();
1907 E->NameInfo = Record.readDeclarationNameInfo();
1908 E->QualifierLoc = Record.readNestedNameSpecifierLoc();
1912 VisitOverloadExpr(E);
1915 E->Base = Record.readSubExpr();
1916 E->BaseType = Record.readType();
1917 E->OperatorLoc = readSourceLocation();
1921 VisitOverloadExpr(E);
1924 E->NamingClass = readDeclAs<CXXRecordDecl>();
1934 E->RParenLoc = Range.
getEnd();
1937 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I)
1938 Args[I] = readTypeSourceInfo();
1944 E->Value = (
unsigned int)Record.readInt();
1947 E->RParen = Range.
getEnd();
1948 E->QueriedType = readTypeSourceInfo();
1949 E->Dimension = Record.readSubExpr();
1955 E->Value = (
bool)Record.readInt();
1957 E->QueriedExpression = Record.readSubExpr();
1959 E->RParen = Range.
getEnd();
1965 E->Range = readSourceRange();
1966 E->Operand = Record.readSubExpr();
1971 E->EllipsisLoc = readSourceLocation();
1972 E->NumExpansions = Record.readInt();
1973 E->Pattern = Record.readSubExpr();
1978 unsigned NumPartialArgs = Record.readInt();
1979 E->OperatorLoc = readSourceLocation();
1980 E->PackLoc = readSourceLocation();
1981 E->RParenLoc = readSourceLocation();
1982 E->Pack = Record.readDeclAs<
NamedDecl>();
1984 assert(E->Length == NumPartialArgs);
1986 *E = I + NumPartialArgs;
1990 E->Length = Record.readInt();
1994 void ASTStmtReader::VisitSubstNonTypeTemplateParmExpr(
1997 E->Param = readDeclAs<NonTypeTemplateParmDecl>();
1999 E->Replacement = Record.readSubExpr();
2002 void ASTStmtReader::VisitSubstNonTypeTemplateParmPackExpr(
2005 E->Param = readDeclAs<NonTypeTemplateParmDecl>();
2011 E->NumArguments = ArgPack.pack_size();
2012 E->NameLoc = readSourceLocation();
2017 E->NumParameters = Record.readInt();
2018 E->ParamPack = readDeclAs<ParmVarDecl>();
2019 E->NameLoc = readSourceLocation();
2020 auto **Parms = E->getTrailingObjects<
VarDecl *>();
2021 for (
unsigned i = 0, n = E->NumParameters; i != n; ++i)
2022 Parms[i] = readDeclAs<VarDecl>();
2027 bool HasMaterialzedDecl = Record.readInt();
2028 if (HasMaterialzedDecl)
2029 E->State = cast<LifetimeExtendedTemporaryDecl>(Record.readDecl());
2031 E->State = Record.readSubExpr();
2034 void ASTStmtReader::VisitCXXFoldExpr(
CXXFoldExpr *E) {
2036 E->LParenLoc = readSourceLocation();
2037 E->EllipsisLoc = readSourceLocation();
2038 E->RParenLoc = readSourceLocation();
2039 E->NumExpansions = Record.readInt();
2040 E->SubExprs[0] = Record.readSubExpr();
2041 E->SubExprs[1] = Record.readSubExpr();
2047 E->SourceExpr = Record.readSubExpr();
2052 void ASTStmtReader::VisitTypoExpr(
TypoExpr *E) {
2053 llvm_unreachable(
"Cannot read TypoExpr nodes");
2061 E->IsArrow = (Record.readInt() != 0);
2062 E->BaseExpr = Record.readSubExpr();
2063 E->QualifierLoc = Record.readNestedNameSpecifierLoc();
2064 E->MemberLoc = readSourceLocation();
2065 E->TheDecl = readDeclAs<MSPropertyDecl>();
2070 E->setBase(Record.readSubExpr());
2071 E->setIdx(Record.readSubExpr());
2078 std::string UuidStr = readString();
2079 E->
setUuidStr(StringRef(UuidStr).copy(Record.getContext()));
2082 readTypeSourceInfo());
2090 void ASTStmtReader::VisitSEHLeaveStmt(
SEHLeaveStmt *S) {
2097 S->Loc = readSourceLocation();
2098 S->Children[SEHExceptStmt::FILTER_EXPR] = Record.readSubStmt();
2099 S->Children[SEHExceptStmt::BLOCK] = Record.readSubStmt();
2104 S->Loc = readSourceLocation();
2105 S->Block = Record.readSubStmt();
2108 void ASTStmtReader::VisitSEHTryStmt(
SEHTryStmt *S) {
2110 S->IsCXXTry = Record.readInt();
2111 S->TryLoc = readSourceLocation();
2112 S->Children[SEHTryStmt::TRY] = Record.readSubStmt();
2113 S->Children[SEHTryStmt::HANDLER] = Record.readSubStmt();
2122 E->
setPreArg(CUDAKernelCallExpr::CONFIG, Record.readSubExpr());
2128 void ASTStmtReader::VisitAsTypeExpr(
AsTypeExpr *E) {
2130 E->BuiltinLoc = readSourceLocation();
2131 E->RParenLoc = readSourceLocation();
2132 E->SrcExpr = Record.readSubExpr();
2144 Clauses.push_back(Record.readOMPClause());
2154 VisitOMPExecutableDirective(D);
2159 D->
setCond(Record.readSubExpr());
2160 D->
setInit(Record.readSubExpr());
2161 D->
setInc(Record.readSubExpr());
2192 Sub.reserve(CollapsedNum);
2193 for (
unsigned i = 0; i < CollapsedNum; ++i)
2194 Sub.push_back(Record.readSubExpr());
2197 for (
unsigned i = 0; i < CollapsedNum; ++i)
2198 Sub.push_back(Record.readSubExpr());
2201 for (
unsigned i = 0; i < CollapsedNum; ++i)
2202 Sub.push_back(Record.readSubExpr());
2205 for (
unsigned i = 0; i < CollapsedNum; ++i)
2206 Sub.push_back(Record.readSubExpr());
2209 for (
unsigned i = 0; i < CollapsedNum; ++i)
2210 Sub.push_back(Record.readSubExpr());
2213 for (
unsigned i = 0; i < CollapsedNum; ++i)
2214 Sub.push_back(Record.readSubExpr());
2217 for (
unsigned i = 0; i < CollapsedNum; ++i)
2218 Sub.push_back(Record.readSubExpr());
2221 for (
unsigned i = 0; i < CollapsedNum; ++i)
2222 Sub.push_back(Record.readSubExpr());
2230 VisitOMPExecutableDirective(D);
2231 D->setHasCancel(Record.readInt());
2235 VisitOMPLoopDirective(D);
2239 VisitOMPLoopDirective(D);
2240 D->setHasCancel(Record.readInt());
2244 VisitOMPLoopDirective(D);
2251 VisitOMPExecutableDirective(D);
2252 D->setHasCancel(Record.readInt());
2257 VisitOMPExecutableDirective(D);
2265 VisitOMPExecutableDirective(D);
2270 VisitOMPExecutableDirective(D);
2277 VisitOMPExecutableDirective(D);
2278 D->DirName = Record.readDeclarationNameInfo();
2282 VisitOMPLoopDirective(D);
2283 D->setHasCancel(Record.readInt());
2286 void ASTStmtReader::VisitOMPParallelForSimdDirective(
2288 VisitOMPLoopDirective(D);
2291 void ASTStmtReader::VisitOMPParallelMasterDirective(
2296 VisitOMPExecutableDirective(D);
2299 void ASTStmtReader::VisitOMPParallelSectionsDirective(
2304 VisitOMPExecutableDirective(D);
2305 D->setHasCancel(Record.readInt());
2312 VisitOMPExecutableDirective(D);
2313 D->setHasCancel(Record.readInt());
2318 VisitOMPExecutableDirective(D);
2323 VisitOMPExecutableDirective(D);
2328 VisitOMPExecutableDirective(D);
2335 VisitOMPExecutableDirective(D);
2336 D->setReductionRef(Record.readSubExpr());
2343 VisitOMPExecutableDirective(D);
2350 VisitOMPExecutableDirective(D);
2357 VisitOMPExecutableDirective(D);
2358 D->setX(Record.readSubExpr());
2359 D->setV(Record.readSubExpr());
2360 D->setExpr(Record.readSubExpr());
2361 D->setUpdateExpr(Record.readSubExpr());
2362 D->IsXLHSInRHSPart = Record.readInt() != 0;
2363 D->IsPostfixUpdate = Record.readInt() != 0;
2370 VisitOMPExecutableDirective(D);
2376 VisitOMPExecutableDirective(D);
2379 void ASTStmtReader::VisitOMPTargetEnterDataDirective(
2383 VisitOMPExecutableDirective(D);
2386 void ASTStmtReader::VisitOMPTargetExitDataDirective(
2390 VisitOMPExecutableDirective(D);
2393 void ASTStmtReader::VisitOMPTargetParallelDirective(
2397 VisitOMPExecutableDirective(D);
2400 void ASTStmtReader::VisitOMPTargetParallelForDirective(
2402 VisitOMPLoopDirective(D);
2403 D->setHasCancel(Record.readInt());
2410 VisitOMPExecutableDirective(D);
2413 void ASTStmtReader::VisitOMPCancellationPointDirective(
2416 VisitOMPExecutableDirective(D);
2417 D->setCancelRegion(static_cast<OpenMPDirectiveKind>(Record.readInt()));
2424 VisitOMPExecutableDirective(D);
2425 D->setCancelRegion(static_cast<OpenMPDirectiveKind>(Record.readInt()));
2429 VisitOMPLoopDirective(D);
2433 VisitOMPLoopDirective(D);
2436 void ASTStmtReader::VisitOMPMasterTaskLoopDirective(
2438 VisitOMPLoopDirective(D);
2441 void ASTStmtReader::VisitOMPMasterTaskLoopSimdDirective(
2443 VisitOMPLoopDirective(D);
2446 void ASTStmtReader::VisitOMPParallelMasterTaskLoopDirective(
2448 VisitOMPLoopDirective(D);
2451 void ASTStmtReader::VisitOMPParallelMasterTaskLoopSimdDirective(
2453 VisitOMPLoopDirective(D);
2457 VisitOMPLoopDirective(D);
2463 VisitOMPExecutableDirective(D);
2466 void ASTStmtReader::VisitOMPDistributeParallelForDirective(
2468 VisitOMPLoopDirective(D);
2469 D->setHasCancel(Record.readInt());
2472 void ASTStmtReader::VisitOMPDistributeParallelForSimdDirective(
2474 VisitOMPLoopDirective(D);
2477 void ASTStmtReader::VisitOMPDistributeSimdDirective(
2479 VisitOMPLoopDirective(D);
2482 void ASTStmtReader::VisitOMPTargetParallelForSimdDirective(
2484 VisitOMPLoopDirective(D);
2488 VisitOMPLoopDirective(D);
2491 void ASTStmtReader::VisitOMPTeamsDistributeDirective(
2493 VisitOMPLoopDirective(D);
2496 void ASTStmtReader::VisitOMPTeamsDistributeSimdDirective(
2498 VisitOMPLoopDirective(D);
2501 void ASTStmtReader::VisitOMPTeamsDistributeParallelForSimdDirective(
2503 VisitOMPLoopDirective(D);
2506 void ASTStmtReader::VisitOMPTeamsDistributeParallelForDirective(
2508 VisitOMPLoopDirective(D);
2509 D->setHasCancel(Record.readInt());
2516 VisitOMPExecutableDirective(D);
2519 void ASTStmtReader::VisitOMPTargetTeamsDistributeDirective(
2521 VisitOMPLoopDirective(D);
2524 void ASTStmtReader::VisitOMPTargetTeamsDistributeParallelForDirective(
2526 VisitOMPLoopDirective(D);
2527 D->setHasCancel(Record.readInt());
2530 void ASTStmtReader::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
2532 VisitOMPLoopDirective(D);
2535 void ASTStmtReader::VisitOMPTargetTeamsDistributeSimdDirective(
2537 VisitOMPLoopDirective(D);
2545 switch (ReadingKind) {
2547 llvm_unreachable(
"should not call this when not reading anything");
2550 return ReadStmtFromStream(F);
2552 return ReadSubStmt();
2555 llvm_unreachable(
"ReadingKind not set ?");
2559 return cast_or_null<Expr>(ReadStmt(F));
2563 return cast_or_null<Expr>(ReadSubStmt());
2574 ReadingKindTracker ReadingKind(Read_Stmt, *
this);
2579 llvm::DenseMap<uint64_t, Stmt *> StmtEntries;
2582 unsigned PrevNumStmts = StmtStack.size();
2591 Cursor.advanceSkippingSubblocks();
2596 llvm::BitstreamEntry Entry = MaybeEntry.get();
2598 switch (Entry.Kind) {
2599 case llvm::BitstreamEntry::SubBlock:
2601 Error(
"malformed block record in AST file");
2603 case llvm::BitstreamEntry::EndBlock:
2605 case llvm::BitstreamEntry::Record:
2612 bool Finished =
false;
2613 bool IsStmtReference =
false;
2615 if (!MaybeStmtCode) {
2619 switch ((
StmtCode)MaybeStmtCode.get()) {
2625 IsStmtReference =
true;
2626 assert(StmtEntries.find(Record[0]) != StmtEntries.end() &&
2627 "No stmt was recorded for this offset reference!");
2628 S = StmtEntries[Record.
readInt()];
2647 Record[ASTStmtReader::NumStmtFields + 3]);
2661 Record[ASTStmtReader::NumStmtFields]);
2667 Record[ASTStmtReader::NumStmtFields + 1],
2668 Record[ASTStmtReader::NumStmtFields + 2],
2669 Record[ASTStmtReader::NumStmtFields + 3]);
2675 Record[ASTStmtReader::NumStmtFields],
2676 Record[ASTStmtReader::NumStmtFields + 1]);
2682 Record[ASTStmtReader::NumStmtFields]);
2686 S =
new (Context)
DoStmt(Empty);
2690 S =
new (Context)
ForStmt(Empty);
2711 Context, Record[ASTStmtReader::NumStmtFields]);
2728 Context, Record[ASTStmtReader::NumStmtFields]);
2734 static_cast<ConstantExpr::ResultStorageKind>(
2742 Record[ASTStmtReader::NumExprFields]);
2748 Record[ASTStmtReader::NumExprFields],
2749 Record[ASTStmtReader::NumExprFields + 1],
2750 Record[ASTStmtReader::NumExprFields + 2],
2751 Record[ASTStmtReader::NumExprFields + 2] ?
2752 Record[ASTStmtReader::NumExprFields + 6] : 0);
2770 Record[ASTStmtReader::NumExprFields],
2771 Record[ASTStmtReader::NumExprFields + 1],
2772 Record[ASTStmtReader::NumExprFields + 2]);
2786 Record[ASTStmtReader::NumExprFields]);
2795 Record[ASTStmtReader::NumExprFields],
2796 Record[ASTStmtReader::NumExprFields + 1]);
2813 Context, Record[ASTStmtReader::NumExprFields], Empty);
2818 Record[ASTStmtReader::NumExprFields + 1],
2819 Record[ASTStmtReader::NumExprFields + 2],
2820 Record[ASTStmtReader::NumExprFields + 3]);
2841 Record[ASTStmtReader::NumExprFields]);
2846 Record[ASTStmtReader::NumExprFields]);
2863 Record[ASTStmtReader::NumExprFields] - 1);
2926 Record[ASTStmtReader::NumExprFields]);
2939 Record[ASTStmtReader::NumExprFields]);
2944 Record[ASTStmtReader::NumExprFields],
2945 Record[ASTStmtReader::NumExprFields + 1]);
2973 llvm_unreachable(
"mismatching AST file");
2977 Record[ASTStmtReader::NumExprFields],
2978 Record[ASTStmtReader::NumExprFields + 1]);
3007 Record[ASTStmtReader::NumStmtFields],
3008 Record[ASTStmtReader::NumStmtFields + 1]);
3053 Record[ASTStmtReader::NumStmtFields]);
3070 Record[ASTStmtReader::NumStmtFields],
3076 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3078 CollapsedNum, Empty);
3084 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3092 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3100 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3109 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3118 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3123 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3125 CollapsedNum, Empty);
3131 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3133 CollapsedNum, Empty);
3139 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3144 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3149 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3166 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3171 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3176 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3181 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3186 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3191 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3196 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3201 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3206 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3211 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3213 CollapsedNum, Empty);
3219 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3224 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3233 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3238 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3246 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3248 CollapsedNum, Empty);
3254 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3256 CollapsedNum, Empty);
3262 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3264 CollapsedNum, Empty);
3270 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3272 CollapsedNum, Empty);
3278 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3280 Context, NumClauses, CollapsedNum, Empty);
3286 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3294 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3296 CollapsedNum, Empty);
3302 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3311 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3313 CollapsedNum, Empty);
3319 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3321 CollapsedNum, Empty);
3327 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3335 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3337 CollapsedNum, Empty);
3343 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3345 CollapsedNum, Empty);
3351 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3353 Context, NumClauses, CollapsedNum, Empty);
3359 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3361 Context, NumClauses, CollapsedNum, Empty);
3367 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3372 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3374 CollapsedNum, Empty);
3380 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3382 Context, NumClauses, CollapsedNum, Empty);
3388 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3390 Context, NumClauses, CollapsedNum, Empty);
3396 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3398 Context, NumClauses, CollapsedNum, Empty);
3404 Context, Record[ASTStmtReader::NumExprFields], Empty);
3409 Context, Record[ASTStmtReader::NumExprFields], Empty);
3419 Record[ASTStmtReader::NumExprFields]);
3429 Record[ASTStmtReader::NumExprFields]);
3434 Record[ASTStmtReader::NumExprFields]);
3439 Record[ASTStmtReader::NumExprFields]);
3444 Record[ASTStmtReader::NumExprFields]);
3453 Record[ASTStmtReader::NumExprFields]);
3458 Context, Record[ASTStmtReader::NumExprFields], Empty);
3524 Record[ASTStmtReader::NumExprFields],
3525 Record[ASTStmtReader::NumExprFields + 1],
3526 Record[ASTStmtReader::NumExprFields + 2],
3527 Record[ASTStmtReader::NumExprFields + 3]);
3540 Record[ASTStmtReader::NumExprFields]);
3546 Record[ASTStmtReader::NumExprFields],
3547 Record[ASTStmtReader::NumExprFields + 1],
3549 Record[ASTStmtReader::NumExprFields + 2]);
3554 Record[ASTStmtReader::NumExprFields],
3555 Record[ASTStmtReader::NumExprFields]
3556 ? Record[ASTStmtReader::NumExprFields + 1]
3562 Record[ASTStmtReader::NumExprFields]);
3568 Record[ASTStmtReader::NumExprFields],
3569 Record[ASTStmtReader::NumExprFields + 1],
3571 Record[ASTStmtReader::NumExprFields + 1]
3572 ? Record[ASTStmtReader::NumExprFields + 2]
3579 Record[ASTStmtReader::NumExprFields],
3580 Record[ASTStmtReader::NumExprFields + 1],
3582 Record[ASTStmtReader::NumExprFields + 1]
3583 ? Record[ASTStmtReader::NumExprFields + 2]
3589 Record[ASTStmtReader::NumExprFields]);
3611 Record[ASTStmtReader::NumExprFields]);
3624 Record[ASTStmtReader::NumExprFields]);
3641 Context, Record[ASTStmtReader::NumExprFields], Empty);
3694 unsigned numRequirement = Record[ASTStmtReader::NumExprFields + 1];
3704 ++NumStatementsRead;
3706 if (S && !IsStmtReference) {
3708 StmtEntries[Cursor.GetCurrentBitNo()] = S;
3712 "Invalid deserialization of statement");
3713 StmtStack.push_back(S);
3716 assert(StmtStack.size() > PrevNumStmts &&
"Read too many sub-stmts!");
3717 assert(StmtStack.size() == PrevNumStmts + 1 &&
"Extra expressions on stack!");
3718 return StmtStack.pop_back_val();
void setPreInits(Stmt *PreInits)
void setCombinedParForInDistCond(Expr *CombParForInDistCond)
A CXXConstCastExpr record.
static AttributedStmt * CreateEmpty(const ASTContext &C, unsigned NumAttrs)
void setFPFeatures(FPOptions F)
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
A call to an overloaded operator written using operator syntax.
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
The receiver is the instance of the superclass object.
Represents a single C99 designator.
void setConditionVariable(const ASTContext &C, VarDecl *V)
static DependentScopeDeclRefExpr * CreateEmpty(const ASTContext &Context, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
void setValueDependent(bool VD)
Set whether this expression is value-dependent or not.
Defines the clang::ASTContext interface.
void setIsOMPStructuredBlock(bool IsOMPStructuredBlock)
void setRParenLoc(SourceLocation L)
A CompoundLiteralExpr record.
This represents '#pragma omp distribute simd' composite directive.
This represents '#pragma omp master' directive.
ConstantExprBitfields ConstantExprBits
DesignatorTypes
The kinds of designators that can occur in a DesignatedInitExpr.
void setRangeStmt(Stmt *S)
SourceLocation readSourceLocation()
Read a source location, advancing Idx.
The null pointer literal (C++11 [lex.nullptr])
unsigned getNumDecls() const
Gets the number of declarations in the unresolved set.
This represents '#pragma omp task' directive.
void setEnsureUpperBound(Expr *EUB)
This represents a GCC inline-assembly statement extension.
static CXXConstructExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs)
Create an empty C++ construction expression.
Represents a 'co_await' expression while the type of the promise is dependent.
void setSubStmt(CompoundStmt *S)
static OMPMasterTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
A UserDefinedLiteral record.
The receiver is an object instance.
unsigned getNumInputs() const
static OMPMasterDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
UnresolvedMemberExprBitfields UnresolvedMemberExprBits
An IndirectGotoStmt record.
A (possibly-)qualified type.
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument.
StringKind getKind() const
void setOperatorLoc(SourceLocation L)
CXXDeleteExprBitfields CXXDeleteExprBits
void setNRVOCandidate(const VarDecl *Var)
Set the variable that might be used for the named return value optimization.
Defines enumerations for the type traits support.
void setLocation(SourceLocation L)
A requires-expression requirement which queries the validity and properties of an expression ('simple...
A CXXStaticCastExpr record.
ASTStmtReader(ASTRecordReader &Record, llvm::BitstreamCursor &Cursor)
void setCombinedCond(Expr *CombCond)
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
An AttributedStmt record.
A CXXReinterpretCastExpr record.
An ObjCBoolLiteralExpr record.
void setCombinedLowerBoundVariable(Expr *CombLB)
static OMPTaskwaitDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static OMPTargetParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static ConstraintSatisfaction readConstraintSatisfaction(ASTRecordReader &Record)
void setHasCancel(bool Has)
Set cancel state.
Represents a 'co_return' statement in the C++ Coroutines TS.
Stmt - This represents one statement.
static OMPTaskgroupDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
void setLastIteration(Expr *LI)
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
IfStmt - This represents an if/then/else.
void setPrivateCounters(ArrayRef< Expr *> A)
C Language Family Type Representation.
unsigned getNumOutputs() const
This represents '#pragma omp for simd' directive.
void setOpcode(Opcode Opc)
void setRParenLoc(SourceLocation L)
void setContinueLoc(SourceLocation L)
void setThrowExpr(Stmt *S)
void setAtLoc(SourceLocation L)
An ImplicitValueInitExpr record.
Decl - This represents one declaration (or definition), e.g.
void setDeclGroup(DeclGroupRef DGR)
An ImplicitCastExpr record.
This represents '#pragma omp teams distribute parallel for' composite directive.
void setRBracket(SourceLocation RB)
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Defines the C++ template declaration subclasses.
void setPrevEnsureUpperBound(Expr *PrevEUB)
This represents '#pragma omp parallel master' directive.
unsigned getNumSubExprs() const
Retrieve the total number of subexpressions in this designated initializer expression, including the actual initialized value and any expressions that occur within array and array-range designators.
Represents an attribute applied to a statement.
void setUpperBoundVariable(Expr *UB)
void setComputationResultType(QualType T)
void setNumIterations(Expr *NI)
ParenExpr - This represents a parethesized expression, e.g.
A CXXOperatorCallExpr record.
void setSuper(SourceLocation Loc, QualType T, bool IsInstanceSuper)
This represents '#pragma omp target teams distribute' combined directive.
A CXXTemporaryObjectExpr record.
Represents Objective-C's @throw statement.
static OMPParallelMasterDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setNextLowerBound(Expr *NLB)
static RequiresExpr * Create(ASTContext &C, SourceLocation RequiresKWLoc, RequiresExprBodyDecl *Body, ArrayRef< ParmVarDecl *> LocalParameters, ArrayRef< concepts::Requirement *> Requirements, SourceLocation RBraceLoc)
DeclRefExprBitfields DeclRefExprBits
Represents a call to a C++ constructor.
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
void setADLCallKind(ADLCallKind V=UsesADL)
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent...
A constant expression context.
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
A container of type source information.
void setSwitchCaseList(SwitchCase *SC)
void setCanOverflow(bool C)
void setInstanceReceiver(Expr *rec)
Turn this message send into an instance message that computes the receiver object with the given expr...
Floating point control options.
This represents '#pragma omp parallel for' directive.
MS property subscript expression.
void setStartLoc(SourceLocation L)
void setForLoc(SourceLocation L)
This represents '#pragma omp target teams distribute parallel for' combined directive.
static ObjCDictionaryLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements, bool HasPackExpansions)
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
void setLocation(SourceLocation L)
void setDependentInits(ArrayRef< Expr *> A)
void setDelegateInitCall(bool isDelegate)
void setProtocol(ObjCProtocolDecl *P)
void setRParenLoc(SourceLocation L)
void setIsLastIterVariable(Expr *IL)
This represents '#pragma omp target exit data' directive.
void setRAngleLoc(SourceLocation Loc)
static OffsetOfExpr * CreateEmpty(const ASTContext &C, unsigned NumComps, unsigned NumExprs)
static OMPTargetTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represents a variable declaration or definition.
static OMPParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for N clauses.
bool hasTemplateKWAndArgsInfo() const
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
void setIsPartOfExplicitCast(bool PartOfExplicitCast)
CompoundLiteralExpr - [C99 6.5.2.5].
void setSubExpr(unsigned Idx, Expr *E)
void setInitializer(Expr *E)
void setLength(Expr *E)
Set length of the array section.
void setOpLoc(SourceLocation L)
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
static FunctionParmPackExpr * CreateEmpty(const ASTContext &Context, unsigned NumParams)
void setAsmLoc(SourceLocation L)
AttributedStmtBitfields AttributedStmtBits
static PredefinedExpr * CreateEmpty(const ASTContext &Ctx, bool HasFunctionName)
Create an empty PredefinedExpr.
void setCombinedDistCond(Expr *CombDistCond)
void setValue(unsigned Val)
A ConditionOperator record.
ASTConstraintSatisfaction * Satisfaction
Information about the satisfaction of the named concept with the given arguments. ...
void setLocation(SourceLocation Location)
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
static DeclRefExpr * CreateEmpty(const ASTContext &Context, bool HasQualifier, bool HasFoundDecl, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Construct an empty declaration reference expression.
Stores a list of template parameters for a TemplateDecl and its derived classes.
unsigned getNumPlacementArgs() const
void setGNUSyntax(bool GNU)
Defines the Objective-C statement AST node classes.
A CXXConstructExpr record.
unsigned getNumExpressions() const
void setBeginStmt(Stmt *S)
void setBase(Expr *E)
Set base of the array section.
ReceiverKind
The kind of receiver this message is sending to.
raw_arg_iterator raw_arg_begin()
A C++ throw-expression (C++ [except.throw]).
Represents an expression – generally a full-expression – that introduces cleanups to be run at the ...
Represents a parameter to a function.
Defines the clang::Expr interface and subclasses for C++ expressions.
A ShuffleVectorExpr record.
A C++ static_cast expression (C++ [expr.static.cast]).
LabelStmt - Represents a label, which has a substatement.
static OMPTargetExitDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
void setAtLoc(SourceLocation L)
Represents a C99 designated initializer expression.
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
static OMPTargetTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
One of these records is kept for each identifier that is lexed.
An ObjCAtThrowStmt record.
T * readDeclAs()
Reads a declaration from the given position in the record, advancing Idx.
static OMPTargetDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represents a function call to one of __builtin_LINE(), __builtin_COLUMN(), __builtin_FUNCTION(), or __builtin_FILE().
A DesignatedInitExpr record.
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
This represents '#pragma omp parallel' directive.
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
void setExprOperand(Expr *E)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
A C++ nested-name-specifier augmented with source location information.
static OMPTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Internal struct for storing Key/value pair.
static std::string toString(const clang::SanitizerSet &Sanitizers)
Produce a string containing comma-separated names of sanitizers in Sanitizers set.
An ObjCProtocolExpr record.
An ObjCSelectorExpr record.
static OMPTargetParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
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 setIsMicrosoftABI(bool IsMS)
Represents a place-holder for an object not to be initialized by anything.
Expr * readExpr()
Reads an expression.
static OMPFlushDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
void setArg(unsigned I, Expr *E)
void setArg(unsigned Arg, Expr *ArgExpr)
setArg - Set the specified argument.
The iterator over UnresolvedSets.
void setRParen(SourceLocation Loc)
This represents '#pragma omp target simd' directive.
void setCapturedDecl(CapturedDecl *D)
Set the outlined function declaration.
void setReturnLoc(SourceLocation L)
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
Defines some OpenMP-specific enums and functions.
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
OpenMPDirectiveKind getDirectiveKind() const
void setIfLoc(SourceLocation IfLoc)
This represents '#pragma omp barrier' directive.
void setComponent(unsigned Idx, OffsetOfNode ON)
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp, [NSNumber numberWithInt:42]];.
unsigned getCharByteWidth() const
This is a common base class for loop directives ('omp simd', 'omp for', 'omp for simd' etc...
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
This represents '#pragma omp critical' directive.
static OMPCriticalDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
void setRParenLoc(SourceLocation L)
size_t size() const
The length of this record.
void setSubExpr(Expr *E)
As with any mutator of the AST, be very careful when modifying an existing AST to preserve its invari...
Represents Objective-C's @catch statement.
void setLBraceLoc(SourceLocation Loc)
static OMPTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
IndirectGotoStmt - This represents an indirect goto.
Describes an C or C++ initializer list.
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
This represents '#pragma omp distribute parallel for' composite directive.
void setValue(const ASTContext &C, const llvm::APInt &Val)
This represents '#pragma omp teams distribute parallel for simd' composite directive.
void setBuiltinLoc(SourceLocation L)
unsigned getLength() const
ForStmt - This represents a 'for (init;cond;inc)' stmt.
void setOperatorNew(FunctionDecl *D)
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
void setLocation(SourceLocation L)
CXXScalarValueInitExprBitfields CXXScalarValueInitExprBits
static OMPDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setSynchBody(Stmt *S)
A convenient class for passing around template argument information.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
void setSelector(Selector S)
A reference to a previously [de]serialized Stmt record.
void setEndLoc(SourceLocation L)
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
path_iterator path_begin()
void setLocation(SourceLocation L)
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
A builtin binary operation expression such as "x + y" or "x <= y".
static OMPTargetTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setAccessor(IdentifierInfo *II)
CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for statement, represented as 'for (ra...
static OMPParallelMasterTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
SourceRange readSourceRange()
Read a source range, advancing Idx.
static const unsigned NumStmtFields
The number of record fields required for the Stmt class itself.
This represents '#pragma omp cancellation point' directive.
void setString(StringLiteral *S)
void setAsmString(StringLiteral *E)
ObjCStringLiteral, used for Objective-C string literals i.e.
std::pair< SourceLocation, StringRef > SubstitutionDiagnostic
CaseStmt - Represent a case statement.
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
void setCombinedInit(Expr *CombInit)
This represents '#pragma omp teams' directive.
void setOperatorLoc(SourceLocation L)
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Helper class for OffsetOfExpr.
A marker record that indicates that we are at the end of an expression.
This represents '#pragma omp teams distribute simd' combined directive.
static OMPTargetParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represents binding an expression to a temporary.
void setDestroyedType(IdentifierInfo *II, SourceLocation Loc)
Set the name of destroyed type for a dependent pseudo-destructor expression.
ArrayTypeTrait
Names for the array type traits.
const llvm::fltSemantics & getSemantics() const
Return the APFloat semantics this literal uses.
bool isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a worksharing directive.
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
static OMPTaskyieldDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
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'.
void setOpcode(Opcode Opc)
void ReadTemplateKWAndArgsInfo(ASTTemplateKWAndArgsInfo &Args, TemplateArgumentLoc *ArgsLocArray, unsigned NumTemplateArgs)
Read and initialize a ExplicitTemplateArgumentList structure.
DeclAccessPair * getTrailingResults()
Return the results. Defined after UnresolvedMemberExpr.
Represents a C++ member access expression where the actual member referenced could not be resolved be...
static OMPParallelMasterTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setRParenLoc(SourceLocation Loc)
void setRParenLoc(SourceLocation R)
A default argument (C++ [dcl.fct.default]).
bool isTypeOperand() const
void setSourceRange(SourceRange R)
void setRParenLoc(SourceLocation L)
Represents the this expression in C++.
void setCastKind(CastKind K)
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
static OMPTargetDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
static OMPTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
PredefinedExprBitfields PredefinedExprBits
void setEqualOrColonLoc(SourceLocation L)
This represents '#pragma omp target parallel for simd' directive.
void setDependentCounters(ArrayRef< Expr *> A)
void setArgument(Expr *E)
OpenMP 4.0 [2.4, Array Sections].
void setTypeSourceInfo(TypeSourceInfo *tsi)
ConditionalOperator - The ?: ternary operator.
static OMPTargetSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
TypeSourceInfo * readTypeSourceInfo()
Reads a declarator info from the given record, advancing Idx.
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
void setAmpAmpLoc(SourceLocation L)
void setBreakLoc(SourceLocation L)
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
CompoundStmt - This represents a group of statements like { stmt stmt }.
A requires-expression requirement which queries the existence of a type name or type template special...
void setBlockDecl(BlockDecl *BD)
This represents '#pragma omp taskgroup' directive.
static OMPSingleDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
CastKind
CastKind - The kind of operation required for a conversion.
void setSemiLoc(SourceLocation L)
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
void setLParen(SourceLocation Loc)
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
Represents a call to the builtin function __builtin_va_arg.
The result of a constraint satisfaction check, containing the necessary information to diagnose an un...
static OMPTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setLeaveLoc(SourceLocation L)
void setConditionVariable(const ASTContext &Ctx, VarDecl *V)
Set the condition variable for this if statement.
This represents '#pragma omp distribute' directive.
SubstNonTypeTemplateParmExprBitfields SubstNonTypeTemplateParmExprBits
void setInits(ArrayRef< Expr *> A)
void setOperatorDelete(FunctionDecl *D)
void setRParenLoc(SourceLocation L)
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type...
void setLocation(SourceLocation Location)
void setRParenLoc(SourceLocation Loc)
Represents a block literal declaration, which is like an unnamed FunctionDecl.
static OMPSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
This represents one expression.
Defines the clang::LangOptions interface.
CXXRewrittenBinaryOperatorBitfields CXXRewrittenBinaryOperatorBits
void setDesignators(const ASTContext &C, const Designator *Desigs, unsigned NumDesigs)
void setRBraceLoc(SourceLocation Loc)
void setIsImplicit(bool value=true)
void setWhileLoc(SourceLocation L)
Represents the body of a requires-expression.
void setRParenLoc(SourceLocation L)
void setLParenLoc(SourceLocation L)
Stmt * ReadStmt(ModuleFile &F)
Reads a statement.
static CXXMemberCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, EmptyShell Empty)
This represents '#pragma omp master taskloop' directive.
static OMPMasterTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setSyntacticForm(InitListExpr *Init)
Represents a C++ functional cast expression that builds a temporary object.
static ReturnStmt * CreateEmpty(const ASTContext &Ctx, bool HasNRVOCandidate)
Create an empty return statement, optionally with storage for an NRVO candidate.
void setRBracketLoc(SourceLocation L)
A C++ const_cast expression (C++ [expr.const.cast]).
void setTypeDependent(bool TD)
Set whether this expression is type-dependent or not.
void setTypeOperandSourceInfo(TypeSourceInfo *TSI)
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Field designator where only the field name is known.
static OMPDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Expected< unsigned > readRecord(llvm::BitstreamCursor &Cursor, unsigned AbbrevID)
Reads a record with id AbbrevID from Cursor, resetting the internal state.
An ObjCSubscriptRefExpr record.
Defines an enumeration for C++ overloaded operators.
This represents '#pragma omp target teams distribute parallel for simd' combined directive.
raw_arg_iterator raw_arg_end()
static CXXReinterpretCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
void setUuidStr(StringRef US)
void setWrittenTypeInfo(TypeSourceInfo *TI)
void setRetValue(Expr *E)
unsigned getNumTemplateArgs() const
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
void setObjectKind(ExprObjectKind Cat)
setObjectKind - Set the object kind produced by this expression.
bool hasQualifier() const
Determine whether this declaration reference was preceded by a C++ nested-name-specifier, e.g., N::foo.
static UserDefinedLiteral * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, EmptyShell Empty)
Represents Objective-C's @synchronized statement.
ObjCSelectorExpr used for @selector in Objective-C.
A CXXStdInitializerListExpr record.
void setFinallyBody(Stmt *S)
Represents an expression that computes the length of a parameter pack.
CXXTryStmt - A C++ try block, including all handlers.
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
An ArraySubscriptExpr record.
Decl * readDecl()
Reads a declaration from the given position in a record in the given module, advancing Idx...
static FloatingLiteral * Create(const ASTContext &C, const llvm::APFloat &V, bool isexact, QualType Type, SourceLocation L)
This represents '#pragma omp target teams distribute simd' combined directive.
CXXDefaultInitExprBitfields CXXDefaultInitExprBits
Information about a module that has been loaded by the ASTReader.
ExprWithCleanupsBitfields ExprWithCleanupsBits
An ArrayInitLoopExpr record.
unsigned getNumClauses() const
Get number of clauses.
A PseudoObjectExpr record.
void setColonLoc(SourceLocation L)
void setFinallyStmt(Stmt *S)
Extra data stored in some MemberExpr objects.
CompoundStmtBitfields CompoundStmtBits
An ObjCIndirectCopyRestoreExpr record.
This represents '#pragma omp for' directive.
static OMPTargetEnterDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
void setValueKind(ExprValueKind Cat)
setValueKind - Set the value kind produced by this expression.
StringLiteralBitfields StringLiteralBits
void setRParenLoc(SourceLocation L)
bool hasInitializer() const
Whether this new-expression has any initializer at all.
Represents a folding of a pack over an operator.
ReturnStmt - This represents a return, optionally of an expression: return; return 4;...
This represents '#pragma omp target teams' directive.
void setAssociatedStmt(Stmt *S)
Set the associated statement for the directive.
static OMPDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
An expression that sends a message to the given Objective-C object or class.
This represents a Microsoft inline-assembly statement extension.
void setColonLoc(SourceLocation L)
void setRParenLoc(SourceLocation L)
A DesignatedInitUpdateExpr record.
SourceLocation getEnd() const
void setAtLoc(SourceLocation L)
UnaryOperator - This represents the unary-expression's (except sizeof and alignof), the postinc/postdec operators from postfix-expression, and various extensions.
bool isOpenMPTaskLoopDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a taskloop directive.
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
A member reference to an MSPropertyDecl.
static OMPParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static UnresolvedLookupExpr * CreateEmpty(const ASTContext &Context, unsigned NumResults, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Represents a reference to a non-type template parameter that has been substituted with a template arg...
void setForLoc(SourceLocation Loc)
This represents '#pragma omp cancel' directive.
void setDistInc(Expr *DistInc)
An ObjCAvailabilityCheckExpr record.
void setRParenLoc(SourceLocation L)
std::string readString()
Read a string, advancing Idx.
void setConditionVariable(const ASTContext &Ctx, VarDecl *V)
Set the condition variable of this while statement.
CStyleCastExpr - An explicit cast in C (C99 6.5.4) or a C-style cast in C++ (C++ [expr.cast]), which uses the syntax (Type)expr.
static OMPDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setClauses(ArrayRef< OMPClause *> Clauses)
Sets the list of variables for this clause.
An ObjCPropertyRefExpr record.
NestedNameSpecifierLoc NestedNameSpec
This file defines OpenMP AST classes for clauses.
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1...
An ObjCForCollectionStmt record.
This represents '#pragma omp flush' directive.
This represents '#pragma omp parallel for simd' directive.
void setRParenLoc(SourceLocation L)
void setAtTryLoc(SourceLocation Loc)
DoStmt - This represents a 'do/while' stmt.
AsmStmt is the base class for GCCAsmStmt and MSAsmStmt.
void setTypeOperandSourceInfo(TypeSourceInfo *TSI)
SourceLocation TemplateKWLoc
The location of the template keyword, if specified when naming the concept.
A MS-style AsmStmt record.
void setConditionVariable(const ASTContext &Ctx, VarDecl *VD)
Set the condition variable in this switch statement.
void setLocStart(SourceLocation Loc)
Set starting location of directive kind.
OpaqueValueExprBitfields OpaqueValueExprBits
static OMPParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel master taskloop' directive.
static CoroutineBodyStmt * Create(const ASTContext &C, CtorArgs const &Args)
void setSynchExpr(Stmt *S)
This represents '#pragma omp target enter data' directive.
void setUpdates(ArrayRef< Expr *> A)
void setLowerBoundVariable(Expr *LB)
This represents '#pragma omp master taskloop simd' directive.
void setLParenLoc(SourceLocation L)
void setTypeSourceInfo(TypeSourceInfo *tinfo)
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class...
void setComputationLHSType(QualType T)
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
unsigned getNumArgs() const
Return the number of actual arguments in this message, not counting the receiver. ...
static OMPSectionDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
void setDecl(LabelDecl *D)
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr...
A field in a dependent type, known only by its name.
This captures a statement into a function.
Represents a call to an inherited base class constructor from an inheriting constructor.
unsigned path_size() const
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
void setLParenLoc(SourceLocation L)
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on a template...
void setAccessorLoc(SourceLocation L)
void setGotoLoc(SourceLocation L)
static CXXDynamicCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
A CXXRewrittenBinaryOperator record.
unsigned getNumExprs() const
Return the number of expressions in this paren list.
void setLocation(SourceLocation L)
This represents '#pragma omp single' directive.
Encodes a location in the source.
void setLocation(SourceLocation L)
void setPrevLowerBoundVariable(Expr *PrevLB)
void setIterationVariable(Expr *IV)
Defines enumerations for expression traits intrinsics.
PseudoObjectExprBitfields PseudoObjectExprBits
static CXXOperatorCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, EmptyShell Empty)
UnresolvedLookupExprBitfields UnresolvedLookupExprBits
unsigned getNumHandlers() const
void setUpdater(Expr *Updater)
CXXThrowExprBitfields CXXThrowExprBits
static OMPTaskDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This is a basic class for representing single OpenMP executable directive.
static OMPTargetUpdateDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setDoLoc(SourceLocation L)
static CXXConstCastExpr * CreateEmpty(const ASTContext &Context)
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
void setCombinedNextLowerBound(Expr *CombNLB)
void setAtCatchLoc(SourceLocation Loc)
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c dictionary literal.
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit...
void setSourceRange(SourceRange R)
Represents a C++2a __builtin_bit_cast(T, v) expression.
static ObjCAtTryStmt * CreateEmpty(const ASTContext &Context, unsigned NumCatchStmts, bool HasFinally)
void setConstexpr(bool C)
Represents a call to a member function that may be written either with member call syntax (e...
static StringLiteral * CreateEmpty(const ASTContext &Ctx, unsigned NumConcatenated, unsigned Length, unsigned CharByteWidth)
Construct an empty string literal.
void setIdentLoc(SourceLocation L)
GenericSelectionExprBitfields GenericSelectionExprBits
Defines several types used to describe C++ lambda expressions that are shared between the parser and ...
DeclStmt - Adaptor class for mixing declarations with statements and expressions. ...
void setLabelLoc(SourceLocation L)
A CXXFunctionalCastExpr record.
void setTemporary(CXXTemporary *T)
A FloatingLiteral record.
static ExprWithCleanups * Create(const ASTContext &C, EmptyShell empty, unsigned numObjects)
void setAllEnumCasesCovered()
Set a flag in the SwitchStmt indicating that if the 'switch (X)' is a switch over an enum value then ...
StmtVisitor - This class implements a simple visitor for Stmt subclasses.
void setClassReceiver(TypeSourceInfo *TSInfo)
static concepts::Requirement::SubstitutionDiagnostic * readSubstitutionDiagnostic(ASTRecordReader &Record)
void setCatchParamDecl(VarDecl *D)
An ObjCEncodeExpr record.
static OMPAtomicDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp taskwait' directive.
An ImaginaryLiteral record.
void setIsFreeIvar(bool A)
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load, __atomic_store, and __atomic_compare_exchange_*, for the similarly-named C++11 instructions, and __c11 variants for <stdatomic.h>, and corresponding __opencl_atomic_* for OpenCL 2.0.
void setFinalsConditions(ArrayRef< Expr *> A)
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...
static OMPOrderedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
bool isOpenMPLoopBoundSharingDirective(OpenMPDirectiveKind Kind)
Checks if the specified directive kind is one of the composite or combined directives that need loop ...
void addDecl(NamedDecl *D)
ObjCProtocolExpr used for protocol expression in Objective-C.
static WhileStmt * CreateEmpty(const ASTContext &Ctx, bool HasVar)
Create an empty while statement optionally with storage for a condition variable. ...
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
void setDecl(ValueDecl *NewD)
void setThrowLoc(SourceLocation Loc)
unsigned getIdx() const
The current position in this record.
ASTContext & getContext()
Retrieve the AST context that this AST reader supplements.
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Stmt * getCapturedStmt()
Retrieve the statement being captured.
This represents '#pragma omp target' directive.
static OMPTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static DesignatedInitExpr * CreateEmpty(const ASTContext &C, unsigned NumIndexExprs)
static DeclGroup * Create(ASTContext &C, Decl **Decls, unsigned NumDecls)
bool isParenTypeId() const
static OMPTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setBaseExpr(Stmt *S)
NullStmtBitfields NullStmtBits
DeclarationNameInfo ConceptName
The concept name used.
An expression trait intrinsic.
void setEncodedTypeSourceInfo(TypeSourceInfo *EncType)
static CXXDependentScopeMemberExpr * CreateEmpty(const ASTContext &Ctx, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs, bool HasFirstQualifierFoundInScope)
A static requirement that can be used in a requires-expression to check properties of types and expre...
This represents '#pragma omp ordered' directive.
static ConceptSpecializationExpr * Create(const ASTContext &C, NestedNameSpecifierLoc NNS, SourceLocation TemplateKWLoc, DeclarationNameInfo ConceptNameInfo, NamedDecl *FoundDecl, ConceptDecl *NamedConcept, const ASTTemplateArgumentListInfo *ArgsAsWritten, ArrayRef< TemplateArgument > ConvertedArgs, const ConstraintSatisfaction *Satisfaction)
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
static SizeOfPackExpr * CreateDeserialized(ASTContext &Context, unsigned NumPartialArgs)
This represents '#pragma omp target update' directive.
ObjCBoxedExpr - used for generalized expression boxing.
MemberExprBitfields MemberExprBits
void setLAngleLoc(SourceLocation Loc)
void sawArrayRangeDesignator(bool ARD=true)
static CXXTemporaryObjectExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs)
void addArgument(const TemplateArgumentLoc &Loc)
This represents '#pragma omp parallel master taskloop simd' directive.
void setCapturedRecordDecl(RecordDecl *D)
Set the record declaration for captured variables.
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name...
A placeholder type used to construct an empty shell of a type, that will be filled in later (e...
A qualified reference to a name whose declaration cannot yet be resolved.
void setRBracketLoc(SourceLocation L)
CompoundAssignOperator - For compound assignments (e.g.
Expr ** getElements()
Retrieve elements of array of literals.
Defines various enumerations that describe declaration and type specifiers.
A POD class for pairing a NamedDecl* with an access specifier.
Represents a C11 generic selection.
AddrLabelExpr - The GNU address of label extension, representing &&label.
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers...
Represents a reference to a function parameter pack or init-capture pack that has been substituted bu...
Represents a template argument.
void setGotoLoc(SourceLocation L)
void setPrevUpperBoundVariable(Expr *PrevUB)
static CXXUnresolvedConstructExpr * CreateEmpty(const ASTContext &Context, unsigned NumArgs)
void setCombinedEnsureUpperBound(Expr *CombEUB)
static OMPForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setLocation(SourceLocation L)
NullStmt - This is the null statement ";": C99 6.8.3p3.
void setCounters(ArrayRef< Expr *> A)
bool isTypeOperand() const
unsigned getNumAssocs() const
The number of association expressions.
Dataflow Directional Tag Classes.
static GenericSelectionExpr * CreateEmpty(const ASTContext &Context, unsigned NumAssocs)
Create an empty generic selection expression for deserialization.
An IntegerLiteral record.
llvm::BitstreamCursor DeclsCursor
DeclsCursor - This is a cursor to the start of the DECLS_BLOCK block.
void setBuiltinLoc(SourceLocation L)
[C99 6.4.2.2] - A predefined identifier such as func.
A CXXBoolLiteralExpr record.
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
void setCombinedUpperBoundVariable(Expr *CombUB)
void setRParenLoc(SourceLocation L)
static CapturedStmt * CreateDeserialized(const ASTContext &Context, unsigned NumCaptures)
An ExtVectorElementExpr record.
void setLabel(LabelDecl *L)
static OMPTargetTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setTypeInfoAsWritten(TypeSourceInfo *writtenTy)
This represents '#pragma omp section' directive.
void setAtLoc(SourceLocation L)
This represents '#pragma omp teams distribute' directive.
Expr * ReadExpr(ModuleFile &F)
Reads an expression.
void setExprs(const ASTContext &C, ArrayRef< Expr *> Exprs)
void setCollection(Expr *E)
An ObjCIvarRefExpr record.
void setDecl(ObjCIvarDecl *d)
AccessSpecifier getAccess() const
void setFileScope(bool FS)
A runtime availability query.
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
This represents '#pragma omp simd' directive.
Represents a 'co_yield' expression.
An ObjCAutoreleasePoolStmt record.
A CharacterLiteral record.
Represents a C++11 pack expansion that produces a sequence of expressions.
An ObjCStringLiteral record.
A CXXDynamicCastExpr record.
static LambdaExpr * CreateDeserialized(const ASTContext &C, unsigned NumCaptures)
Construct a new lambda expression that will be deserialized from an external source.
static PseudoObjectExpr * Create(const ASTContext &Context, Expr *syntactic, ArrayRef< Expr *> semantic, unsigned resultIndex)
void setInstantiationDependent(bool ID)
Set whether this expression is instantiation-dependent or not.
void setEllipsisLoc(SourceLocation L)
Set the location of the ...
A CXXForRangeStmt record.
Kind
The kind of offsetof node we have.
void setLParenLoc(SourceLocation L)
void setSelector(Selector S)
ExplicitCastExpr - An explicit cast written in the source code.
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
void setMethodDecl(ObjCMethodDecl *MD)
This represents '#pragma omp atomic' directive.
static CompoundStmt * CreateEmpty(const ASTContext &C, unsigned NumStmts)
pack_iterator pack_begin() const
Iterator referencing the first argument of a template argument pack.
An ObjCAtFinallyStmt record.
CXXNewExprBitfields CXXNewExprBits
RequiresExprBitfields RequiresExprBits
llvm::SmallVector< std::pair< const Expr *, Detail >, 4 > Details
Pairs of unsatisfied atomic constraint expressions along with the substituted constraint expr...
uint64_t readInt()
Returns the current value in this record, and advances to the next value.
Represents a __leave statement.
unsigned getCollapsedNumber() const
Get number of collapsed loops.
unsigned getNumSubExprs() const
void setRBracketLoc(SourceLocation L)
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
SwitchStmt - This represents a 'switch' stmt.
CXXConstructExprBitfields CXXConstructExprBits
static OMPForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represents the body of a coroutine.
TemplateArgumentLoc * getTrailingTemplateArgumentLoc()
Return the optional template arguments.
Location wrapper for a TemplateArgument.
bool isOpenMPDistributeDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a distribute directive.
static const unsigned NumExprFields
The number of record fields required for the Expr class itself.
void setCatchStmt(unsigned I, ObjCAtCatchStmt *S)
Set a particular catch statement.
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c array literal.
static OMPBarrierDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
This file defines OpenMP AST classes for executable directives and clauses.
Represents Objective-C's collection statement.
static CUDAKernelCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, EmptyShell Empty)
An ObjCAtSynchronizedStmt record.
unsigned getNumObjects() const
void setIndexExpr(unsigned Idx, Expr *E)
ObjCEncodeExpr, used for @encode in Objective-C.
void setLowerBound(Expr *E)
Set lower bound of the array section.
An implicit indirection through a C++ base class, when the field found is in a base class...
A SizefAlignOfExpr record.
Represents a call to a CUDA kernel function.
Represents a 'co_await' expression.
TypeTraitExprBitfields TypeTraitExprBits
static ImplicitCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
void setSwitchLoc(SourceLocation L)
A CXXMemberCallExpr record.
void setAtFinallyLoc(SourceLocation Loc)
void setArg(unsigned Arg, Expr *ArgExpr)
Set the specified argument.
void setKind(UnaryExprOrTypeTrait K)
void setRParenLoc(SourceLocation L)
static ConstantExpr * CreateEmpty(const ASTContext &Context, ResultStorageKind StorageKind, EmptyShell Empty)
void setOperatorLoc(SourceLocation L)
void setValue(const ASTContext &C, const llvm::APFloat &Val)
Represents Objective-C's @finally statement.
void setCatchBody(Stmt *S)
static CXXFunctionalCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
void setLParenLoc(SourceLocation L)
The template argument is actually a parameter pack.
Represents a base class of a C++ class.
void setRParenLoc(SourceLocation L)
unsigned getNumClobbers() const
static OMPTargetTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
ObjCIvarRefExpr - A reference to an ObjC instance variable.
void setAtSynchronizedLoc(SourceLocation Loc)
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof...
void setElseLoc(SourceLocation ElseLoc)
void setOperatorLoc(SourceLocation L)
void setLocation(SourceLocation Location)
A ConvertVectorExpr record.
unsigned arg_size() const
Retrieve the number of arguments.
void setStarLoc(SourceLocation L)
void setLParenLoc(SourceLocation L)
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
GotoStmt - This represents a direct goto.
A use of a default initializer in a constructor or in aggregate initialization.
static ASTConstraintSatisfaction * Create(const ASTContext &C, const ConstraintSatisfaction &Satisfaction)
static CStyleCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
void setLocation(SourceLocation L)
ConceptDecl * NamedConcept
The concept named.
CapturedDecl * getCapturedDecl()
Retrieve the outlined function declaration.
void setBuiltinLoc(SourceLocation L)
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
GNU array range designator.
void setTemplateArguments(ArrayRef< TemplateArgument > Converted)
Set new template arguments for this concept specialization.
Defines the clang::SourceLocation class and associated facilities.
An ArrayInitIndexExpr record.
A GCC-style AsmStmt record.
This represents '#pragma omp target parallel' directive.
void setStrideVariable(Expr *ST)
static MemberExpr * CreateEmpty(const ASTContext &Context, bool HasQualifier, bool HasFoundDecl, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
ContinueStmt - This represents a continue.
static CXXStaticCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
Represents a loop initializing the elements of an array.
static CXXTryStmt * Create(const ASTContext &C, SourceLocation tryLoc, Stmt *tryBlock, ArrayRef< Stmt *> handlers)
A requires-expression requirement which is satisfied when a general constraint expression is satisfie...
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
static OMPParallelSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
CXXDefaultArgExprBitfields CXXDefaultArgExprBits
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
CXXCatchStmt - This represents a C++ catch block.
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
An ObjCAtCatchStmt record.
static TypeTraitExpr * CreateDeserialized(const ASTContext &C, unsigned NumArgs)
Expr * ReadSubExpr()
Reads a sub-expression operand during statement reading.
WhileStmt - This represents a 'while' stmt.
CXXOperatorCallExprBitfields CXXOperatorCallExprBits
Represents the specialization of a concept - evaluates to a prvalue of type bool. ...
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 initializeFrom(SourceLocation TemplateKWLoc, const TemplateArgumentListInfo &List, TemplateArgumentLoc *OutArgArray)
Field designator where the field has been resolved to a declaration.
void setIsaMemberLoc(SourceLocation L)
unsigned getNumConcatenated() const
getNumConcatenated - Get the number of string literal tokens that were concatenated in translation ph...
static CXXNewExpr * CreateEmpty(const ASTContext &Ctx, bool IsArray, bool HasInit, unsigned NumPlacementArgs, bool IsParenTypeId)
Create an empty c++ new expression.
static ParenListExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumExprs)
Create an empty paren list.
A CXXInheritedCtorInitExpr record.
void setExprOperand(Expr *E)
void setPreArg(unsigned I, Stmt *PreArg)
Represents Objective-C's @try ... @catch ... @finally statement.
This represents '#pragma omp taskloop simd' directive.
void setTokenLocation(SourceLocation L)
static OMPSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
unsigned getNumCatchStmts() const
Retrieve the number of @catch statements in this try-catch-finally block.
StringLiteral - This represents a string literal expression, e.g.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
void setOpLoc(SourceLocation L)
void setLoopVarStmt(Stmt *S)
An object for streaming information from a record.
Internal struct to describes an element that is a pack expansion, used if any of the elements in the ...
void setPreCond(Expr *PC)
RetTy Visit(PTR(Stmt) S, ParamTys... P)
void setRParenLoc(SourceLocation L)
SourceLocExprBitfields SourceLocExprBits
void reserveInits(const ASTContext &C, unsigned NumInits)
Reserve space for some number of initializers.
static OMPCancelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
An ObjCMessageExpr record.
bool hasTemplateKWAndArgsInfo() const
Abstract class common to all of the C++ "named"/"keyword" casts.
This represents '#pragma omp sections' directive.
void setNextSwitchCase(SwitchCase *SC)
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
A CompoundAssignOperator record.
const ASTTemplateArgumentListInfo * ArgsAsWritten
The template argument list source info used to specialize the concept.
unsigned getNumComponents() const
This represents '#pragma omp target data' directive.
void setNextUpperBound(Expr *NUB)
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument for this lambda expression...
A rewritten comparison expression that was originally written using operator syntax.
void setKind(CharacterKind kind)
A reference to a declared variable, function, enum, etc.
static CaseStmt * CreateEmpty(const ASTContext &Ctx, bool CaseStmtIsGNURange)
Build an empty case statement.
Designator - A designator in a C99 designated initializer.
void setRawSemantics(llvm::APFloatBase::Semantics Sem)
Set the raw enumeration value representing the floating-point semantics of this literal (32-bit IEEE...
void setLabel(LabelDecl *D)
BreakStmt - This represents a break.
void setSubStmt(Stmt *SS)
unsigned getNumLabels() const
static ObjCArrayLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements)
CXXNoexceptExprBitfields CXXNoexceptExprBits
unsigned getNumArgs() const
Return the number of arguments to the constructor call.
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...
A trivial tuple used to represent a source range.
This represents '#pragma omp taskyield' directive.
This represents a decl that may have a name.
This represents '#pragma omp distribute parallel for simd' composite directive.
A boolean literal, per ([C++ lex.bool] Boolean literals).
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type, member-designator).
This represents '#pragma omp parallel sections' directive.
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
void setCalcLastIteration(Expr *CLI)
static CallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, EmptyShell Empty)
Create an empty call expression, for deserialization.
The receiver is a superclass.
void setCombinedNextUpperBound(Expr *CombNUB)
This file provides AST data structures related to concepts.
SourceLocation getBegin() const
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument.
Represents Objective-C's @autoreleasepool Statement.
void setWhileLoc(SourceLocation L)
StmtCode
Record codes for each kind of statement or expression.
void setLocEnd(SourceLocation Loc)
Set ending location of directive.
void setArg(unsigned Arg, Expr *ArgExpr)
setArg - Set the specified argument.
void setFinals(ArrayRef< Expr *> A)
static OMPTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represents an implicitly-generated value initialization of an object of a given type.
void setKeywordLoc(SourceLocation L)
bool Sub(InterpState &S, CodePtr OpPC)
void setCapturedRegionKind(CapturedRegionKind Kind)
Set the captured region kind.
A GenericSelectionExpr record.
This represents '#pragma omp target parallel for' directive.
static OMPCancellationPointDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
void setLabelLoc(SourceLocation L)
void setAtLoc(SourceLocation Loc)
void setIsConditionTrue(bool isTrue)
CXXDependentScopeMemberExprBitfields CXXDependentScopeMemberExprBits
static UnresolvedMemberExpr * CreateEmpty(const ASTContext &Context, unsigned NumResults, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
This represents '#pragma omp taskloop' directive.