54#include "llvm/ADT/BitmaskEnum.h"
55#include "llvm/ADT/DenseMap.h"
56#include "llvm/ADT/SmallString.h"
57#include "llvm/ADT/SmallVector.h"
58#include "llvm/ADT/StringRef.h"
59#include "llvm/Bitstream/BitstreamReader.h"
60#include "llvm/Support/Casting.h"
61#include "llvm/Support/ErrorHandling.h"
69using namespace serialization;
75 llvm::BitstreamCursor &DeclsCursor;
77 std::optional<BitsUnpacker> CurrentUnpackingBits;
80 return Record.readSourceLocation();
84 return Record.readSourceRange();
87 std::string readString() {
88 return Record.readString();
92 return Record.readTypeSourceInfo();
122 unsigned NumTemplateArgs);
125#define STMT(Type, Base) \
126 void Visit##Type(Type *);
127#include "clang/AST/StmtNodes.inc"
134 unsigned NumTemplateArgs) {
139 for (
unsigned i = 0; i != NumTemplateArgs; ++i)
148void ASTStmtReader::VisitNullStmt(
NullStmt *S) {
150 S->setSemiLoc(readSourceLocation());
151 S->NullStmtBits.HasLeadingEmptyMacro =
Record.readInt();
157 unsigned NumStmts =
Record.readInt();
158 unsigned HasFPFeatures =
Record.readInt();
159 assert(S->hasStoredFPFeatures() == HasFPFeatures);
161 Stmts.push_back(
Record.readSubStmt());
164 S->setStoredFPFeatures(
166 S->LBraceLoc = readSourceLocation();
167 S->RBraceLoc = readSourceLocation();
170void ASTStmtReader::VisitSwitchCase(
SwitchCase *S) {
173 S->setKeywordLoc(readSourceLocation());
174 S->setColonLoc(readSourceLocation());
177void ASTStmtReader::VisitCaseStmt(
CaseStmt *S) {
179 bool CaseStmtIsGNURange =
Record.readInt();
180 S->setLHS(
Record.readSubExpr());
181 S->setSubStmt(
Record.readSubStmt());
182 if (CaseStmtIsGNURange) {
183 S->setRHS(
Record.readSubExpr());
184 S->setEllipsisLoc(readSourceLocation());
188void ASTStmtReader::VisitDefaultStmt(
DefaultStmt *S) {
190 S->setSubStmt(
Record.readSubStmt());
193void ASTStmtReader::VisitLabelStmt(
LabelStmt *S) {
195 bool IsSideEntry =
Record.readInt();
196 auto *LD = readDeclAs<LabelDecl>();
199 S->setSubStmt(
Record.readSubStmt());
200 S->setIdentLoc(readSourceLocation());
201 S->setSideEntry(IsSideEntry);
211 Record.readAttributes(Attrs);
213 assert(NumAttrs == S->AttributedStmtBits.NumAttrs);
214 assert(NumAttrs == Attrs.size());
215 std::copy(Attrs.begin(), Attrs.end(), S->getAttrArrayPtr());
216 S->SubStmt =
Record.readSubStmt();
217 S->AttributedStmtBits.AttrLoc = readSourceLocation();
220void ASTStmtReader::VisitIfStmt(
IfStmt *S) {
223 CurrentUnpackingBits.emplace(
Record.readInt());
225 bool HasElse = CurrentUnpackingBits->getNextBit();
226 bool HasVar = CurrentUnpackingBits->getNextBit();
227 bool HasInit = CurrentUnpackingBits->getNextBit();
230 S->setCond(
Record.readSubExpr());
231 S->setThen(
Record.readSubStmt());
233 S->setElse(
Record.readSubStmt());
235 S->setConditionVariableDeclStmt(cast<DeclStmt>(
Record.readSubStmt()));
237 S->setInit(
Record.readSubStmt());
239 S->setIfLoc(readSourceLocation());
240 S->setLParenLoc(readSourceLocation());
241 S->setRParenLoc(readSourceLocation());
243 S->setElseLoc(readSourceLocation());
246void ASTStmtReader::VisitSwitchStmt(
SwitchStmt *S) {
249 bool HasInit =
Record.readInt();
250 bool HasVar =
Record.readInt();
251 bool AllEnumCasesCovered =
Record.readInt();
252 if (AllEnumCasesCovered)
253 S->setAllEnumCasesCovered();
255 S->setCond(
Record.readSubExpr());
256 S->setBody(
Record.readSubStmt());
258 S->setInit(
Record.readSubStmt());
260 S->setConditionVariableDeclStmt(cast<DeclStmt>(
Record.readSubStmt()));
262 S->setSwitchLoc(readSourceLocation());
263 S->setLParenLoc(readSourceLocation());
264 S->setRParenLoc(readSourceLocation());
272 S->setSwitchCaseList(SC);
278void ASTStmtReader::VisitWhileStmt(
WhileStmt *S) {
281 bool HasVar =
Record.readInt();
283 S->setCond(
Record.readSubExpr());
284 S->setBody(
Record.readSubStmt());
286 S->setConditionVariableDeclStmt(cast<DeclStmt>(
Record.readSubStmt()));
288 S->setWhileLoc(readSourceLocation());
289 S->setLParenLoc(readSourceLocation());
290 S->setRParenLoc(readSourceLocation());
293void ASTStmtReader::VisitDoStmt(
DoStmt *S) {
295 S->setCond(
Record.readSubExpr());
296 S->setBody(
Record.readSubStmt());
297 S->setDoLoc(readSourceLocation());
298 S->setWhileLoc(readSourceLocation());
299 S->setRParenLoc(readSourceLocation());
302void ASTStmtReader::VisitForStmt(
ForStmt *S) {
304 S->setInit(
Record.readSubStmt());
305 S->setCond(
Record.readSubExpr());
306 S->setConditionVariableDeclStmt(cast_or_null<DeclStmt>(
Record.readSubStmt()));
307 S->setInc(
Record.readSubExpr());
308 S->setBody(
Record.readSubStmt());
309 S->setForLoc(readSourceLocation());
310 S->setLParenLoc(readSourceLocation());
311 S->setRParenLoc(readSourceLocation());
314void ASTStmtReader::VisitGotoStmt(
GotoStmt *S) {
316 S->setLabel(readDeclAs<LabelDecl>());
317 S->setGotoLoc(readSourceLocation());
318 S->setLabelLoc(readSourceLocation());
323 S->setGotoLoc(readSourceLocation());
324 S->setStarLoc(readSourceLocation());
325 S->setTarget(
Record.readSubExpr());
330 S->setContinueLoc(readSourceLocation());
333void ASTStmtReader::VisitBreakStmt(
BreakStmt *S) {
335 S->setBreakLoc(readSourceLocation());
338void ASTStmtReader::VisitReturnStmt(
ReturnStmt *S) {
341 bool HasNRVOCandidate =
Record.readInt();
343 S->setRetValue(
Record.readSubExpr());
344 if (HasNRVOCandidate)
345 S->setNRVOCandidate(readDeclAs<VarDecl>());
347 S->setReturnLoc(readSourceLocation());
350void ASTStmtReader::VisitDeclStmt(
DeclStmt *S) {
352 S->setStartLoc(readSourceLocation());
353 S->setEndLoc(readSourceLocation());
362 for (
int I = 0; I < N; ++I)
363 Decls.push_back(readDecl());
370void ASTStmtReader::VisitAsmStmt(
AsmStmt *S) {
372 S->NumOutputs =
Record.readInt();
373 S->NumInputs =
Record.readInt();
374 S->NumClobbers =
Record.readInt();
375 S->setAsmLoc(readSourceLocation());
376 S->setVolatile(
Record.readInt());
377 S->setSimple(
Record.readInt());
380void ASTStmtReader::VisitGCCAsmStmt(
GCCAsmStmt *S) {
382 S->NumLabels =
Record.readInt();
383 S->setRParenLoc(readSourceLocation());
384 S->setAsmString(cast_or_null<StringLiteral>(
Record.readSubStmt()));
386 unsigned NumOutputs = S->getNumOutputs();
387 unsigned NumInputs = S->getNumInputs();
388 unsigned NumClobbers = S->getNumClobbers();
389 unsigned NumLabels = S->getNumLabels();
395 for (
unsigned I = 0, N = NumOutputs + NumInputs; I != N; ++I) {
396 Names.push_back(
Record.readIdentifier());
397 Constraints.push_back(cast_or_null<StringLiteral>(
Record.readSubStmt()));
398 Exprs.push_back(
Record.readSubStmt());
403 for (
unsigned I = 0; I != NumClobbers; ++I)
404 Clobbers.push_back(cast_or_null<StringLiteral>(
Record.readSubStmt()));
407 for (
unsigned I = 0, N = NumLabels; I != N; ++I) {
408 Names.push_back(
Record.readIdentifier());
409 Exprs.push_back(
Record.readSubStmt());
412 S->setOutputsAndInputsAndClobbers(
Record.getContext(),
413 Names.data(), Constraints.data(),
414 Exprs.data(), NumOutputs, NumInputs,
416 Clobbers.data(), NumClobbers);
419void ASTStmtReader::VisitMSAsmStmt(
MSAsmStmt *S) {
421 S->LBraceLoc = readSourceLocation();
422 S->EndLoc = readSourceLocation();
423 S->NumAsmToks =
Record.readInt();
424 std::string AsmStr = readString();
428 AsmToks.reserve(S->NumAsmToks);
429 for (
unsigned i = 0, e = S->NumAsmToks; i != e; ++i) {
430 AsmToks.push_back(
Record.readToken());
439 ClobbersData.reserve(S->NumClobbers);
440 Clobbers.reserve(S->NumClobbers);
441 for (
unsigned i = 0, e = S->NumClobbers; i != e; ++i) {
442 ClobbersData.push_back(readString());
443 Clobbers.push_back(ClobbersData.back());
447 unsigned NumOperands = S->NumOutputs + S->NumInputs;
451 Exprs.reserve(NumOperands);
452 ConstraintsData.reserve(NumOperands);
453 Constraints.reserve(NumOperands);
454 for (
unsigned i = 0; i != NumOperands; ++i) {
455 Exprs.push_back(cast<Expr>(
Record.readSubStmt()));
456 ConstraintsData.push_back(readString());
457 Constraints.push_back(ConstraintsData.back());
460 S->initialize(
Record.getContext(), AsmStr, AsmToks,
461 Constraints, Exprs, Clobbers);
466 assert(
Record.peekInt() == S->NumParams);
468 auto *StoredStmts = S->getStoredStmts();
470 i < CoroutineBodyStmt::SubStmt::FirstParamMove + S->NumParams; ++i)
471 StoredStmts[i] =
Record.readSubStmt();
476 S->CoreturnLoc =
Record.readSourceLocation();
477 for (
auto &SubStmt: S->SubStmts)
478 SubStmt =
Record.readSubStmt();
479 S->IsImplicit =
Record.readInt() != 0;
484 E->KeywordLoc = readSourceLocation();
485 for (
auto &SubExpr:
E->SubExprs)
486 SubExpr =
Record.readSubStmt();
487 E->OpaqueValue = cast_or_null<OpaqueValueExpr>(
Record.readSubStmt());
488 E->setIsImplicit(
Record.readInt() != 0);
493 E->KeywordLoc = readSourceLocation();
494 for (
auto &SubExpr:
E->SubExprs)
495 SubExpr =
Record.readSubStmt();
496 E->OpaqueValue = cast_or_null<OpaqueValueExpr>(
Record.readSubStmt());
501 E->KeywordLoc = readSourceLocation();
502 for (
auto &SubExpr:
E->SubExprs)
503 SubExpr =
Record.readSubStmt();
509 S->setCapturedDecl(readDeclAs<CapturedDecl>());
511 S->setCapturedRecordDecl(readDeclAs<RecordDecl>());
515 E = S->capture_init_end();
517 *I =
Record.readSubExpr();
520 S->setCapturedStmt(
Record.readSubStmt());
521 S->getCapturedDecl()->setBody(S->getCapturedStmt());
524 for (
auto &I : S->captures()) {
525 I.VarAndKind.setPointer(readDeclAs<VarDecl>());
528 I.Loc = readSourceLocation();
534 S->setOriginalStmt(cast<CompoundStmt>(
Record.readSubStmt()));
535 S->setOutlinedFunctionDecl(readDeclAs<OutlinedFunctionDecl>());
538void ASTStmtReader::VisitExpr(
Expr *
E) {
540 CurrentUnpackingBits.emplace(
Record.readInt());
542 CurrentUnpackingBits->getNextBits(5)));
544 CurrentUnpackingBits->getNextBits(2)));
546 CurrentUnpackingBits->getNextBits(3)));
550 "Incorrect expression field count");
557 assert(
E->getResultStorageKind() == StorageKind &&
"Wrong ResultKind!");
565 switch (StorageKind) {
570 E->Int64Result() =
Record.readInt();
574 E->APValueResult() =
Record.readAPValue();
575 if (
E->APValueResult().needsCleanup()) {
577 Record.getContext().addDestruction(&
E->APValueResult());
582 E->setSubExpr(
Record.readSubExpr());
587 E->setAsteriskLocation(readSourceLocation());
593 E->setLocation(readSourceLocation());
594 E->setLParenLocation(readSourceLocation());
595 E->setRParenLocation(readSourceLocation());
597 E->setTypeSourceInfo(
Record.readTypeSourceInfo());
602 bool HasFunctionName =
Record.readInt();
606 E->setLocation(readSourceLocation());
608 E->setFunctionName(cast<StringLiteral>(
Record.readSubExpr()));
614 CurrentUnpackingBits.emplace(
Record.readInt());
615 E->
DeclRefExprBits.HadMultipleCandidates = CurrentUnpackingBits->getNextBit();
617 CurrentUnpackingBits->getNextBit();
619 CurrentUnpackingBits->getNextBits(2);
620 E->
DeclRefExprBits.IsImmediateEscalating = CurrentUnpackingBits->getNextBit();
624 CurrentUnpackingBits->getNextBit();
625 E->
DeclRefExprBits.CapturedByCopyInLambdaWithExplicitObjectParameter =
false;
626 unsigned NumTemplateArgs = 0;
627 if (
E->hasTemplateKWAndArgsInfo())
628 NumTemplateArgs =
Record.readInt();
630 if (
E->hasQualifier())
634 if (
E->hasFoundDecl())
635 *
E->getTrailingObjects<
NamedDecl *>() = readDeclAs<NamedDecl>();
637 if (
E->hasTemplateKWAndArgsInfo())
642 E->D = readDeclAs<ValueDecl>();
643 E->setLocation(readSourceLocation());
644 E->DNLoc =
Record.readDeclarationNameLoc(
E->getDecl()->getDeclName());
649 E->setLocation(readSourceLocation());
655 E->setLocation(readSourceLocation());
663 static_cast<llvm::APFloatBase::Semantics
>(
Record.readInt()));
665 E->setValue(
Record.getContext(),
Record.readAPFloat(
E->getSemantics()));
666 E->setLocation(readSourceLocation());
671 E->setSubExpr(
Record.readSubExpr());
679 unsigned NumConcatenated =
Record.readInt();
680 unsigned Length =
Record.readInt();
681 unsigned CharByteWidth =
Record.readInt();
682 assert((NumConcatenated ==
E->getNumConcatenated()) &&
683 "Wrong number of concatenated tokens!");
684 assert((Length ==
E->getLength()) &&
"Wrong Length!");
685 assert((CharByteWidth ==
E->getCharByteWidth()) &&
"Wrong character width!");
692 assert((CharByteWidth ==
693 StringLiteral::mapCharByteWidth(
Record.getContext().getTargetInfo(),
695 "Wrong character width!");
698 for (
unsigned I = 0; I < NumConcatenated; ++I)
699 E->setStrTokenLoc(I, readSourceLocation());
702 char *StrData =
E->getStrDataAsChar();
703 for (
unsigned I = 0; I < Length * CharByteWidth; ++I)
704 StrData[I] =
Record.readInt();
710 E->setLocation(readSourceLocation());
714void ASTStmtReader::VisitParenExpr(
ParenExpr *
E) {
716 E->setIsProducedByFoldExpansion(
Record.readInt());
717 E->setLParen(readSourceLocation());
718 E->setRParen(readSourceLocation());
719 E->setSubExpr(
Record.readSubExpr());
724 unsigned NumExprs =
Record.readInt();
725 assert((NumExprs ==
E->getNumExprs()) &&
"Wrong NumExprs!");
726 for (
unsigned I = 0; I != NumExprs; ++I)
727 E->getTrailingObjects<
Stmt *>()[I] =
Record.readSubStmt();
728 E->LParenLoc = readSourceLocation();
729 E->RParenLoc = readSourceLocation();
734 bool hasFP_Features = CurrentUnpackingBits->getNextBit();
735 assert(hasFP_Features ==
E->hasStoredFPFeatures());
736 E->setSubExpr(
Record.readSubExpr());
739 E->setOperatorLoc(readSourceLocation());
740 E->setCanOverflow(CurrentUnpackingBits->getNextBit());
742 E->setStoredFPFeatures(
748 assert(
E->getNumComponents() ==
Record.peekInt());
750 assert(
E->getNumExpressions() ==
Record.peekInt());
752 E->setOperatorLoc(readSourceLocation());
753 E->setRParenLoc(readSourceLocation());
754 E->setTypeSourceInfo(readTypeSourceInfo());
755 for (
unsigned I = 0, N =
E->getNumComponents(); I != N; ++I) {
784 for (
unsigned I = 0, N =
E->getNumExpressions(); I != N; ++I)
785 E->setIndexExpr(I,
Record.readSubExpr());
791 if (
Record.peekInt() == 0) {
792 E->setArgument(
Record.readSubExpr());
795 E->setArgument(readTypeSourceInfo());
797 E->setOperatorLoc(readSourceLocation());
798 E->setRParenLoc(readSourceLocation());
808 unsigned NumDetailRecords =
Record.readInt();
809 for (
unsigned i = 0; i != NumDetailRecords; ++i) {
812 StringRef DiagMessage =
C.backupStr(
Record.readString());
814 Satisfaction.
Details.emplace_back(
816 DiagLocation, DiagMessage));
824void ASTStmtReader::VisitConceptSpecializationExpr(
829 E->ConceptRef =
Record.readConceptReference();
838 StringRef SubstitutedEntity =
C.backupStr(
Record.readString());
840 StringRef DiagMessage =
C.backupStr(
Record.readString());
842 return new (
Record.getContext())
849 unsigned NumLocalParameters =
Record.readInt();
850 unsigned NumRequirements =
Record.readInt();
855 for (
unsigned i = 0; i < NumLocalParameters; ++i)
856 LocalParameters.push_back(cast<ParmVarDecl>(
Record.readDecl()));
857 std::copy(LocalParameters.begin(), LocalParameters.end(),
860 for (
unsigned i = 0; i < NumRequirements; ++i) {
870 R =
new (
Record.getContext())
873 R =
new (
Record.getContext())
888 std::optional<concepts::ExprRequirement::ReturnTypeRequirement> Req;
894 NoexceptLoc =
Record.readSourceLocation();
895 switch (
Record.readInt()) {
905 SubstitutedConstraintExpr =
906 cast<ConceptSpecializationExpr>(
Record.readExpr());
918 std::move(*Req), Status, SubstitutedConstraintExpr);
921 cast<concepts::Requirement::SubstitutionDiagnostic *>(
E),
927 bool HasInvalidConstraint =
Record.readInt();
928 if (HasInvalidConstraint) {
929 StringRef InvalidConstraint =
C.backupStr(
Record.readString());
931 Record.getContext(), InvalidConstraint,
945 Requirements.push_back(R);
947 std::copy(Requirements.begin(), Requirements.end(),
949 E->LParenLoc =
Record.readSourceLocation();
950 E->RParenLoc =
Record.readSourceLocation();
951 E->RBraceLoc =
Record.readSourceLocation();
956 E->setLHS(
Record.readSubExpr());
957 E->setRHS(
Record.readSubExpr());
958 E->setRBracketLoc(readSourceLocation());
963 E->setBase(
Record.readSubExpr());
964 E->setRowIdx(
Record.readSubExpr());
965 E->setColumnIdx(
Record.readSubExpr());
966 E->setRBracketLoc(readSourceLocation());
973 E->setBase(
Record.readSubExpr());
974 E->setLowerBound(
Record.readSubExpr());
975 E->setLength(
Record.readSubExpr());
977 if (
E->isOMPArraySection())
978 E->setStride(
Record.readSubExpr());
980 E->setColonLocFirst(readSourceLocation());
982 if (
E->isOMPArraySection())
983 E->setColonLocSecond(readSourceLocation());
985 E->setRBracketLoc(readSourceLocation());
990 unsigned NumDims =
Record.readInt();
991 E->setBase(
Record.readSubExpr());
993 for (
unsigned I = 0; I < NumDims; ++I)
994 Dims[I] =
Record.readSubExpr();
995 E->setDimensions(Dims);
997 for (
unsigned I = 0; I < NumDims; ++I)
998 SRs[I] = readSourceRange();
999 E->setBracketsRanges(SRs);
1000 E->setLParenLoc(readSourceLocation());
1001 E->setRParenLoc(readSourceLocation());
1006 unsigned NumIters =
Record.readInt();
1007 E->setIteratorKwLoc(readSourceLocation());
1008 E->setLParenLoc(readSourceLocation());
1009 E->setRParenLoc(readSourceLocation());
1010 for (
unsigned I = 0; I < NumIters; ++I) {
1011 E->setIteratorDeclaration(I,
Record.readDeclRef());
1012 E->setAssignmentLoc(I, readSourceLocation());
1019 SecColonLoc = readSourceLocation();
1020 E->setIteratorRange(I,
Begin, ColonLoc, End, SecColonLoc, Step);
1027 E->setHelper(I, HD);
1031void ASTStmtReader::VisitCallExpr(
CallExpr *
E) {
1034 unsigned NumArgs =
Record.readInt();
1035 CurrentUnpackingBits.emplace(
Record.readInt());
1038 bool HasFPFeatures = CurrentUnpackingBits->getNextBit();
1039 assert((NumArgs ==
E->getNumArgs()) &&
"Wrong NumArgs!");
1040 E->setRParenLoc(readSourceLocation());
1041 E->setCallee(
Record.readSubExpr());
1042 for (
unsigned I = 0; I != NumArgs; ++I)
1043 E->setArg(I,
Record.readSubExpr());
1046 E->setStoredFPFeatures(
1054void ASTStmtReader::VisitMemberExpr(
MemberExpr *
E) {
1057 CurrentUnpackingBits.emplace(
Record.readInt());
1058 bool HasQualifier = CurrentUnpackingBits->getNextBit();
1059 bool HasFoundDecl = CurrentUnpackingBits->getNextBit();
1060 bool HasTemplateInfo = CurrentUnpackingBits->getNextBit();
1061 unsigned NumTemplateArgs =
Record.readInt();
1063 E->Base =
Record.readSubExpr();
1065 E->MemberDNLoc =
Record.readDeclarationNameLoc(
E->MemberDecl->getDeclName());
1066 E->MemberLoc =
Record.readSourceLocation();
1071 E->
MemberExprBits.HadMultipleCandidates = CurrentUnpackingBits->getNextBit();
1073 CurrentUnpackingBits->getNextBits(2);
1086 if (HasTemplateInfo)
1094 E->setBase(
Record.readSubExpr());
1095 E->setIsaMemberLoc(readSourceLocation());
1096 E->setOpLoc(readSourceLocation());
1097 E->setArrow(
Record.readInt());
1103 E->Operand =
Record.readSubExpr();
1104 E->setShouldCopy(
Record.readInt());
1108 VisitExplicitCastExpr(
E);
1109 E->LParenLoc = readSourceLocation();
1110 E->BridgeKeywordLoc = readSourceLocation();
1114void ASTStmtReader::VisitCastExpr(
CastExpr *
E) {
1116 unsigned NumBaseSpecs =
Record.readInt();
1117 assert(NumBaseSpecs ==
E->path_size());
1119 CurrentUnpackingBits.emplace(
Record.readInt());
1120 E->setCastKind((
CastKind)CurrentUnpackingBits->getNextBits(7));
1121 unsigned HasFPFeatures = CurrentUnpackingBits->getNextBit();
1122 assert(
E->hasStoredFPFeatures() == HasFPFeatures);
1124 E->setSubExpr(
Record.readSubExpr());
1127 while (NumBaseSpecs--) {
1129 *BaseSpec =
Record.readCXXBaseSpecifier();
1130 *BaseI++ = BaseSpec;
1133 *
E->getTrailingFPFeatures() =
1139 CurrentUnpackingBits.emplace(
Record.readInt());
1142 bool hasFP_Features = CurrentUnpackingBits->getNextBit();
1143 E->setHasStoredFPFeatures(hasFP_Features);
1144 E->setExcludedOverflowPattern(CurrentUnpackingBits->getNextBit());
1145 E->setLHS(
Record.readSubExpr());
1146 E->setRHS(
Record.readSubExpr());
1147 E->setOperatorLoc(readSourceLocation());
1149 E->setStoredFPFeatures(
1154 VisitBinaryOperator(
E);
1155 E->setComputationLHSType(
Record.readType());
1156 E->setComputationResultType(
Record.readType());
1161 E->SubExprs[ConditionalOperator::COND] =
Record.readSubExpr();
1162 E->SubExprs[ConditionalOperator::LHS] =
Record.readSubExpr();
1163 E->SubExprs[ConditionalOperator::RHS] =
Record.readSubExpr();
1164 E->QuestionLoc = readSourceLocation();
1165 E->ColonLoc = readSourceLocation();
1171 E->OpaqueValue = cast<OpaqueValueExpr>(
Record.readSubExpr());
1172 E->SubExprs[BinaryConditionalOperator::COMMON] =
Record.readSubExpr();
1173 E->SubExprs[BinaryConditionalOperator::COND] =
Record.readSubExpr();
1174 E->SubExprs[BinaryConditionalOperator::LHS] =
Record.readSubExpr();
1175 E->SubExprs[BinaryConditionalOperator::RHS] =
Record.readSubExpr();
1176 E->QuestionLoc = readSourceLocation();
1177 E->ColonLoc = readSourceLocation();
1182 E->setIsPartOfExplicitCast(CurrentUnpackingBits->getNextBit());
1187 E->setTypeInfoAsWritten(readTypeSourceInfo());
1191 VisitExplicitCastExpr(
E);
1192 E->setLParenLoc(readSourceLocation());
1193 E->setRParenLoc(readSourceLocation());
1198 E->setLParenLoc(readSourceLocation());
1199 E->setTypeSourceInfo(readTypeSourceInfo());
1200 E->setInitializer(
Record.readSubExpr());
1201 E->setFileScope(
Record.readInt());
1206 E->setBase(
Record.readSubExpr());
1207 E->setAccessor(
Record.readIdentifier());
1208 E->setAccessorLoc(readSourceLocation());
1213 if (
auto *SyntForm = cast_or_null<InitListExpr>(
Record.readSubStmt()))
1214 E->setSyntacticForm(SyntForm);
1215 E->setLBraceLoc(readSourceLocation());
1216 E->setRBraceLoc(readSourceLocation());
1217 bool isArrayFiller =
Record.readInt();
1218 Expr *filler =
nullptr;
1219 if (isArrayFiller) {
1220 filler =
Record.readSubExpr();
1221 E->ArrayFillerOrUnionFieldInit = filler;
1223 E->ArrayFillerOrUnionFieldInit = readDeclAs<FieldDecl>();
1224 E->sawArrayRangeDesignator(
Record.readInt());
1225 unsigned NumInits =
Record.readInt();
1226 E->reserveInits(
Record.getContext(), NumInits);
1227 if (isArrayFiller) {
1228 for (
unsigned I = 0; I != NumInits; ++I) {
1230 E->updateInit(
Record.getContext(), I, init ? init : filler);
1233 for (
unsigned I = 0; I != NumInits; ++I)
1234 E->updateInit(
Record.getContext(), I,
Record.readSubExpr());
1242 unsigned NumSubExprs =
Record.readInt();
1243 assert(NumSubExprs ==
E->getNumSubExprs() &&
"Wrong number of subexprs");
1244 for (
unsigned I = 0; I != NumSubExprs; ++I)
1245 E->setSubExpr(I,
Record.readSubExpr());
1246 E->setEqualOrColonLoc(readSourceLocation());
1247 E->setGNUSyntax(
Record.readInt());
1253 auto *
Field = readDeclAs<FieldDecl>();
1257 Field->getIdentifier(), DotLoc, FieldLoc));
1258 Designators.back().setFieldDecl(Field);
1272 unsigned Index =
Record.readInt();
1282 unsigned Index =
Record.readInt();
1287 Index, LBracketLoc, EllipsisLoc, RBracketLoc));
1292 E->setDesignators(
Record.getContext(),
1293 Designators.data(), Designators.size());
1298 E->setBase(
Record.readSubExpr());
1299 E->setUpdater(
Record.readSubExpr());
1302void ASTStmtReader::VisitNoInitExpr(
NoInitExpr *
E) {
1308 E->SubExprs[0] =
Record.readSubExpr();
1309 E->SubExprs[1] =
Record.readSubExpr();
1320void ASTStmtReader::VisitVAArgExpr(
VAArgExpr *
E) {
1322 E->setSubExpr(
Record.readSubExpr());
1323 E->setWrittenTypeInfo(readTypeSourceInfo());
1324 E->setBuiltinLoc(readSourceLocation());
1325 E->setRParenLoc(readSourceLocation());
1326 E->setIsMicrosoftABI(
Record.readInt());
1331 E->ParentContext = readDeclAs<DeclContext>();
1332 E->BuiltinLoc = readSourceLocation();
1333 E->RParenLoc = readSourceLocation();
1337void ASTStmtReader::VisitEmbedExpr(
EmbedExpr *
E) {
1339 E->EmbedKeywordLoc = readSourceLocation();
1341 Data->BinaryData = cast<StringLiteral>(
Record.readSubStmt());
1344 E->NumOfElements =
Record.readInt();
1349 E->setAmpAmpLoc(readSourceLocation());
1350 E->setLabelLoc(readSourceLocation());
1351 E->setLabel(readDeclAs<LabelDecl>());
1354void ASTStmtReader::VisitStmtExpr(
StmtExpr *
E) {
1356 E->setLParenLoc(readSourceLocation());
1357 E->setRParenLoc(readSourceLocation());
1358 E->setSubStmt(cast_or_null<CompoundStmt>(
Record.readSubStmt()));
1362void ASTStmtReader::VisitChooseExpr(
ChooseExpr *
E) {
1364 E->setCond(
Record.readSubExpr());
1365 E->setLHS(
Record.readSubExpr());
1366 E->setRHS(
Record.readSubExpr());
1367 E->setBuiltinLoc(readSourceLocation());
1368 E->setRParenLoc(readSourceLocation());
1369 E->setIsConditionTrue(
Record.readInt());
1374 E->setTokenLocation(readSourceLocation());
1380 unsigned NumExprs =
Record.readInt();
1382 Exprs.push_back(
Record.readSubExpr());
1383 E->setExprs(
Record.getContext(), Exprs);
1384 E->setBuiltinLoc(readSourceLocation());
1385 E->setRParenLoc(readSourceLocation());
1390 E->BuiltinLoc = readSourceLocation();
1391 E->RParenLoc = readSourceLocation();
1392 E->TInfo = readTypeSourceInfo();
1393 E->SrcExpr =
Record.readSubExpr();
1396void ASTStmtReader::VisitBlockExpr(
BlockExpr *
E) {
1398 E->setBlockDecl(readDeclAs<BlockDecl>());
1404 unsigned NumAssocs =
Record.readInt();
1405 assert(NumAssocs ==
E->getNumAssocs() &&
"Wrong NumAssocs!");
1406 E->IsExprPredicate =
Record.readInt();
1407 E->ResultIndex =
Record.readInt();
1409 E->DefaultLoc = readSourceLocation();
1410 E->RParenLoc = readSourceLocation();
1412 Stmt **Stmts =
E->getTrailingObjects<
Stmt *>();
1416 for (
unsigned I = 0, N = NumAssocs + 1; I < N; ++I)
1417 Stmts[I] =
Record.readSubExpr();
1420 for (
unsigned I = 0, N = NumAssocs; I < N; ++I)
1421 TSIs[I] = readTypeSourceInfo();
1426 unsigned numSemanticExprs =
Record.readInt();
1431 E->getSubExprsBuffer()[0] =
Record.readSubExpr();
1434 for (
unsigned i = 0; i != numSemanticExprs; ++i) {
1436 E->getSubExprsBuffer()[i+1] = subExpr;
1440void ASTStmtReader::VisitAtomicExpr(
AtomicExpr *
E) {
1444 for (
unsigned I = 0; I !=
E->NumSubExprs; ++I)
1445 E->SubExprs[I] =
Record.readSubExpr();
1446 E->BuiltinLoc = readSourceLocation();
1447 E->RParenLoc = readSourceLocation();
1455 E->setString(cast<StringLiteral>(
Record.readSubStmt()));
1456 E->setAtLoc(readSourceLocation());
1462 E->SubExpr =
Record.readSubStmt();
1463 E->BoxingMethod = readDeclAs<ObjCMethodDecl>();
1464 E->Range = readSourceRange();
1469 unsigned NumElements =
Record.readInt();
1470 assert(NumElements ==
E->getNumElements() &&
"Wrong number of elements");
1471 Expr **Elements =
E->getElements();
1472 for (
unsigned I = 0, N = NumElements; I != N; ++I)
1473 Elements[I] =
Record.readSubExpr();
1474 E->ArrayWithObjectsMethod = readDeclAs<ObjCMethodDecl>();
1475 E->Range = readSourceRange();
1480 unsigned NumElements =
Record.readInt();
1481 assert(NumElements ==
E->getNumElements() &&
"Wrong number of elements");
1482 bool HasPackExpansions =
Record.readInt();
1483 assert(HasPackExpansions ==
E->HasPackExpansions &&
"Pack expansion mismatch");
1488 for (
unsigned I = 0; I != NumElements; ++I) {
1489 KeyValues[I].Key =
Record.readSubExpr();
1490 KeyValues[I].Value =
Record.readSubExpr();
1491 if (HasPackExpansions) {
1492 Expansions[I].EllipsisLoc = readSourceLocation();
1493 Expansions[I].NumExpansionsPlusOne =
Record.readInt();
1496 E->DictWithObjectsMethod = readDeclAs<ObjCMethodDecl>();
1497 E->Range = readSourceRange();
1502 E->setEncodedTypeSourceInfo(readTypeSourceInfo());
1503 E->setAtLoc(readSourceLocation());
1504 E->setRParenLoc(readSourceLocation());
1509 E->setSelector(
Record.readSelector());
1510 E->setAtLoc(readSourceLocation());
1511 E->setRParenLoc(readSourceLocation());
1516 E->setProtocol(readDeclAs<ObjCProtocolDecl>());
1517 E->setAtLoc(readSourceLocation());
1518 E->ProtoLoc = readSourceLocation();
1519 E->setRParenLoc(readSourceLocation());
1524 E->setDecl(readDeclAs<ObjCIvarDecl>());
1525 E->setLocation(readSourceLocation());
1526 E->setOpLoc(readSourceLocation());
1527 E->setBase(
Record.readSubExpr());
1528 E->setIsArrow(
Record.readInt());
1529 E->setIsFreeIvar(
Record.readInt());
1534 unsigned MethodRefFlags =
Record.readInt();
1537 auto *Getter = readDeclAs<ObjCMethodDecl>();
1538 auto *Setter = readDeclAs<ObjCMethodDecl>();
1539 E->setImplicitProperty(Getter, Setter, MethodRefFlags);
1541 E->setExplicitProperty(readDeclAs<ObjCPropertyDecl>(), MethodRefFlags);
1543 E->setLocation(readSourceLocation());
1544 E->setReceiverLocation(readSourceLocation());
1545 switch (
Record.readInt()) {
1547 E->setBase(
Record.readSubExpr());
1550 E->setSuperReceiver(
Record.readType());
1553 E->setClassReceiver(readDeclAs<ObjCInterfaceDecl>());
1560 E->setRBracket(readSourceLocation());
1561 E->setBaseExpr(
Record.readSubExpr());
1562 E->setKeyExpr(
Record.readSubExpr());
1563 E->GetAtIndexMethodDecl = readDeclAs<ObjCMethodDecl>();
1564 E->SetAtIndexMethodDecl = readDeclAs<ObjCMethodDecl>();
1569 assert(
Record.peekInt() ==
E->getNumArgs());
1571 unsigned NumStoredSelLocs =
Record.readInt();
1572 E->SelLocsKind =
Record.readInt();
1573 E->setDelegateInitCall(
Record.readInt());
1574 E->IsImplicit =
Record.readInt();
1578 E->setInstanceReceiver(
Record.readSubExpr());
1582 E->setClassReceiver(readTypeSourceInfo());
1594 assert(Kind ==
E->getReceiverKind());
1597 E->setMethodDecl(readDeclAs<ObjCMethodDecl>());
1599 E->setSelector(
Record.readSelector());
1601 E->LBracLoc = readSourceLocation();
1602 E->RBracLoc = readSourceLocation();
1604 for (
unsigned I = 0, N =
E->getNumArgs(); I != N; ++I)
1605 E->setArg(I,
Record.readSubExpr());
1608 for (
unsigned I = 0; I != NumStoredSelLocs; ++I)
1609 Locs[I] = readSourceLocation();
1614 S->setElement(
Record.readSubStmt());
1615 S->setCollection(
Record.readSubExpr());
1616 S->setBody(
Record.readSubStmt());
1617 S->setForLoc(readSourceLocation());
1618 S->setRParenLoc(readSourceLocation());
1623 S->setCatchBody(
Record.readSubStmt());
1624 S->setCatchParamDecl(readDeclAs<VarDecl>());
1625 S->setAtCatchLoc(readSourceLocation());
1626 S->setRParenLoc(readSourceLocation());
1631 S->setFinallyBody(
Record.readSubStmt());
1632 S->setAtFinallyLoc(readSourceLocation());
1637 S->setSubStmt(
Record.readSubStmt());
1638 S->setAtLoc(readSourceLocation());
1643 assert(
Record.peekInt() == S->getNumCatchStmts());
1645 bool HasFinally =
Record.readInt();
1646 S->setTryBody(
Record.readSubStmt());
1647 for (
unsigned I = 0, N = S->getNumCatchStmts(); I != N; ++I)
1648 S->setCatchStmt(I, cast_or_null<ObjCAtCatchStmt>(
Record.readSubStmt()));
1651 S->setFinallyStmt(
Record.readSubStmt());
1652 S->setAtTryLoc(readSourceLocation());
1657 S->setSynchExpr(
Record.readSubStmt());
1658 S->setSynchBody(
Record.readSubStmt());
1659 S->setAtSynchronizedLoc(readSourceLocation());
1664 S->setThrowExpr(
Record.readSubStmt());
1665 S->setThrowLoc(readSourceLocation());
1670 E->setValue(
Record.readInt());
1671 E->setLocation(readSourceLocation());
1679 E->VersionToCheck =
Record.readVersionTuple();
1686void ASTStmtReader::VisitCXXCatchStmt(
CXXCatchStmt *S) {
1688 S->CatchLoc = readSourceLocation();
1689 S->ExceptionDecl = readDeclAs<VarDecl>();
1690 S->HandlerBlock =
Record.readSubStmt();
1693void ASTStmtReader::VisitCXXTryStmt(
CXXTryStmt *S) {
1695 assert(
Record.peekInt() == S->getNumHandlers() &&
"NumStmtFields is wrong ?");
1697 S->TryLoc = readSourceLocation();
1698 S->getStmts()[0] =
Record.readSubStmt();
1699 for (
unsigned i = 0, e = S->getNumHandlers(); i != e; ++i)
1700 S->getStmts()[i + 1] =
Record.readSubStmt();
1705 S->ForLoc = readSourceLocation();
1706 S->CoawaitLoc = readSourceLocation();
1707 S->ColonLoc = readSourceLocation();
1708 S->RParenLoc = readSourceLocation();
1709 S->setInit(
Record.readSubStmt());
1710 S->setRangeStmt(
Record.readSubStmt());
1711 S->setBeginStmt(
Record.readSubStmt());
1712 S->setEndStmt(
Record.readSubStmt());
1713 S->setCond(
Record.readSubExpr());
1714 S->setInc(
Record.readSubExpr());
1715 S->setLoopVarStmt(
Record.readSubStmt());
1716 S->setBody(
Record.readSubStmt());
1721 S->KeywordLoc = readSourceLocation();
1722 S->IsIfExists =
Record.readInt();
1723 S->QualifierLoc =
Record.readNestedNameSpecifierLoc();
1724 S->NameInfo =
Record.readDeclarationNameInfo();
1725 S->SubStmt =
Record.readSubStmt();
1731 E->Range =
Record.readSourceRange();
1734void ASTStmtReader::VisitCXXRewrittenBinaryOperator(
1738 E->SemanticForm =
Record.readSubExpr();
1744 unsigned NumArgs =
Record.readInt();
1745 assert((NumArgs ==
E->getNumArgs()) &&
"Wrong NumArgs!");
1755 E->Constructor = readDeclAs<CXXConstructorDecl>();
1756 E->ParenOrBraceRange = readSourceRange();
1758 for (
unsigned I = 0; I != NumArgs; ++I)
1759 E->setArg(I,
Record.readSubExpr());
1764 E->Constructor = readDeclAs<CXXConstructorDecl>();
1765 E->Loc = readSourceLocation();
1766 E->ConstructsVirtualBase =
Record.readInt();
1767 E->InheritedFromVirtualBase =
Record.readInt();
1771 VisitCXXConstructExpr(
E);
1772 E->TSI = readTypeSourceInfo();
1775void ASTStmtReader::VisitLambdaExpr(
LambdaExpr *
E) {
1777 unsigned NumCaptures =
Record.readInt();
1780 E->IntroducerRange = readSourceRange();
1782 E->CaptureDefaultLoc = readSourceLocation();
1785 E->ClosingBrace = readSourceLocation();
1789 CEnd =
E->capture_init_end();
1800 E->SubExpr =
Record.readSubExpr();
1804 VisitExplicitCastExpr(
E);
1808 if (CurrentUnpackingBits->getNextBit())
1809 E->AngleBrackets = readSourceRange();
1813 return VisitCXXNamedCastExpr(
E);
1817 return VisitCXXNamedCastExpr(
E);
1821 return VisitCXXNamedCastExpr(
E);
1825 return VisitCXXNamedCastExpr(
E);
1829 return VisitCXXNamedCastExpr(
E);
1833 VisitExplicitCastExpr(
E);
1834 E->setLParenLoc(readSourceLocation());
1835 E->setRParenLoc(readSourceLocation());
1839 VisitExplicitCastExpr(
E);
1840 E->KWLoc = readSourceLocation();
1841 E->RParenLoc = readSourceLocation();
1846 E->UDSuffixLoc = readSourceLocation();
1851 E->setValue(
Record.readInt());
1852 E->setLocation(readSourceLocation());
1857 E->setLocation(readSourceLocation());
1862 E->setSourceRange(readSourceRange());
1863 if (
E->isTypeOperand())
1864 E->Operand = readTypeSourceInfo();
1866 E->Operand =
Record.readSubExpr();
1871 E->setLocation(readSourceLocation());
1872 E->setImplicit(
Record.readInt());
1873 E->setCapturedByCopyInLambdaWithExplicitObjectParameter(
Record.readInt());
1879 E->Operand =
Record.readSubExpr();
1885 E->Param = readDeclAs<ParmVarDecl>();
1886 E->UsedContext = readDeclAs<DeclContext>();
1890 *
E->getTrailingObjects<
Expr *>() =
Record.readSubExpr();
1896 E->Field = readDeclAs<FieldDecl>();
1897 E->UsedContext = readDeclAs<DeclContext>();
1900 *
E->getTrailingObjects<
Expr *>() =
Record.readSubExpr();
1905 E->setTemporary(
Record.readCXXTemporary());
1906 E->setSubExpr(
Record.readSubExpr());
1911 E->TypeInfo = readTypeSourceInfo();
1915void ASTStmtReader::VisitCXXNewExpr(
CXXNewExpr *
E) {
1918 bool IsArray =
Record.readInt();
1919 bool HasInit =
Record.readInt();
1920 unsigned NumPlacementArgs =
Record.readInt();
1921 bool IsParenTypeId =
Record.readInt();
1929 assert((IsArray ==
E->isArray()) &&
"Wrong IsArray!");
1930 assert((HasInit ==
E->hasInitializer()) &&
"Wrong HasInit!");
1931 assert((NumPlacementArgs ==
E->getNumPlacementArgs()) &&
1932 "Wrong NumPlacementArgs!");
1933 assert((IsParenTypeId ==
E->isParenTypeId()) &&
"Wrong IsParenTypeId!");
1936 (void)NumPlacementArgs;
1938 E->setOperatorNew(readDeclAs<FunctionDecl>());
1939 E->setOperatorDelete(readDeclAs<FunctionDecl>());
1940 E->AllocatedTypeInfo = readTypeSourceInfo();
1942 E->getTrailingObjects<
SourceRange>()[0] = readSourceRange();
1943 E->Range = readSourceRange();
1944 E->DirectInitRange = readSourceRange();
1948 N =
E->raw_arg_end();
1950 *I =
Record.readSubStmt();
1959 E->OperatorDelete = readDeclAs<FunctionDecl>();
1960 E->Argument =
Record.readSubExpr();
1967 E->Base =
Record.readSubExpr();
1968 E->IsArrow =
Record.readInt();
1969 E->OperatorLoc = readSourceLocation();
1970 E->QualifierLoc =
Record.readNestedNameSpecifierLoc();
1971 E->ScopeType = readTypeSourceInfo();
1972 E->ColonColonLoc = readSourceLocation();
1973 E->TildeLoc = readSourceLocation();
1977 E->setDestroyedType(II, readSourceLocation());
1979 E->setDestroyedType(readTypeSourceInfo());
1985 unsigned NumObjects =
Record.readInt();
1986 assert(NumObjects ==
E->getNumObjects());
1987 for (
unsigned i = 0; i != NumObjects; ++i) {
1991 Obj = readDeclAs<BlockDecl>();
1993 Obj = cast<CompoundLiteralExpr>(
Record.readSubExpr());
1995 llvm_unreachable(
"unexpected cleanup object type");
2000 E->SubExpr =
Record.readSubExpr();
2003void ASTStmtReader::VisitCXXDependentScopeMemberExpr(
2007 unsigned NumTemplateArgs =
Record.readInt();
2008 CurrentUnpackingBits.emplace(
Record.readInt());
2009 bool HasTemplateKWAndArgsInfo = CurrentUnpackingBits->getNextBit();
2010 bool HasFirstQualifierFoundInScope = CurrentUnpackingBits->getNextBit();
2012 assert((HasTemplateKWAndArgsInfo ==
E->hasTemplateKWAndArgsInfo()) &&
2013 "Wrong HasTemplateKWAndArgsInfo!");
2015 (HasFirstQualifierFoundInScope ==
E->hasFirstQualifierFoundInScope()) &&
2016 "Wrong HasFirstQualifierFoundInScope!");
2018 if (HasTemplateKWAndArgsInfo)
2023 assert((NumTemplateArgs ==
E->getNumTemplateArgs()) &&
2024 "Wrong NumTemplateArgs!");
2027 CurrentUnpackingBits->getNextBit();
2029 E->BaseType =
Record.readType();
2030 E->QualifierLoc =
Record.readNestedNameSpecifierLoc();
2032 if (CurrentUnpackingBits->getNextBit())
2033 E->Base =
Record.readSubExpr();
2039 if (HasFirstQualifierFoundInScope)
2040 *
E->getTrailingObjects<
NamedDecl *>() = readDeclAs<NamedDecl>();
2042 E->MemberNameInfo =
Record.readDeclarationNameInfo();
2049 if (CurrentUnpackingBits->getNextBit())
2053 CurrentUnpackingBits->getNextBits(16));
2055 E->QualifierLoc =
Record.readNestedNameSpecifierLoc();
2056 E->NameInfo =
Record.readDeclarationNameInfo();
2062 assert(
Record.peekInt() ==
E->getNumArgs() &&
2063 "Read wrong record during creation ?");
2065 for (
unsigned I = 0, N =
E->getNumArgs(); I != N; ++I)
2066 E->setArg(I,
Record.readSubExpr());
2067 E->TypeAndInitForm.setPointer(readTypeSourceInfo());
2068 E->setLParenLoc(readSourceLocation());
2069 E->setRParenLoc(readSourceLocation());
2070 E->TypeAndInitForm.setInt(
Record.readInt());
2076 unsigned NumResults =
Record.readInt();
2077 CurrentUnpackingBits.emplace(
Record.readInt());
2078 bool HasTemplateKWAndArgsInfo = CurrentUnpackingBits->getNextBit();
2079 assert((
E->getNumDecls() == NumResults) &&
"Wrong NumResults!");
2080 assert((
E->hasTemplateKWAndArgsInfo() == HasTemplateKWAndArgsInfo) &&
2081 "Wrong HasTemplateKWAndArgsInfo!");
2083 if (HasTemplateKWAndArgsInfo) {
2084 unsigned NumTemplateArgs =
Record.readInt();
2086 E->getTrailingTemplateArgumentLoc(),
2088 assert((
E->getNumTemplateArgs() == NumTemplateArgs) &&
2089 "Wrong NumTemplateArgs!");
2093 for (
unsigned I = 0; I != NumResults; ++I) {
2094 auto *
D = readDeclAs<NamedDecl>();
2101 for (
unsigned I = 0; I != NumResults; ++I) {
2102 Results[I] = (
Iter + I).getPair();
2105 E->NameInfo =
Record.readDeclarationNameInfo();
2106 E->QualifierLoc =
Record.readNestedNameSpecifierLoc();
2110 VisitOverloadExpr(
E);
2113 CurrentUnpackingBits->getNextBit();
2115 if (CurrentUnpackingBits->getNextBit())
2116 E->Base =
Record.readSubExpr();
2120 E->OperatorLoc = readSourceLocation();
2122 E->BaseType =
Record.readType();
2126 VisitOverloadExpr(
E);
2128 E->NamingClass = readDeclAs<CXXRecordDecl>();
2141 for (
unsigned I = 0, N =
E->getNumArgs(); I != N; ++I)
2142 Args[I] = readTypeSourceInfo();
2152 E->QueriedType = readTypeSourceInfo();
2153 E->Dimension =
Record.readSubExpr();
2161 E->QueriedExpression =
Record.readSubExpr();
2169 E->Range = readSourceRange();
2170 E->Operand =
Record.readSubExpr();
2175 E->EllipsisLoc = readSourceLocation();
2176 E->NumExpansions =
Record.readInt();
2177 E->Pattern =
Record.readSubExpr();
2182 unsigned NumPartialArgs =
Record.readInt();
2183 E->OperatorLoc = readSourceLocation();
2184 E->PackLoc = readSourceLocation();
2185 E->RParenLoc = readSourceLocation();
2187 if (
E->isPartiallySubstituted()) {
2188 assert(
E->Length == NumPartialArgs);
2190 *
E = I + NumPartialArgs;
2200 E->TransformedExpressions =
Record.readInt();
2201 E->FullySubstituted =
Record.readInt();
2202 E->EllipsisLoc = readSourceLocation();
2203 E->RSquareLoc = readSourceLocation();
2204 E->SubExprs[0] =
Record.readStmt();
2205 E->SubExprs[1] =
Record.readStmt();
2206 auto **Exprs =
E->getTrailingObjects<
Expr *>();
2207 for (
unsigned I = 0; I <
E->TransformedExpressions; ++I)
2208 Exprs[I] =
Record.readExpr();
2211void ASTStmtReader::VisitSubstNonTypeTemplateParmExpr(
2214 E->AssociatedDeclAndRef.setPointer(readDeclAs<Decl>());
2215 E->AssociatedDeclAndRef.setInt(CurrentUnpackingBits->getNextBit());
2216 E->Index = CurrentUnpackingBits->getNextBits(12);
2217 if (CurrentUnpackingBits->getNextBit())
2218 E->PackIndex =
Record.readInt();
2222 E->Replacement =
Record.readSubExpr();
2225void ASTStmtReader::VisitSubstNonTypeTemplateParmPackExpr(
2228 E->AssociatedDecl = readDeclAs<Decl>();
2236 E->NameLoc = readSourceLocation();
2241 E->NumParameters =
Record.readInt();
2242 E->ParamPack = readDeclAs<ParmVarDecl>();
2243 E->NameLoc = readSourceLocation();
2244 auto **Parms =
E->getTrailingObjects<
VarDecl *>();
2245 for (
unsigned i = 0, n =
E->NumParameters; i != n; ++i)
2246 Parms[i] = readDeclAs<VarDecl>();
2251 bool HasMaterialzedDecl =
Record.readInt();
2252 if (HasMaterialzedDecl)
2253 E->State = cast<LifetimeExtendedTemporaryDecl>(
Record.readDecl());
2255 E->State =
Record.readSubExpr();
2260 E->LParenLoc = readSourceLocation();
2261 E->EllipsisLoc = readSourceLocation();
2262 E->RParenLoc = readSourceLocation();
2263 E->NumExpansions =
Record.readInt();
2264 E->SubExprs[0] =
Record.readSubExpr();
2265 E->SubExprs[1] =
Record.readSubExpr();
2266 E->SubExprs[2] =
Record.readSubExpr();
2272 unsigned ExpectedNumExprs =
Record.readInt();
2273 assert(
E->NumExprs == ExpectedNumExprs &&
2274 "expected number of expressions does not equal the actual number of "
2275 "serialized expressions.");
2276 E->NumUserSpecifiedExprs =
Record.readInt();
2277 E->InitLoc = readSourceLocation();
2278 E->LParenLoc = readSourceLocation();
2279 E->RParenLoc = readSourceLocation();
2280 for (
unsigned I = 0; I < ExpectedNumExprs; I++)
2281 E->getTrailingObjects<
Expr *>()[I] =
Record.readSubExpr();
2283 bool HasArrayFillerOrUnionDecl =
Record.readBool();
2284 if (HasArrayFillerOrUnionDecl) {
2285 bool HasArrayFiller =
Record.readBool();
2286 if (HasArrayFiller) {
2287 E->setArrayFiller(
Record.readSubExpr());
2289 E->setInitializedFieldInUnion(readDeclAs<FieldDecl>());
2292 E->updateDependence();
2297 E->SourceExpr =
Record.readSubExpr();
2299 E->setIsUnique(
Record.readInt());
2302void ASTStmtReader::VisitTypoExpr(
TypoExpr *
E) {
2303 llvm_unreachable(
"Cannot read TypoExpr nodes");
2308 unsigned NumArgs =
Record.readInt();
2309 E->BeginLoc = readSourceLocation();
2310 E->EndLoc = readSourceLocation();
2311 assert((NumArgs + 0LL ==
2316 Child =
Record.readSubStmt();
2324 E->IsArrow = (
Record.readInt() != 0);
2325 E->BaseExpr =
Record.readSubExpr();
2326 E->QualifierLoc =
Record.readNestedNameSpecifierLoc();
2327 E->MemberLoc = readSourceLocation();
2328 E->TheDecl = readDeclAs<MSPropertyDecl>();
2333 E->setBase(
Record.readSubExpr());
2334 E->setIdx(
Record.readSubExpr());
2335 E->setRBracketLoc(readSourceLocation());
2340 E->setSourceRange(readSourceRange());
2341 E->Guid = readDeclAs<MSGuidDecl>();
2342 if (
E->isTypeOperand())
2343 E->Operand = readTypeSourceInfo();
2345 E->Operand =
Record.readSubExpr();
2348void ASTStmtReader::VisitSEHLeaveStmt(
SEHLeaveStmt *S) {
2350 S->setLeaveLoc(readSourceLocation());
2355 S->Loc = readSourceLocation();
2356 S->Children[SEHExceptStmt::FILTER_EXPR] =
Record.readSubStmt();
2357 S->Children[SEHExceptStmt::BLOCK] =
Record.readSubStmt();
2362 S->Loc = readSourceLocation();
2363 S->Block =
Record.readSubStmt();
2366void ASTStmtReader::VisitSEHTryStmt(
SEHTryStmt *S) {
2368 S->IsCXXTry =
Record.readInt();
2369 S->TryLoc = readSourceLocation();
2370 S->Children[SEHTryStmt::TRY] =
Record.readSubStmt();
2371 S->Children[SEHTryStmt::HANDLER] =
Record.readSubStmt();
2380 E->setPreArg(CUDAKernelCallExpr::CONFIG,
Record.readSubExpr());
2386void ASTStmtReader::VisitAsTypeExpr(
AsTypeExpr *
E) {
2388 E->BuiltinLoc = readSourceLocation();
2389 E->RParenLoc = readSourceLocation();
2390 E->SrcExpr =
Record.readSubExpr();
2399 for (
Stmt *&SubStmt : S->SubStmts)
2400 SubStmt =
Record.readSubStmt();
2404 Record.readOMPChildren(
E->Data);
2405 E->setLocStart(readSourceLocation());
2406 E->setLocEnd(readSourceLocation());
2413 VisitOMPExecutableDirective(
D);
2417 VisitOMPLoopBasedDirective(
D);
2424 VisitOMPExecutableDirective(
D);
2429 VisitOMPExecutableDirective(
D);
2430 D->setHasCancel(
Record.readBool());
2434 VisitOMPLoopDirective(
D);
2437void ASTStmtReader::VisitOMPLoopTransformationDirective(
2439 VisitOMPLoopBasedDirective(
D);
2440 D->setNumGeneratedLoops(
Record.readUInt32());
2444 VisitOMPLoopTransformationDirective(
D);
2448 VisitOMPLoopTransformationDirective(
D);
2452 VisitOMPLoopTransformationDirective(
D);
2456 VisitOMPLoopTransformationDirective(
D);
2460 VisitOMPLoopDirective(
D);
2461 D->setHasCancel(
Record.readBool());
2465 VisitOMPLoopDirective(
D);
2470 VisitOMPExecutableDirective(
D);
2471 D->setHasCancel(
Record.readBool());
2476 VisitOMPExecutableDirective(
D);
2477 D->setHasCancel(
Record.readBool());
2482 VisitOMPExecutableDirective(
D);
2487 VisitOMPExecutableDirective(
D);
2492 VisitOMPExecutableDirective(
D);
2497 VisitOMPExecutableDirective(
D);
2498 D->DirName =
Record.readDeclarationNameInfo();
2502 VisitOMPLoopDirective(
D);
2503 D->setHasCancel(
Record.readBool());
2506void ASTStmtReader::VisitOMPParallelForSimdDirective(
2508 VisitOMPLoopDirective(
D);
2511void ASTStmtReader::VisitOMPParallelMasterDirective(
2514 VisitOMPExecutableDirective(
D);
2517void ASTStmtReader::VisitOMPParallelMaskedDirective(
2520 VisitOMPExecutableDirective(
D);
2523void ASTStmtReader::VisitOMPParallelSectionsDirective(
2526 VisitOMPExecutableDirective(
D);
2527 D->setHasCancel(
Record.readBool());
2532 VisitOMPExecutableDirective(
D);
2533 D->setHasCancel(
Record.readBool());
2538 VisitOMPExecutableDirective(
D);
2543 VisitOMPExecutableDirective(
D);
2550 VisitOMPExecutableDirective(
D);
2555 VisitOMPExecutableDirective(
D);
2562 VisitOMPExecutableDirective(
D);
2567 VisitOMPExecutableDirective(
D);
2572 VisitOMPExecutableDirective(
D);
2577 VisitOMPExecutableDirective(
D);
2582 VisitOMPExecutableDirective(
D);
2587 VisitOMPExecutableDirective(
D);
2592 VisitOMPExecutableDirective(
D);
2593 D->Flags.IsXLHSInRHSPart =
Record.readBool() ? 1 : 0;
2594 D->Flags.IsPostfixUpdate =
Record.readBool() ? 1 : 0;
2595 D->Flags.IsFailOnly =
Record.readBool() ? 1 : 0;
2600 VisitOMPExecutableDirective(
D);
2605 VisitOMPExecutableDirective(
D);
2608void ASTStmtReader::VisitOMPTargetEnterDataDirective(
2611 VisitOMPExecutableDirective(
D);
2614void ASTStmtReader::VisitOMPTargetExitDataDirective(
2617 VisitOMPExecutableDirective(
D);
2620void ASTStmtReader::VisitOMPTargetParallelDirective(
2623 VisitOMPExecutableDirective(
D);
2624 D->setHasCancel(
Record.readBool());
2627void ASTStmtReader::VisitOMPTargetParallelForDirective(
2629 VisitOMPLoopDirective(
D);
2630 D->setHasCancel(
Record.readBool());
2635 VisitOMPExecutableDirective(
D);
2638void ASTStmtReader::VisitOMPCancellationPointDirective(
2641 VisitOMPExecutableDirective(
D);
2647 VisitOMPExecutableDirective(
D);
2652 VisitOMPLoopDirective(
D);
2653 D->setHasCancel(
Record.readBool());
2657 VisitOMPLoopDirective(
D);
2660void ASTStmtReader::VisitOMPMasterTaskLoopDirective(
2662 VisitOMPLoopDirective(
D);
2663 D->setHasCancel(
Record.readBool());
2666void ASTStmtReader::VisitOMPMaskedTaskLoopDirective(
2668 VisitOMPLoopDirective(
D);
2669 D->setHasCancel(
Record.readBool());
2672void ASTStmtReader::VisitOMPMasterTaskLoopSimdDirective(
2674 VisitOMPLoopDirective(
D);
2677void ASTStmtReader::VisitOMPMaskedTaskLoopSimdDirective(
2679 VisitOMPLoopDirective(
D);
2682void ASTStmtReader::VisitOMPParallelMasterTaskLoopDirective(
2684 VisitOMPLoopDirective(
D);
2685 D->setHasCancel(
Record.readBool());
2688void ASTStmtReader::VisitOMPParallelMaskedTaskLoopDirective(
2690 VisitOMPLoopDirective(
D);
2691 D->setHasCancel(
Record.readBool());
2694void ASTStmtReader::VisitOMPParallelMasterTaskLoopSimdDirective(
2696 VisitOMPLoopDirective(
D);
2699void ASTStmtReader::VisitOMPParallelMaskedTaskLoopSimdDirective(
2701 VisitOMPLoopDirective(
D);
2705 VisitOMPLoopDirective(
D);
2710 VisitOMPExecutableDirective(
D);
2713void ASTStmtReader::VisitOMPDistributeParallelForDirective(
2715 VisitOMPLoopDirective(
D);
2716 D->setHasCancel(
Record.readBool());
2719void ASTStmtReader::VisitOMPDistributeParallelForSimdDirective(
2721 VisitOMPLoopDirective(
D);
2724void ASTStmtReader::VisitOMPDistributeSimdDirective(
2726 VisitOMPLoopDirective(
D);
2729void ASTStmtReader::VisitOMPTargetParallelForSimdDirective(
2731 VisitOMPLoopDirective(
D);
2735 VisitOMPLoopDirective(
D);
2738void ASTStmtReader::VisitOMPTeamsDistributeDirective(
2740 VisitOMPLoopDirective(
D);
2743void ASTStmtReader::VisitOMPTeamsDistributeSimdDirective(
2745 VisitOMPLoopDirective(
D);
2748void ASTStmtReader::VisitOMPTeamsDistributeParallelForSimdDirective(
2750 VisitOMPLoopDirective(
D);
2753void ASTStmtReader::VisitOMPTeamsDistributeParallelForDirective(
2755 VisitOMPLoopDirective(
D);
2756 D->setHasCancel(
Record.readBool());
2761 VisitOMPExecutableDirective(
D);
2764void ASTStmtReader::VisitOMPTargetTeamsDistributeDirective(
2766 VisitOMPLoopDirective(
D);
2769void ASTStmtReader::VisitOMPTargetTeamsDistributeParallelForDirective(
2771 VisitOMPLoopDirective(
D);
2772 D->setHasCancel(
Record.readBool());
2775void ASTStmtReader::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
2777 VisitOMPLoopDirective(
D);
2780void ASTStmtReader::VisitOMPTargetTeamsDistributeSimdDirective(
2782 VisitOMPLoopDirective(
D);
2787 VisitOMPExecutableDirective(
D);
2792 VisitOMPExecutableDirective(
D);
2793 D->setTargetCallLoc(
Record.readSourceLocation());
2798 VisitOMPExecutableDirective(
D);
2802 VisitOMPLoopDirective(
D);
2805void ASTStmtReader::VisitOMPTeamsGenericLoopDirective(
2807 VisitOMPLoopDirective(
D);
2810void ASTStmtReader::VisitOMPTargetTeamsGenericLoopDirective(
2812 VisitOMPLoopDirective(
D);
2813 D->setCanBeParallelFor(
Record.readBool());
2816void ASTStmtReader::VisitOMPParallelGenericLoopDirective(
2818 VisitOMPLoopDirective(
D);
2821void ASTStmtReader::VisitOMPTargetParallelGenericLoopDirective(
2823 VisitOMPLoopDirective(
D);
2832 S->Range =
Record.readSourceRange();
2833 S->DirectiveLoc =
Record.readSourceLocation();
2834 Record.readOpenACCClauseList(S->Clauses);
2837void ASTStmtReader::VisitOpenACCAssociatedStmtConstruct(
2839 VisitOpenACCConstructStmt(S);
2840 S->setAssociatedStmt(
Record.readSubStmt());
2845 VisitOpenACCAssociatedStmtConstruct(S);
2850 VisitOpenACCAssociatedStmtConstruct(S);
2856 VisitOpenACCAssociatedStmtConstruct(S);
2861 VisitOpenACCAssociatedStmtConstruct(S);
2864void ASTStmtReader::VisitOpenACCEnterDataConstruct(
2867 VisitOpenACCConstructStmt(S);
2872 VisitOpenACCConstructStmt(S);
2877 VisitOpenACCConstructStmt(S);
2882 VisitOpenACCConstructStmt(S);
2887 VisitOpenACCConstructStmt(S);
2892 VisitOpenACCConstructStmt(S);
2897 VisitOpenACCAssociatedStmtConstruct(S);
2904 VisitOpenACCConstructStmt(S);
2905 S->LParenLoc =
Record.readSourceLocation();
2906 S->RParenLoc =
Record.readSourceLocation();
2907 S->QueuesLoc =
Record.readSourceLocation();
2909 for (
unsigned I = 0; I < S->NumExprs; ++I) {
2910 S->getExprPtr()[I] = cast_if_present<Expr>(
Record.readSubStmt());
2911 assert((I == 0 || S->getExprPtr()[I] !=
nullptr) &&
2912 "Only first expression should be null");
2922 S->SubExprs[HLSLOutArgExpr::BaseLValue] =
Record.readSubExpr();
2923 S->SubExprs[HLSLOutArgExpr::CastedTemporary] =
Record.readSubExpr();
2924 S->SubExprs[HLSLOutArgExpr::WritebackCast] =
Record.readSubExpr();
2925 S->IsInOut =
Record.readBool();
2933 switch (ReadingKind) {
2935 llvm_unreachable(
"should not call this when not reading anything");
2938 return ReadStmtFromStream(F);
2943 llvm_unreachable(
"ReadingKind not set ?");
2947 return cast_or_null<Expr>(
ReadStmt(F));
2962 ReadingKindTracker ReadingKind(Read_Stmt, *
this);
2967 llvm::DenseMap<uint64_t, Stmt *> StmtEntries;
2970 unsigned PrevNumStmts = StmtStack.size();
2979 Cursor.advanceSkippingSubblocks();
2981 Error(
toString(MaybeEntry.takeError()));
2984 llvm::BitstreamEntry Entry = MaybeEntry.get();
2986 switch (Entry.Kind) {
2987 case llvm::BitstreamEntry::SubBlock:
2988 case llvm::BitstreamEntry::Error:
2989 Error(
"malformed block record in AST file");
2991 case llvm::BitstreamEntry::EndBlock:
2993 case llvm::BitstreamEntry::Record:
3000 bool Finished =
false;
3001 bool IsStmtReference =
false;
3003 if (!MaybeStmtCode) {
3004 Error(
toString(MaybeStmtCode.takeError()));
3007 switch ((
StmtCode)MaybeStmtCode.get()) {
3013 IsStmtReference =
true;
3014 assert(StmtEntries.contains(
Record[0]) &&
3015 "No stmt was recorded for this offset reference!");
3016 S = StmtEntries[
Record.readInt()];
3056 bool HasElse = IfStmtBits.getNextBit();
3057 bool HasVar = IfStmtBits.getNextBit();
3058 bool HasInit = IfStmtBits.getNextBit();
3148 DeclRefExprBits.advance(5);
3149 bool HasFoundDecl = DeclRefExprBits.getNextBit();
3150 bool HasQualifier = DeclRefExprBits.getNextBit();
3151 bool HasTemplateKWAndArgsInfo = DeclRefExprBits.getNextBit();
3152 unsigned NumTemplateArgs = HasTemplateKWAndArgsInfo
3156 HasTemplateKWAndArgsInfo, NumTemplateArgs);
3201 bool HasFPFeatures = UnaryOperatorBits.getNextBit();
3241 CallExprBits.advance(1);
3242 auto HasFPFeatures = CallExprBits.getNextBit();
3254 bool HasQualifier = ExprMemberBits.getNextBit();
3255 bool HasFoundDecl = ExprMemberBits.getNextBit();
3256 bool HasTemplateInfo = ExprMemberBits.getNextBit();
3259 HasTemplateInfo, NumTemplateArgs);
3265 BinaryOperatorBits.advance( 6);
3266 bool HasFPFeatures = BinaryOperatorBits.getNextBit();
3273 BinaryOperatorBits.advance( 6);
3274 bool HasFPFeatures = BinaryOperatorBits.getNextBit();
3290 CastExprBits.advance(7);
3291 bool HasFPFeatures = CastExprBits.getNextBit();
3299 CastExprBits.advance(7);
3300 bool HasFPFeatures = CastExprBits.getNextBit();
3433 llvm_unreachable(
"mismatching AST file");
3547 CollapsedNum,
Empty);
3567 "Reverse directive accepts only a single loop");
3569 "Reverse directive has no clauses");
3629 CollapsedNum,
Empty);
3637 CollapsedNum,
Empty);
3703 !HasAssociatedStmt,
Empty);
3741 CollapsedNum,
Empty);
3776 CollapsedNum,
Empty);
3784 CollapsedNum,
Empty);
3792 CollapsedNum,
Empty);
3800 CollapsedNum,
Empty);
3808 CollapsedNum,
Empty);
3816 CollapsedNum,
Empty);
3824 CollapsedNum,
Empty);
3832 Context, NumClauses, CollapsedNum,
Empty);
3840 Context, NumClauses, CollapsedNum,
Empty);
3856 CollapsedNum,
Empty);
3873 CollapsedNum,
Empty);
3881 CollapsedNum,
Empty);
3897 CollapsedNum,
Empty);
3905 CollapsedNum,
Empty);
3913 Context, NumClauses, CollapsedNum,
Empty);
3921 Context, NumClauses, CollapsedNum,
Empty);
3934 CollapsedNum,
Empty);
3942 Context, NumClauses, CollapsedNum,
Empty);
3950 Context, NumClauses, CollapsedNum,
Empty);
3958 Context, NumClauses, CollapsedNum,
Empty);
3981 CollapsedNum,
Empty);
3989 CollapsedNum,
Empty);
3997 CollapsedNum,
Empty);
4005 CollapsedNum,
Empty);
4013 Context, NumClauses, CollapsedNum,
Empty);
4026 CallExprBits.advance(1);
4027 auto HasFPFeatures = CallExprBits.getNextBit();
4036 CallExprBits.advance(1);
4037 auto HasFPFeatures = CallExprBits.getNextBit();
4066 CastExprBits.advance(7);
4067 bool HasFPFeatures = CastExprBits.getNextBit();
4095 CastExprBits.advance(7);
4096 bool HasFPFeatures = CastExprBits.getNextBit();
4104 assert(PathSize == 0 &&
"Wrong PathSize!");
4113 CallExprBits.advance(1);
4114 auto HasFPFeatures = CallExprBits.getNextBit();
4208 bool HasTemplateKWAndArgsInfo = DependentScopeMemberBits.getNextBit();
4210 bool HasFirstQualifierFoundInScope =
4211 DependentScopeMemberBits.getNextBit();
4213 Context, HasTemplateKWAndArgsInfo, NumTemplateArgs,
4214 HasFirstQualifierFoundInScope);
4222 bool HasTemplateKWAndArgsInfo = DependentScopeDeclRefBits.getNextBit();
4223 unsigned NumTemplateArgs =
4224 HasTemplateKWAndArgsInfo
4225 ? DependentScopeDeclRefBits.getNextBits(16)
4228 Context, HasTemplateKWAndArgsInfo, NumTemplateArgs);
4240 auto HasTemplateKWAndArgsInfo = OverloadExprBits.getNextBit();
4241 auto NumTemplateArgs = HasTemplateKWAndArgsInfo
4245 Context, NumResults, HasTemplateKWAndArgsInfo, NumTemplateArgs);
4252 auto HasTemplateKWAndArgsInfo = OverloadExprBits.getNextBit();
4253 auto NumTemplateArgs = HasTemplateKWAndArgsInfo
4257 Context, NumResults, HasTemplateKWAndArgsInfo, NumTemplateArgs);
4327 CallExprBits.advance(1);
4328 auto HasFPFeatures = CallExprBits.getNextBit();
4457 ++NumStatementsRead;
4459 if (S && !IsStmtReference) {
4461 StmtEntries[
Cursor.GetCurrentBitNo()] = S;
4465 "Invalid deserialization of statement");
4466 StmtStack.push_back(S);
4469 assert(StmtStack.size() > PrevNumStmts &&
"Read too many sub-stmts!");
4470 assert(StmtStack.size() == PrevNumStmts + 1 &&
"Extra expressions on stack!");
4471 return StmtStack.pop_back_val();
This file provides AST data structures related to concepts.
Defines the clang::ASTContext interface.
static concepts::Requirement::SubstitutionDiagnostic * readSubstitutionDiagnostic(ASTRecordReader &Record)
static ConstraintSatisfaction readConstraintSatisfaction(ASTRecordReader &Record)
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Defines the C++ template declaration subclasses.
Defines the clang::Expr interface and subclasses for C++ expressions.
Defines enumerations for expression traits intrinsics.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Defines several types used to describe C++ lambda expressions that are shared between the parser and ...
Defines the clang::LangOptions interface.
llvm::MachO::Record Record
This file defines OpenMP AST classes for clauses.
Defines some OpenMP-specific enums and functions.
Defines an enumeration for C++ overloaded operators.
static std::string toString(const clang::SanitizerSet &Sanitizers)
Produce a string containing comma-separated names of sanitizers in Sanitizers set.
Defines the clang::SourceLocation class and associated facilities.
Defines various enumerations that describe declaration and type specifiers.
Defines the Objective-C statement AST node classes.
This file defines OpenMP AST classes for executable directives and clauses.
This file defines SYCL AST classes used to represent calls to SYCL kernels.
Defines enumerations for the type traits support.
C Language Family Type Representation.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
ASTContext & getContext()
Retrieve the AST context that this AST reader supplements.
Stmt * ReadSubStmt()
Reads a sub-statement operand during statement reading.
Expr * ReadSubExpr()
Reads a sub-expression operand during statement reading.
Expr * ReadExpr(ModuleFile &F)
Reads an expression.
Stmt * ReadStmt(ModuleFile &F)
Reads a statement.
An object for streaming information from a record.
static const unsigned NumExprFields
The number of record fields required for the Expr class itself.
static const unsigned NumStmtFields
The number of record fields required for the Stmt class itself.
static const unsigned NumExprBits
The number of bits required for the packing bits for the Expr class.
void ReadTemplateKWAndArgsInfo(ASTTemplateKWAndArgsInfo &Args, TemplateArgumentLoc *ArgsLocArray, unsigned NumTemplateArgs)
Read and initialize a ExplicitTemplateArgumentList structure.
ASTStmtReader(ASTRecordReader &Record, llvm::BitstreamCursor &Cursor)
AddrLabelExpr - The GNU address of label extension, representing &&label.
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
Represents a loop initializing the elements of an array.
This class represents BOTH the OpenMP Array Section and OpenACC 'subarray', with a boolean differenti...
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent.
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
AsmStmt is the base class for GCCAsmStmt and MSAsmStmt.
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load,...
unsigned getNumSubExprs() const
Represents an attribute applied to a statement.
static AttributedStmt * CreateEmpty(const ASTContext &C, unsigned NumAttrs)
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
A builtin binary operation expression such as "x + y" or "x <= y".
static BinaryOperator * CreateEmpty(const ASTContext &C, bool hasFPFeatures)
A simple helper class to unpack an integer to bits and consuming the bits in order.
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
BreakStmt - This represents a break.
Represents a C++2a __builtin_bit_cast(T, v) expression.
CStyleCastExpr - An explicit cast in C (C99 6.5.4) or a C-style cast in C++ (C++ [expr....
static CStyleCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize, bool HasFPFeatures)
Represents a call to a CUDA kernel function.
static CUDAKernelCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty)
A C++ addrspace_cast expression (currently only enabled for OpenCL).
static CXXAddrspaceCastExpr * CreateEmpty(const ASTContext &Context)
Represents a base class of a C++ class.
Represents binding an expression to a temporary.
A boolean literal, per ([C++ lex.bool] Boolean literals).
CXXCatchStmt - This represents a C++ catch block.
A C++ const_cast expression (C++ [expr.const.cast]).
static CXXConstCastExpr * CreateEmpty(const ASTContext &Context)
Represents a call to a C++ constructor.
static CXXConstructExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs)
Create an empty C++ construction expression.
A default argument (C++ [dcl.fct.default]).
static CXXDefaultArgExpr * CreateEmpty(const ASTContext &C, bool HasRewrittenInit)
A use of a default initializer in a constructor or in aggregate initialization.
static CXXDefaultInitExpr * CreateEmpty(const ASTContext &C, bool HasRewrittenInit)
Represents a delete expression for memory deallocation and destructor calls, e.g.
Represents a C++ member access expression where the actual member referenced could not be resolved be...
static CXXDependentScopeMemberExpr * CreateEmpty(const ASTContext &Ctx, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs, bool HasFirstQualifierFoundInScope)
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
static CXXDynamicCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
Represents a folding of a pack over an operator.
CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for statement, represented as 'for (ra...
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr....
static CXXFunctionalCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize, bool HasFPFeatures)
Represents a call to an inherited base class constructor from an inheriting constructor.
Represents a call to a member function that may be written either with member call syntax (e....
static CXXMemberCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty)
Abstract class common to all of the C++ "named"/"keyword" casts.
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
static CXXNewExpr * CreateEmpty(const ASTContext &Ctx, bool IsArray, bool HasInit, unsigned NumPlacementArgs, bool IsParenTypeId)
Create an empty c++ new expression.
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
The null pointer literal (C++11 [lex.nullptr])
A call to an overloaded operator written using operator syntax.
static CXXOperatorCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty)
Represents a list-initialization with parenthesis.
static CXXParenListInitExpr * CreateEmpty(ASTContext &C, unsigned numExprs, EmptyShell Empty)
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
static CXXReinterpretCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
A rewritten comparison expression that was originally written using operator syntax.
An expression "T()" which creates an rvalue of a non-class type T.
A C++ static_cast expression (C++ [expr.static.cast]).
static CXXStaticCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize, bool hasFPFeatures)
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
Represents a C++ functional cast expression that builds a temporary object.
static CXXTemporaryObjectExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs)
Represents the this expression in C++.
static CXXThisExpr * CreateEmpty(const ASTContext &Ctx)
A C++ throw-expression (C++ [except.throw]).
CXXTryStmt - A C++ try block, including all handlers.
static CXXTryStmt * Create(const ASTContext &C, SourceLocation tryLoc, CompoundStmt *tryBlock, ArrayRef< Stmt * > handlers)
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
static CXXUnresolvedConstructExpr * CreateEmpty(const ASTContext &Context, unsigned NumArgs)
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
static CallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty)
Create an empty call expression, for deserialization.
This captures a statement into a function.
static CapturedStmt * CreateDeserialized(const ASTContext &Context, unsigned NumCaptures)
VariableCaptureKind
The different capture forms: by 'this', by reference, capture for variable-length array type etc.
CaseStmt - Represent a case statement.
static CaseStmt * CreateEmpty(const ASTContext &Ctx, bool CaseStmtIsGNURange)
Build an empty case statement.
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
Represents a 'co_await' expression.
CompoundAssignOperator - For compound assignments (e.g.
static CompoundAssignOperator * CreateEmpty(const ASTContext &C, bool hasFPFeatures)
CompoundLiteralExpr - [C99 6.5.2.5].
CompoundStmt - This represents a group of statements like { stmt stmt }.
static CompoundStmt * CreateEmpty(const ASTContext &C, unsigned NumStmts, bool HasFPFeatures)
Represents the specialization of a concept - evaluates to a prvalue of type bool.
ConditionalOperator - The ?: ternary operator.
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
static ConstantExpr * CreateEmpty(const ASTContext &Context, ConstantResultStorageKind StorageKind)
The result of a constraint satisfaction check, containing the necessary information to diagnose an un...
std::pair< SourceLocation, StringRef > SubstitutionDiagnostic
llvm::SmallVector< Detail, 4 > Details
The substituted constraint expr, if the template arguments could be substituted into them,...
ContinueStmt - This represents a continue.
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
Represents a 'co_return' statement in the C++ Coroutines TS.
Represents the body of a coroutine.
static CoroutineBodyStmt * Create(const ASTContext &C, CtorArgs const &Args)
Represents a 'co_yield' expression.
A POD class for pairing a NamedDecl* with an access specifier.
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
static DeclGroup * Create(ASTContext &C, Decl **Decls, unsigned NumDecls)
A reference to a declared variable, function, enum, etc.
static DeclRefExpr * CreateEmpty(const ASTContext &Context, bool HasQualifier, bool HasFoundDecl, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Construct an empty declaration reference expression.
DeclStmt - Adaptor class for mixing declarations with statements and expressions.
Decl - This represents one declaration (or definition), e.g.
Represents a 'co_await' expression while the type of the promise is dependent.
A qualified reference to a name whose declaration cannot yet be resolved.
static DependentScopeDeclRefExpr * CreateEmpty(const ASTContext &Context, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Represents a single C99 designator.
Represents a C99 designated initializer expression.
static DesignatedInitExpr * CreateEmpty(const ASTContext &C, unsigned NumIndexExprs)
Designator - A designator in a C99 designated initializer.
static Designator CreateArrayRangeDesignator(Expr *Start, Expr *End, SourceLocation LBracketLoc, SourceLocation EllipsisLoc)
Creates a GNU array-range designator.
static Designator CreateArrayDesignator(Expr *Index, SourceLocation LBracketLoc)
Creates an array designator.
static Designator CreateFieldDesignator(const IdentifierInfo *FieldName, SourceLocation DotLoc, SourceLocation FieldLoc)
Creates a field designator.
DoStmt - This represents a 'do/while' stmt.
Represents a reference to #emded data.
ExplicitCastExpr - An explicit cast written in the source code.
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
llvm::PointerUnion< BlockDecl *, CompoundLiteralExpr * > CleanupObject
The type of objects that are kept in the cleanup.
static ExprWithCleanups * Create(const ASTContext &C, EmptyShell empty, unsigned numObjects)
This represents one expression.
bool isValueDependent() const
Determines whether the value of this expression depends on.
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on.
void setValueKind(ExprValueKind Cat)
setValueKind - Set the value kind produced by this expression.
void setObjectKind(ExprObjectKind Cat)
setObjectKind - Set the object kind produced by this expression.
void setDependence(ExprDependence Deps)
Each concrete expr subclass is expected to compute its dependence and call this in the constructor.
An expression trait intrinsic.
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
static FPOptionsOverride getFromOpaqueInt(storage_type I)
static FixedPointLiteral * Create(const ASTContext &C, EmptyShell Empty)
Returns an empty fixed-point literal.
static FloatingLiteral * Create(const ASTContext &C, const llvm::APFloat &V, bool isexact, QualType Type, SourceLocation L)
ForStmt - This represents a 'for (init;cond;inc)' stmt.
Represents a reference to a function parameter pack or init-capture pack that has been substituted bu...
static FunctionParmPackExpr * CreateEmpty(const ASTContext &Context, unsigned NumParams)
This represents a GCC inline-assembly statement extension.
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
Represents a C11 generic selection.
static GenericSelectionExpr * CreateEmpty(const ASTContext &Context, unsigned NumAssocs)
Create an empty generic selection expression for deserialization.
GotoStmt - This represents a direct goto.
This class represents temporary values used to represent inout and out arguments in HLSL.
static HLSLOutArgExpr * CreateEmpty(const ASTContext &Ctx)
One of these records is kept for each identifier that is lexed.
IfStmt - This represents an if/then/else.
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...
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1....
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
static ImplicitCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize, bool HasFPFeatures)
Represents an implicitly-generated value initialization of an object of a given type.
IndirectGotoStmt - This represents an indirect goto.
Describes an C or C++ initializer list.
static IntegerLiteral * Create(const ASTContext &C, const llvm::APInt &V, QualType type, SourceLocation l)
Returns a new integer literal with value 'V' and type 'type'.
LabelStmt - Represents a label, which has a substatement.
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
static LambdaExpr * CreateDeserialized(const ASTContext &C, unsigned NumCaptures)
Construct a new lambda expression that will be deserialized from an external source.
This represents a Microsoft inline-assembly statement extension.
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name.
A member reference to an MSPropertyDecl.
MS property subscript expression.
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
MatrixSubscriptExpr - Matrix subscript expression for the MatrixType extension.
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
static MemberExpr * CreateEmpty(const ASTContext &Context, bool HasQualifier, bool HasFoundDecl, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
This represents a decl that may have a name.
A C++ nested-name-specifier augmented with source location information.
Represents a place-holder for an object not to be initialized by anything.
NullStmt - This is the null statement ";": C99 6.8.3p3.
An explicit cast in C or a C-style cast in C++, which uses the syntax ([s1][s2]......
static OMPArrayShapingExpr * CreateEmpty(const ASTContext &Context, unsigned NumDims)
static OMPAssumeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
This represents '#pragma omp atomic' directive.
static OMPAtomicDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp barrier' directive.
static OMPBarrierDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
This represents '#pragma omp cancel' directive.
static OMPCancelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
This represents '#pragma omp cancellation point' directive.
static OMPCancellationPointDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Representation of an OpenMP canonical loop.
static OMPCanonicalLoop * createEmpty(const ASTContext &Ctx)
Create an empty OMPCanonicalLoop for deserialization.
This represents '#pragma omp critical' directive.
static OMPCriticalDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
This represents '#pragma omp depobj' directive.
static OMPDepobjDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp dispatch' directive.
static OMPDispatchDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp distribute' directive.
static OMPDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp distribute parallel for' composite directive.
static OMPDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp distribute parallel for simd' composite directive.
static OMPDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp distribute simd' composite directive.
static OMPDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp error' directive.
static OMPErrorDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
This is a basic class for representing single OpenMP executable directive.
This represents '#pragma omp flush' directive.
static OMPFlushDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp for' directive.
static OMPForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp for simd' directive.
static OMPForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp loop' directive.
static OMPGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with a place for NumClauses clauses.
Represents the '#pragma omp interchange' loop transformation directive.
static OMPInterchangeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty '#pragma omp interchange' AST node for deserialization.
This represents '#pragma omp interop' directive.
static OMPInteropDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
OpenMP 5.0 [2.1.6 Iterators] Iterators are identifiers that expand to multiple values in the clause o...
static OMPIteratorExpr * CreateEmpty(const ASTContext &Context, unsigned NumIterators)
The base class for all loop-based directives, including loop transformation directives.
This is a common base class for loop directives ('omp simd', 'omp for', 'omp for simd' etc....
This represents '#pragma omp masked' directive.
static OMPMaskedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
This represents '#pragma omp masked taskloop' directive.
static OMPMaskedTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp masked taskloop simd' directive.
static OMPMaskedTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp master' directive.
static OMPMasterDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
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.
This represents '#pragma omp master taskloop simd' directive.
static OMPMasterTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp ordered' directive.
static OMPOrderedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, bool IsStandalone, EmptyShell)
Creates an empty directive.
This represents '#pragma omp parallel' directive.
static OMPParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for N clauses.
This represents '#pragma omp parallel for' directive.
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 for simd' directive.
static OMPParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel loop' directive.
static OMPParallelGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel masked' directive.
static OMPParallelMaskedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel masked taskloop' directive.
static OMPParallelMaskedTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel masked taskloop simd' directive.
static OMPParallelMaskedTaskLoopSimdDirective * 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' directive.
static OMPParallelMasterDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel master taskloop' directive.
static OMPParallelMasterTaskLoopDirective * 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 simd' directive.
static OMPParallelMasterTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel sections' directive.
static OMPParallelSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represents the '#pragma omp reverse' loop transformation directive.
static OMPReverseDirective * CreateEmpty(const ASTContext &C)
Build an empty '#pragma omp reverse' AST node for deserialization.
This represents '#pragma omp scan' directive.
static OMPScanDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp scope' directive.
static OMPScopeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
This represents '#pragma omp section' directive.
static OMPSectionDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
This represents '#pragma omp sections' directive.
static OMPSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp simd' directive.
static OMPSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp single' directive.
static OMPSingleDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target data' directive.
static OMPTargetDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
This represents '#pragma omp target' directive.
static OMPTargetDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target enter data' directive.
static OMPTargetEnterDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
This represents '#pragma omp target exit data' directive.
static OMPTargetExitDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
This represents '#pragma omp target parallel' directive.
static OMPTargetParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target parallel for' directive.
static OMPTargetParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target parallel for simd' directive.
static OMPTargetParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target parallel loop' directive.
static OMPTargetParallelGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target simd' directive.
static OMPTargetSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams' directive.
static OMPTargetTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams distribute' combined directive.
static OMPTargetTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams distribute parallel for' combined directive.
static OMPTargetTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams distribute parallel for simd' combined directive.
static OMPTargetTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams distribute simd' combined directive.
static OMPTargetTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams loop' directive.
static OMPTargetTeamsGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target update' directive.
static OMPTargetUpdateDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp task' directive.
static OMPTaskDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp taskloop' directive.
static OMPTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp taskloop simd' directive.
static OMPTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp taskgroup' directive.
static OMPTaskgroupDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
This represents '#pragma omp taskwait' directive.
static OMPTaskwaitDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
This represents '#pragma omp taskyield' directive.
static OMPTaskyieldDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
This represents '#pragma omp teams' directive.
static OMPTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams distribute' directive.
static OMPTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams distribute parallel for' composite directive.
static OMPTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams distribute parallel for simd' composite directive.
static OMPTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams distribute simd' combined directive.
static OMPTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams loop' directive.
static OMPTeamsGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents the '#pragma omp tile' loop transformation directive.
static OMPTileDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty '#pragma omp tile' AST node for deserialization.
This represents the '#pragma omp unroll' loop transformation directive.
static OMPUnrollDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses)
Build an empty '#pragma omp unroll' AST node for deserialization.
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp,...
static ObjCArrayLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements)
Represents Objective-C's @catch statement.
Represents Objective-C's @finally statement.
Represents Objective-C's @synchronized statement.
Represents Objective-C's @throw statement.
Represents Objective-C's @try ... @catch ... @finally statement.
static ObjCAtTryStmt * CreateEmpty(const ASTContext &Context, unsigned NumCatchStmts, bool HasFinally)
Represents Objective-C's @autoreleasepool Statement.
A runtime availability query.
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
ObjCBoxedExpr - used for generalized expression boxing.
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers,...
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
static ObjCDictionaryLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements, bool HasPackExpansions)
ObjCEncodeExpr, used for @encode in Objective-C.
Represents Objective-C's collection statement.
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
ObjCIvarRefExpr - A reference to an ObjC instance variable.
An expression that sends a message to the given Objective-C object or class.
static ObjCMessageExpr * CreateEmpty(const ASTContext &Context, unsigned NumArgs, unsigned NumStoredSelLocs)
Create an empty Objective-C message expression, to be filled in by subsequent calls.
ReceiverKind
The kind of receiver this message is sending to.
@ SuperInstance
The receiver is the instance of the superclass object.
@ Instance
The receiver is an object instance.
@ SuperClass
The receiver is a superclass.
@ Class
The receiver is a class.
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
ObjCProtocolExpr used for protocol expression in Objective-C.
ObjCSelectorExpr used for @selector in Objective-C.
ObjCStringLiteral, used for Objective-C string literals i.e.
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type,...
static OffsetOfExpr * CreateEmpty(const ASTContext &C, unsigned NumComps, unsigned NumExprs)
Helper class for OffsetOfExpr.
Kind
The kind of offsetof node we have.
@ Array
An index into an array.
@ Identifier
A field in a dependent type, known only by its name.
@ Base
An implicit indirection through a C++ base class, when the field found is in a base class.
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class.
This is a base class for any OpenACC statement-level constructs that have an associated statement.
This expression type represents an asterisk in an OpenACC Size-Expr, used in the 'tile' and 'gang' cl...
static OpenACCAsteriskSizeExpr * CreateEmpty(const ASTContext &C)
static OpenACCCombinedConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...
static OpenACCComputeConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
This is the base class for an OpenACC statement-level construct, other construct types are expected t...
static OpenACCDataConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCEnterDataConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCExitDataConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCHostDataConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCInitConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
This class represents a 'loop' construct.
static OpenACCLoopConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCSetConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCShutdownConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCUpdateConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCWaitConstruct * CreateEmpty(const ASTContext &C, unsigned NumExprs, unsigned NumClauses)
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr.
Represents a C++11 pack expansion that produces a sequence of expressions.
static PackIndexingExpr * CreateDeserialized(ASTContext &Context, unsigned NumTransformedExprs)
ParenExpr - This represents a parenthesized expression, e.g.
static ParenListExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumExprs)
Create an empty paren list.
Represents a parameter to a function.
[C99 6.4.2.2] - A predefined identifier such as func.
static PredefinedExpr * CreateEmpty(const ASTContext &Ctx, bool HasFunctionName)
Create an empty PredefinedExpr.
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
static PseudoObjectExpr * Create(const ASTContext &Context, Expr *syntactic, ArrayRef< Expr * > semantic, unsigned resultIndex)
A (possibly-)qualified type.
Frontend produces RecoveryExprs on semantic errors that prevent creating other well-formed expression...
static RecoveryExpr * CreateEmpty(ASTContext &Ctx, unsigned NumSubExprs)
Represents the body of a requires-expression.
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
static RequiresExpr * Create(ASTContext &C, SourceLocation RequiresKWLoc, RequiresExprBodyDecl *Body, SourceLocation LParenLoc, ArrayRef< ParmVarDecl * > LocalParameters, SourceLocation RParenLoc, ArrayRef< concepts::Requirement * > Requirements, SourceLocation RBraceLoc)
ReturnStmt - This represents a return, optionally of an expression: return; return 4;.
static ReturnStmt * CreateEmpty(const ASTContext &Ctx, bool HasNRVOCandidate)
Create an empty return statement, optionally with storage for an NRVO candidate.
Represents a __leave statement.
SYCLKernelCallStmt represents the transformation that is applied to the body of a function declared w...
static SYCLUniqueStableNameExpr * CreateEmpty(const ASTContext &Ctx)
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
Represents an expression that computes the length of a parameter pack.
static SizeOfPackExpr * CreateDeserialized(ASTContext &Context, unsigned NumPartialArgs)
Represents a function call to one of __builtin_LINE(), __builtin_COLUMN(), __builtin_FUNCTION(),...
Encodes a location in the source.
A trivial tuple used to represent a source range.
SourceLocation getEnd() const
SourceLocation getBegin() const
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
StmtVisitor - This class implements a simple visitor for Stmt subclasses.
Stmt - This represents one statement.
GenericSelectionExprBitfields GenericSelectionExprBits
LambdaExprBitfields LambdaExprBits
UnresolvedLookupExprBitfields UnresolvedLookupExprBits
SubstNonTypeTemplateParmExprBitfields SubstNonTypeTemplateParmExprBits
CXXNoexceptExprBitfields CXXNoexceptExprBits
CXXRewrittenBinaryOperatorBitfields CXXRewrittenBinaryOperatorBits
ExprWithCleanupsBitfields ExprWithCleanupsBits
CXXScalarValueInitExprBitfields CXXScalarValueInitExprBits
CXXConstructExprBitfields CXXConstructExprBits
CXXDependentScopeMemberExprBitfields CXXDependentScopeMemberExprBits
TypeTraitExprBitfields TypeTraitExprBits
CXXNewExprBitfields CXXNewExprBits
SourceLocExprBitfields SourceLocExprBits
ConstantExprBitfields ConstantExprBits
RequiresExprBitfields RequiresExprBits
StmtExprBitfields StmtExprBits
StringLiteralBitfields StringLiteralBits
OpaqueValueExprBitfields OpaqueValueExprBits
CXXThrowExprBitfields CXXThrowExprBits
MemberExprBitfields MemberExprBits
DeclRefExprBitfields DeclRefExprBits
CXXOperatorCallExprBitfields CXXOperatorCallExprBits
CXXDefaultInitExprBitfields CXXDefaultInitExprBits
PredefinedExprBitfields PredefinedExprBits
UnresolvedMemberExprBitfields UnresolvedMemberExprBits
PseudoObjectExprBitfields PseudoObjectExprBits
CXXDeleteExprBitfields CXXDeleteExprBits
CXXDefaultArgExprBitfields CXXDefaultArgExprBits
StringLiteral - This represents a string literal expression, e.g.
static StringLiteral * CreateEmpty(const ASTContext &Ctx, unsigned NumConcatenated, unsigned Length, unsigned CharByteWidth)
Construct an empty string literal.
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
void setNextSwitchCase(SwitchCase *SC)
SwitchStmt - This represents a 'switch' stmt.
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 convenient class for passing around template argument information.
void setLAngleLoc(SourceLocation Loc)
void setRAngleLoc(SourceLocation Loc)
void addArgument(const TemplateArgumentLoc &Loc)
Location wrapper for a TemplateArgument.
Represents a template argument.
pack_iterator pack_begin() const
Iterator referencing the first argument of a template argument pack.
unsigned pack_size() const
The number of template arguments in the given template argument pack.
@ Pack
The template argument is actually a parameter pack.
ArgKind getKind() const
Return the kind of stored template argument.
Stores a list of template parameters for a TemplateDecl and its derived classes.
A container of type source information.
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
static TypeTraitExpr * CreateDeserialized(const ASTContext &C, unsigned NumArgs)
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand.
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
static UnaryOperator * CreateEmpty(const ASTContext &C, bool hasFPFeatures)
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
static UnresolvedLookupExpr * CreateEmpty(const ASTContext &Context, unsigned NumResults, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Represents a C++ member access expression for which lookup produced a set of overloaded functions.
static UnresolvedMemberExpr * CreateEmpty(const ASTContext &Context, unsigned NumResults, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
void addDecl(NamedDecl *D)
The iterator over UnresolvedSets.
A set of unresolved declarations.
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit....
static UserDefinedLiteral * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPOptions, EmptyShell Empty)
Represents a call to the builtin function __builtin_va_arg.
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Represents a variable declaration or definition.
WhileStmt - This represents a 'while' stmt.
static WhileStmt * CreateEmpty(const ASTContext &Ctx, bool HasVar)
Create an empty while statement optionally with storage for a condition variable.
A requires-expression requirement which queries the validity and properties of an expression ('simple...
@ SS_ConstraintsNotSatisfied
@ SS_ExprSubstitutionFailure
A requires-expression requirement which is satisfied when a general constraint expression is satisfie...
A static requirement that can be used in a requires-expression to check properties of types and expre...
A requires-expression requirement which queries the existence of a type name or type template special...
Information about a module that has been loaded by the ASTReader.
llvm::BitstreamCursor DeclsCursor
DeclsCursor - This is a cursor to the start of the DECLTYPES_BLOCK block.
StmtCode
Record codes for each kind of statement or expression.
DesignatorTypes
The kinds of designators that can occur in a DesignatedInitExpr.
@ STMT_OMP_SECTION_DIRECTIVE
@ STMT_OPENACC_COMBINED_CONSTRUCT
@ EXPR_DESIGNATED_INIT
A DesignatedInitExpr record.
@ EXPR_COMPOUND_LITERAL
A CompoundLiteralExpr record.
@ STMT_OMP_ASSUME_DIRECTIVE
@ STMT_OPENACC_HOST_DATA_CONSTRUCT
@ STMT_OMP_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE
@ EXPR_OBJC_IVAR_REF_EXPR
An ObjCIvarRefExpr record.
@ STMT_OMP_SCOPE_DIRECTIVE
@ STMT_OMP_PARALLEL_FOR_SIMD_DIRECTIVE
@ EXPR_MEMBER
A MemberExpr record.
@ STMT_OMP_TARGET_TEAMS_DIRECTIVE
@ EXPR_CXX_TEMPORARY_OBJECT
A CXXTemporaryObjectExpr record.
@ EXPR_CXX_UNRESOLVED_LOOKUP
@ STMT_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE
@ EXPR_COMPOUND_ASSIGN_OPERATOR
A CompoundAssignOperator record.
@ EXPR_EXPR_WITH_CLEANUPS
@ EXPR_CXX_STATIC_CAST
A CXXStaticCastExpr record.
@ STMT_OMP_META_DIRECTIVE
@ EXPR_OBJC_STRING_LITERAL
An ObjCStringLiteral record.
@ EXPR_CXX_PROPERTY_REF_EXPR
@ EXPR_SYCL_UNIQUE_STABLE_NAME
@ STMT_OMP_TARGET_DATA_DIRECTIVE
@ STMT_OMP_BARRIER_DIRECTIVE
@ EXPR_VA_ARG
A VAArgExpr record.
@ STMT_OMP_TEAMS_DISTRIBUTE_SIMD_DIRECTIVE
@ STMT_OPENACC_SHUTDOWN_CONSTRUCT
@ EXPR_OBJC_ISA
An ObjCIsa Expr record.
@ STMT_OMP_SINGLE_DIRECTIVE
@ STMT_OPENACC_EXIT_DATA_CONSTRUCT
@ EXPR_CXX_OPERATOR_CALL
A CXXOperatorCallExpr record.
@ STMT_OBJC_AT_TRY
An ObjCAtTryStmt record.
@ STMT_OMP_TARGET_EXIT_DATA_DIRECTIVE
@ EXPR_CXX_UNRESOLVED_CONSTRUCT
@ EXPR_FIXEDPOINT_LITERAL
@ STMT_DO
A DoStmt record.
@ STMT_OBJC_CATCH
An ObjCAtCatchStmt record.
@ STMT_OMP_TARGET_DIRECTIVE
@ STMT_IF
An IfStmt record.
@ EXPR_CXX_EXPRESSION_TRAIT
@ EXPR_STRING_LITERAL
A StringLiteral record.
@ EXPR_OBJC_AVAILABILITY_CHECK
An ObjCAvailabilityCheckExpr record.
@ STMT_OMP_PARALLEL_MASKED_TASKLOOP_DIRECTIVE
@ EXPR_MATRIX_SUBSCRIPT
An MatrixSubscriptExpr record.
@ EXPR_PSEUDO_OBJECT
A PseudoObjectExpr record.
@ STMT_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_DIRECTIVE
@ EXPR_IMPLICIT_CAST
An ImplicitCastExpr record.
@ STMT_OMP_FLUSH_DIRECTIVE
@ STMT_CAPTURED
A CapturedStmt record.
@ STMT_OMP_TARGET_PARALLEL_FOR_SIMD_DIRECTIVE
@ STMT_OMP_MASTER_TASKLOOP_DIRECTIVE
@ STMT_OMP_TILE_DIRECTIVE
@ STMT_OMP_CANCELLATION_POINT_DIRECTIVE
@ STMT_GCCASM
A GCC-style AsmStmt record.
@ EXPR_IMAGINARY_LITERAL
An ImaginaryLiteral record.
@ STMT_OMP_INTERCHANGE_DIRECTIVE
@ STMT_WHILE
A WhileStmt record.
@ EXPR_CONVERT_VECTOR
A ConvertVectorExpr record.
@ EXPR_OBJC_SUBSCRIPT_REF_EXPR
An ObjCSubscriptRefExpr record.
@ STMT_OPENACC_COMPUTE_CONSTRUCT
@ STMT_OMP_TASKWAIT_DIRECTIVE
@ STMT_OMP_TASKYIELD_DIRECTIVE
@ EXPR_STMT
A StmtExpr record.
@ STMT_OMP_PARALLEL_GENERIC_LOOP_DIRECTIVE
@ EXPR_CXX_REINTERPRET_CAST
A CXXReinterpretCastExpr record.
@ EXPR_DESIGNATED_INIT_UPDATE
A DesignatedInitUpdateExpr record.
@ STMT_OBJC_AT_SYNCHRONIZED
An ObjCAtSynchronizedStmt record.
@ STMT_OMP_DISTRIBUTE_PARALLEL_FOR_DIRECTIVE
@ STMT_OMP_TASKLOOP_SIMD_DIRECTIVE
@ STMT_MS_DEPENDENT_EXISTS
@ EXPR_BUILTIN_BIT_CAST
A BuiltinBitCastExpr record.
@ EXPR_CXX_PROPERTY_SUBSCRIPT_EXPR
@ STMT_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD_DIRECTIVE
@ EXPR_CXX_PSEUDO_DESTRUCTOR
@ STMT_OMP_MASKED_DIRECTIVE
@ STMT_SYCLKERNELCALL
A SYCLKernelCallStmt record.
@ STMT_OMP_TARGET_ENTER_DATA_DIRECTIVE
@ EXPR_CHARACTER_LITERAL
A CharacterLiteral record.
@ EXPR_OBJC_ENCODE
An ObjCEncodeExpr record.
@ STMT_OMP_PARALLEL_SECTIONS_DIRECTIVE
@ STMT_OMP_PARALLEL_FOR_DIRECTIVE
@ EXPR_CSTYLE_CAST
A CStyleCastExpr record.
@ STMT_OMP_PARALLEL_DIRECTIVE
@ EXPR_OBJC_BOXED_EXPRESSION
@ EXPR_OBJC_BOOL_LITERAL
An ObjCBoolLiteralExpr record.
@ EXPR_CXX_BIND_TEMPORARY
@ STMT_OMP_ATOMIC_DIRECTIVE
@ STMT_OMP_ORDERED_DIRECTIVE
@ EXPR_EXT_VECTOR_ELEMENT
An ExtVectorElementExpr record.
@ STMT_OMP_TEAMS_GENERIC_LOOP_DIRECTIVE
@ STMT_OMP_CRITICAL_DIRECTIVE
@ EXPR_ATOMIC
An AtomicExpr record.
@ STMT_OPENACC_ENTER_DATA_CONSTRUCT
@ STMT_OMP_CANCEL_DIRECTIVE
@ EXPR_OFFSETOF
An OffsetOfExpr record.
@ STMT_RETURN
A ReturnStmt record.
@ STMT_OBJC_FOR_COLLECTION
An ObjCForCollectionStmt record.
@ STMT_OMP_TARGET_TEAMS_DISTRIBUTE_DIRECTIVE
@ EXPR_ARRAY_INIT_LOOP
An ArrayInitLoopExpr record.
@ STMT_OMP_PARALLEL_MASTER_TASKLOOP_DIRECTIVE
@ STMT_OMP_PARALLEL_MASKED_TASKLOOP_SIMD_DIRECTIVE
@ STMT_CONTINUE
A ContinueStmt record.
@ EXPR_PREDEFINED
A PredefinedExpr record.
@ EXPR_OPENACC_ASTERISK_SIZE
@ STMT_OMP_DEPOBJ_DIRECTIVE
@ EXPR_CXX_BOOL_LITERAL
A CXXBoolLiteralExpr record.
@ EXPR_PAREN_LIST
A ParenListExpr record.
@ EXPR_CXX_PAREN_LIST_INIT
A CXXParenListInitExpr record.
@ STMT_OMP_DISPATCH_DIRECTIVE
@ STMT_OMP_MASTER_TASKLOOP_SIMD_DIRECTIVE
@ STMT_OPENACC_DATA_CONSTRUCT
@ STMT_OMP_TASKLOOP_DIRECTIVE
@ STMT_COMPOUND
A CompoundStmt record.
@ STMT_OMP_CANONICAL_LOOP
@ STMT_FOR
A ForStmt record.
@ STMT_ATTRIBUTED
An AttributedStmt record.
@ STMT_OMP_PARALLEL_MASTER_DIRECTIVE
@ STMT_OPENACC_WAIT_CONSTRUCT
@ STMT_OMP_TARGET_TEAMS_GENERIC_LOOP_DIRECTIVE
@ STMT_OMP_TEAMS_DIRECTIVE
@ STMT_OMP_TARGET_PARALLEL_DIRECTIVE
@ EXPR_CXX_REWRITTEN_BINARY_OPERATOR
A CXXRewrittenBinaryOperator record.
@ STMT_GOTO
A GotoStmt record.
@ EXPR_NO_INIT
An NoInitExpr record.
@ EXPR_OBJC_ARRAY_LITERAL
@ STMT_OMP_ERROR_DIRECTIVE
@ EXPR_OBJC_PROTOCOL_EXPR
An ObjCProtocolExpr record.
@ STMT_OMP_GENERIC_LOOP_DIRECTIVE
@ EXPR_ARRAY_INIT_INDEX
An ArrayInitIndexExpr record.
@ STMT_OMP_TASK_DIRECTIVE
@ STMT_OPENACC_INIT_CONSTRUCT
@ EXPR_CXX_CONSTRUCT
A CXXConstructExpr record.
@ STMT_OMP_PARALLEL_MASKED_DIRECTIVE
@ STMT_OMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_DIRECTIVE
@ STMT_OPENACC_UPDATE_CONSTRUCT
@ STMT_OMP_PARALLEL_MASTER_TASKLOOP_SIMD_DIRECTIVE
@ EXPR_OBJC_DICTIONARY_LITERAL
@ STMT_OMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE
@ EXPR_CXX_DYNAMIC_CAST
A CXXDynamicCastExpr record.
@ STMT_CXX_TRY
A CXXTryStmt record.
@ EXPR_GENERIC_SELECTION
A GenericSelectionExpr record.
@ STMT_OMP_TARGET_SIMD_DIRECTIVE
@ EXPR_OBJC_INDIRECT_COPY_RESTORE
An ObjCIndirectCopyRestoreExpr record.
@ EXPR_CXX_INHERITED_CTOR_INIT
A CXXInheritedCtorInitExpr record.
@ EXPR_CALL
A CallExpr record.
@ EXPR_GNU_NULL
A GNUNullExpr record.
@ EXPR_BINARY_CONDITIONAL_OPERATOR
@ EXPR_OBJC_PROPERTY_REF_EXPR
An ObjCPropertyRefExpr record.
@ STMT_OMP_TARGET_PARALLEL_FOR_DIRECTIVE
@ STMT_OMP_FOR_SIMD_DIRECTIVE
@ STMT_OMP_MASKED_TASKLOOP_DIRECTIVE
@ EXPR_CXX_CONST_CAST
A CXXConstCastExpr record.
@ STMT_OMP_SCAN_DIRECTIVE
@ STMT_REF_PTR
A reference to a previously [de]serialized Stmt record.
@ EXPR_OBJC_MESSAGE_EXPR
An ObjCMessageExpr record.
@ EXPR_CXX_DEPENDENT_SCOPE_DECL_REF
@ STMT_OMP_TEAMS_DISTRIBUTE_DIRECTIVE
@ STMT_CASE
A CaseStmt record.
@ EXPR_CONSTANT
A constant expression context.
@ EXPR_FUNCTION_PARM_PACK
@ STMT_STOP
A marker record that indicates that we are at the end of an expression.
@ EXPR_CXX_NULL_PTR_LITERAL
@ STMT_OMP_TARGET_UPDATE_DIRECTIVE
@ STMT_MSASM
A MS-style AsmStmt record.
@ STMT_OMP_DISTRIBUTE_DIRECTIVE
@ EXPR_CONDITIONAL_OPERATOR
A ConditionOperator record.
@ EXPR_BINARY_OPERATOR
A BinaryOperator record.
@ EXPR_CXX_STD_INITIALIZER_LIST
A CXXStdInitializerListExpr record.
@ STMT_OMP_TASKGROUP_DIRECTIVE
@ STMT_OMP_REVERSE_DIRECTIVE
@ EXPR_SHUFFLE_VECTOR
A ShuffleVectorExpr record.
@ STMT_OBJC_FINALLY
An ObjCAtFinallyStmt record.
@ EXPR_OBJC_SELECTOR_EXPR
An ObjCSelectorExpr record.
@ EXPR_FLOATING_LITERAL
A FloatingLiteral record.
@ STMT_OMP_MASTER_DIRECTIVE
@ EXPR_CXX_DEPENDENT_SCOPE_MEMBER
@ STMT_NULL_PTR
A NULL expression.
@ STMT_DEFAULT
A DefaultStmt record.
@ EXPR_CHOOSE
A ChooseExpr record.
@ STMT_OMP_UNROLL_DIRECTIVE
@ STMT_NULL
A NullStmt record.
@ STMT_OMP_SIMD_DIRECTIVE
@ EXPR_DECL_REF
A DeclRefExpr record.
@ STMT_OPENACC_LOOP_CONSTRUCT
@ EXPR_SUBST_NON_TYPE_TEMPLATE_PARM
@ EXPR_INIT_LIST
An InitListExpr record.
@ EXPR_IMPLICIT_VALUE_INIT
An ImplicitValueInitExpr record.
@ STMT_OBJC_AUTORELEASE_POOL
An ObjCAutoreleasePoolStmt record.
@ STMT_OPENACC_SET_CONSTRUCT
@ EXPR_RECOVERY
A RecoveryExpr record.
@ EXPR_PAREN
A ParenExpr record.
@ STMT_OMP_TARGET_PARALLEL_GENERIC_LOOP_DIRECTIVE
@ STMT_LABEL
A LabelStmt record.
@ EXPR_CXX_FUNCTIONAL_CAST
A CXXFunctionalCastExpr record.
@ EXPR_USER_DEFINED_LITERAL
A UserDefinedLiteral record.
@ EXPR_INTEGER_LITERAL
An IntegerLiteral record.
@ EXPR_SOURCE_LOC
A SourceLocExpr record.
@ EXPR_MATERIALIZE_TEMPORARY
@ EXPR_CXX_MEMBER_CALL
A CXXMemberCallExpr record.
@ STMT_OMP_INTEROP_DIRECTIVE
@ STMT_SWITCH
A SwitchStmt record.
@ STMT_DECL
A DeclStmt record.
@ EXPR_CXX_UNRESOLVED_MEMBER
@ EXPR_OBJC_KVC_REF_EXPR
UNUSED.
@ STMT_OMP_SECTIONS_DIRECTIVE
@ EXPR_SUBST_NON_TYPE_TEMPLATE_PARM_PACK
@ EXPR_CXX_SCALAR_VALUE_INIT
@ STMT_OMP_MASKED_TASKLOOP_SIMD_DIRECTIVE
@ STMT_OMP_DISTRIBUTE_SIMD_DIRECTIVE
@ EXPR_SIZEOF_ALIGN_OF
A SizefAlignOfExpr record.
@ STMT_BREAK
A BreakStmt record.
@ STMT_OBJC_AT_THROW
An ObjCAtThrowStmt record.
@ EXPR_ADDR_LABEL
An AddrLabelExpr record.
@ STMT_CXX_FOR_RANGE
A CXXForRangeStmt record.
@ EXPR_CXX_ADDRSPACE_CAST
A CXXAddrspaceCastExpr record.
@ EXPR_ARRAY_SUBSCRIPT
An ArraySubscriptExpr record.
@ EXPR_CONCEPT_SPECIALIZATION
@ EXPR_UNARY_OPERATOR
A UnaryOperator record.
@ STMT_CXX_CATCH
A CXXCatchStmt record.
@ EXPR_BUILTIN_PP_EMBED
A EmbedExpr record.
@ STMT_INDIRECT_GOTO
An IndirectGotoStmt record.
@ DESIG_ARRAY_RANGE
GNU array range designator.
@ DESIG_FIELD_NAME
Field designator where only the field name is known.
@ DESIG_FIELD_DECL
Field designator where the field has been resolved to a declaration.
@ DESIG_ARRAY
Array designator.
The JSON file list parser is used to communicate input to InstallAPI.
ConstantResultStorageKind
Describes the kind of result that can be tail-allocated.
ArrayTypeTrait
Names for the array type traits.
llvm::omp::Directive OpenMPDirectiveKind
OpenMP directives.
IfStatementKind
In an if statement, this denotes whether the statement is a constexpr or consteval if statement.
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
CapturedRegionKind
The different kinds of captured statement.
UnaryExprOrTypeTrait
Names for the "expression or type" traits.
CastKind
CastKind - The kind of operation required for a conversion.
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
const FunctionProtoType * T
@ Implicit
An implicit conversion.
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
static ASTConstraintSatisfaction * Create(const ASTContext &C, const ConstraintSatisfaction &Satisfaction)
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
void initializeFrom(SourceLocation TemplateKWLoc, const TemplateArgumentListInfo &List, TemplateArgumentLoc *OutArgArray)
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
Stores data related to a single #embed directive.
Helper expressions and declaration for OMPIteratorExpr class for each iteration space.
Expr * CounterUpdate
Updater for the internal counter: ++CounterVD;.
Expr * Upper
Normalized upper bound.
Expr * Update
Update expression for the originally specified iteration variable, calculated as VD = Begin + Counter...
VarDecl * CounterVD
Internal normalized counter.
Internal struct to describes an element that is a pack expansion, used if any of the elements in the ...
Internal struct for storing Key/value pair.
A placeholder type used to construct an empty shell of a type, that will be filled in later (e....