24#include "llvm/Bitstream/BitstreamWriter.h"
55 class PakedBitsWriter {
58 ~PakedBitsWriter() { assert(!CurrentIndex); }
60 void addBit(
bool Value) {
61 assert(CurrentIndex &&
"Writing Bits without recording first!");
62 PackingBits.addBit(
Value);
64 void addBits(uint32_t
Value, uint32_t BitsWidth) {
65 assert(CurrentIndex &&
"Writing Bits without recording first!");
66 PackingBits.addBits(
Value, BitsWidth);
73 RecordRef[*CurrentIndex] = (uint32_t)PackingBits;
74 CurrentIndex = std::nullopt;
81 CurrentIndex = RecordRef.size();
82 RecordRef.push_back(0);
88 std::optional<unsigned> CurrentIndex;
91 PakedBitsWriter CurrentPackingBits;
96 Code(serialization::STMT_NULL_PTR), AbbrevToUse(0),
97 CurrentPackingBits(this->
Record) {}
103 CurrentPackingBits.writeBits();
105 "unhandled sub-statement writing AST file");
106 return Record.EmitStmt(Code, AbbrevToUse);
113#define STMT(Type, Base) \
114 void Visit##Type(Type *);
115#include "clang/AST/StmtNodes.inc"
125 Record.AddTemplateArgumentLoc(Args[i]);
131void ASTStmtWriter::VisitNullStmt(
NullStmt *S) {
133 Record.AddSourceLocation(S->getSemiLoc());
134 Record.push_back(S->NullStmtBits.HasLeadingEmptyMacro);
141 Record.push_back(S->size());
142 Record.push_back(S->hasStoredFPFeatures());
144 for (
auto *CS : S->body())
146 if (S->hasStoredFPFeatures())
147 Record.push_back(S->getStoredFPFeatures().getAsOpaqueInt());
148 Record.AddSourceLocation(S->getLBracLoc());
149 Record.AddSourceLocation(S->getRBracLoc());
151 if (!S->hasStoredFPFeatures())
157void ASTStmtWriter::VisitSwitchCase(
SwitchCase *S) {
160 Record.AddSourceLocation(S->getKeywordLoc());
161 Record.AddSourceLocation(S->getColonLoc());
164void ASTStmtWriter::VisitCaseStmt(
CaseStmt *S) {
166 Record.push_back(S->caseStmtIsGNURange());
167 Record.AddStmt(S->getLHS());
168 Record.AddStmt(S->getSubStmt());
169 if (S->caseStmtIsGNURange()) {
170 Record.AddStmt(S->getRHS());
171 Record.AddSourceLocation(S->getEllipsisLoc());
176void ASTStmtWriter::VisitDefaultStmt(
DefaultStmt *S) {
178 Record.AddStmt(S->getSubStmt());
182void ASTStmtWriter::VisitLabelStmt(
LabelStmt *S) {
184 Record.push_back(S->isSideEntry());
185 Record.AddDeclRef(S->getDecl());
186 Record.AddStmt(S->getSubStmt());
187 Record.AddSourceLocation(S->getIdentLoc());
193 Record.push_back(S->getAttrs().size());
194 Record.AddAttributes(S->getAttrs());
195 Record.AddStmt(S->getSubStmt());
200void ASTStmtWriter::VisitIfStmt(
IfStmt *S) {
203 bool HasElse = S->getElse() !=
nullptr;
204 bool HasVar = S->getConditionVariableDeclStmt() !=
nullptr;
205 bool HasInit = S->getInit() !=
nullptr;
207 CurrentPackingBits.updateBits();
209 CurrentPackingBits.addBit(HasElse);
210 CurrentPackingBits.addBit(HasVar);
211 CurrentPackingBits.addBit(HasInit);
213 Record.AddStmt(S->getCond());
214 Record.AddStmt(S->getThen());
216 Record.AddStmt(S->getElse());
218 Record.AddStmt(S->getConditionVariableDeclStmt());
220 Record.AddStmt(S->getInit());
222 Record.AddSourceLocation(S->getIfLoc());
223 Record.AddSourceLocation(S->getLParenLoc());
224 Record.AddSourceLocation(S->getRParenLoc());
226 Record.AddSourceLocation(S->getElseLoc());
231void ASTStmtWriter::VisitSwitchStmt(
SwitchStmt *S) {
234 bool HasInit = S->getInit() !=
nullptr;
235 bool HasVar = S->getConditionVariableDeclStmt() !=
nullptr;
236 Record.push_back(HasInit);
238 Record.push_back(S->isAllEnumCasesCovered());
240 Record.AddStmt(S->getCond());
241 Record.AddStmt(S->getBody());
243 Record.AddStmt(S->getInit());
245 Record.AddStmt(S->getConditionVariableDeclStmt());
247 Record.AddSourceLocation(S->getSwitchLoc());
248 Record.AddSourceLocation(S->getLParenLoc());
249 Record.AddSourceLocation(S->getRParenLoc());
251 for (
SwitchCase *SC = S->getSwitchCaseList(); SC;
252 SC = SC->getNextSwitchCase())
257void ASTStmtWriter::VisitWhileStmt(
WhileStmt *S) {
260 bool HasVar = S->getConditionVariableDeclStmt() !=
nullptr;
263 Record.AddStmt(S->getCond());
264 Record.AddStmt(S->getBody());
266 Record.AddStmt(S->getConditionVariableDeclStmt());
268 Record.AddSourceLocation(S->getWhileLoc());
269 Record.AddSourceLocation(S->getLParenLoc());
270 Record.AddSourceLocation(S->getRParenLoc());
274void ASTStmtWriter::VisitDoStmt(
DoStmt *S) {
276 Record.AddStmt(S->getCond());
277 Record.AddStmt(S->getBody());
278 Record.AddSourceLocation(S->getDoLoc());
279 Record.AddSourceLocation(S->getWhileLoc());
280 Record.AddSourceLocation(S->getRParenLoc());
284void ASTStmtWriter::VisitForStmt(
ForStmt *S) {
286 Record.AddStmt(S->getInit());
287 Record.AddStmt(S->getCond());
288 Record.AddStmt(S->getConditionVariableDeclStmt());
289 Record.AddStmt(S->getInc());
290 Record.AddStmt(S->getBody());
291 Record.AddSourceLocation(S->getForLoc());
292 Record.AddSourceLocation(S->getLParenLoc());
293 Record.AddSourceLocation(S->getRParenLoc());
297void ASTStmtWriter::VisitGotoStmt(
GotoStmt *S) {
299 Record.AddDeclRef(S->getLabel());
300 Record.AddSourceLocation(S->getGotoLoc());
301 Record.AddSourceLocation(S->getLabelLoc());
307 Record.AddSourceLocation(S->getGotoLoc());
308 Record.AddSourceLocation(S->getStarLoc());
309 Record.AddStmt(S->getTarget());
315 Record.AddSourceLocation(S->getContinueLoc());
319void ASTStmtWriter::VisitBreakStmt(
BreakStmt *S) {
321 Record.AddSourceLocation(S->getBreakLoc());
325void ASTStmtWriter::VisitReturnStmt(
ReturnStmt *S) {
328 bool HasNRVOCandidate = S->getNRVOCandidate() !=
nullptr;
329 Record.push_back(HasNRVOCandidate);
331 Record.AddStmt(S->getRetValue());
332 if (HasNRVOCandidate)
333 Record.AddDeclRef(S->getNRVOCandidate());
335 Record.AddSourceLocation(S->getReturnLoc());
339void ASTStmtWriter::VisitDeclStmt(
DeclStmt *S) {
341 Record.AddSourceLocation(S->getBeginLoc());
342 Record.AddSourceLocation(S->getEndLoc());
349void ASTStmtWriter::VisitAsmStmt(
AsmStmt *S) {
351 Record.push_back(S->getNumOutputs());
352 Record.push_back(S->getNumInputs());
353 Record.push_back(S->getNumClobbers());
354 Record.AddSourceLocation(S->getAsmLoc());
355 Record.push_back(S->isVolatile());
356 Record.push_back(S->isSimple());
359void ASTStmtWriter::VisitGCCAsmStmt(
GCCAsmStmt *S) {
361 Record.push_back(S->getNumLabels());
362 Record.AddSourceLocation(S->getRParenLoc());
363 Record.AddStmt(S->getAsmString());
366 for (
unsigned I = 0, N = S->getNumOutputs(); I != N; ++I) {
367 Record.AddIdentifierRef(S->getOutputIdentifier(I));
368 Record.AddStmt(S->getOutputConstraintLiteral(I));
369 Record.AddStmt(S->getOutputExpr(I));
373 for (
unsigned I = 0, N = S->getNumInputs(); I != N; ++I) {
374 Record.AddIdentifierRef(S->getInputIdentifier(I));
375 Record.AddStmt(S->getInputConstraintLiteral(I));
376 Record.AddStmt(S->getInputExpr(I));
380 for (
unsigned I = 0, N = S->getNumClobbers(); I != N; ++I)
381 Record.AddStmt(S->getClobberStringLiteral(I));
384 for (
unsigned I = 0, N = S->getNumLabels(); I != N; ++I) {
385 Record.AddIdentifierRef(S->getLabelIdentifier(I));
386 Record.AddStmt(S->getLabelExpr(I));
392void ASTStmtWriter::VisitMSAsmStmt(
MSAsmStmt *S) {
394 Record.AddSourceLocation(S->getLBraceLoc());
395 Record.AddSourceLocation(S->getEndLoc());
396 Record.push_back(S->getNumAsmToks());
397 Record.AddString(S->getAsmString());
400 for (
unsigned I = 0, N = S->getNumAsmToks(); I != N; ++I) {
406 for (
unsigned I = 0, N = S->getNumClobbers(); I != N; ++I) {
407 Record.AddString(S->getClobber(I));
411 for (
unsigned I = 0, N = S->getNumOutputs(); I != N; ++I) {
412 Record.AddStmt(S->getOutputExpr(I));
413 Record.AddString(S->getOutputConstraint(I));
417 for (
unsigned I = 0, N = S->getNumInputs(); I != N; ++I) {
418 Record.AddStmt(S->getInputExpr(I));
419 Record.AddString(S->getInputConstraint(I));
435 Record.AddSourceLocation(S->getKeywordLoc());
436 Record.AddStmt(S->getOperand());
437 Record.AddStmt(S->getPromiseCall());
438 Record.push_back(S->isImplicit());
444 Record.AddSourceLocation(
E->getKeywordLoc());
447 Record.AddStmt(
E->getOpaqueValue());
451 VisitCoroutineSuspendExpr(
E);
452 Record.push_back(
E->isImplicit());
457 VisitCoroutineSuspendExpr(
E);
463 Record.AddSourceLocation(
E->getKeywordLoc());
476 for (
const auto &DetailRecord : Satisfaction) {
477 auto *
E = DetailRecord.dyn_cast<
Expr *>();
478 Record.push_back(
E ==
nullptr);
482 auto *
Diag = DetailRecord.get<std::pair<SourceLocation, StringRef> *>();
494 Record.AddString(
D->SubstitutedEntity);
495 Record.AddSourceLocation(
D->DiagLoc);
496 Record.AddString(
D->DiagMessage);
499void ASTStmtWriter::VisitConceptSpecializationExpr(
502 Record.AddDeclRef(
E->getSpecializationDecl());
504 Record.push_back(CR !=
nullptr);
506 Record.AddConceptReference(CR);
515 Record.push_back(
E->getLocalParameters().size());
516 Record.push_back(
E->getRequirements().size());
519 Record.AddDeclRef(
E->getBody());
523 if (
auto *TypeReq = dyn_cast<concepts::TypeRequirement>(R)) {
525 Record.push_back(TypeReq->Status);
529 Record.AddTypeSourceInfo(TypeReq->getType());
530 }
else if (
auto *ExprReq = dyn_cast<concepts::ExprRequirement>(R)) {
531 Record.push_back(ExprReq->getKind());
532 Record.push_back(ExprReq->Status);
533 if (ExprReq->isExprSubstitutionFailure()) {
539 Record.AddSourceLocation(ExprReq->NoexceptLoc);
540 const auto &RetReq = ExprReq->getReturnTypeRequirement();
541 if (RetReq.isSubstitutionFailure()) {
544 }
else if (RetReq.isTypeConstraint()) {
546 Record.AddTemplateParameterList(
547 RetReq.getTypeConstraintTemplateParameterList());
548 if (ExprReq->Status >=
551 ExprReq->getReturnTypeRequirementSubstitutedConstraintExpr());
553 assert(RetReq.isEmpty());
558 auto *NestedReq = cast<concepts::NestedRequirement>(R);
560 Record.push_back(NestedReq->hasInvalidConstraint());
561 if (NestedReq->hasInvalidConstraint()) {
562 Record.AddString(NestedReq->getInvalidConstraintEntity());
565 Record.AddStmt(NestedReq->getConstraintExpr());
566 if (!NestedReq->isDependent())
571 Record.AddSourceLocation(
E->getLParenLoc());
572 Record.AddSourceLocation(
E->getRParenLoc());
582 Record.push_back(std::distance(S->capture_begin(), S->capture_end()));
585 Record.AddDeclRef(S->getCapturedDecl());
586 Record.push_back(S->getCapturedRegionKind());
588 Record.AddDeclRef(S->getCapturedRecordDecl());
591 for (
auto *I : S->capture_inits())
595 Record.AddStmt(S->getCapturedStmt());
598 for (
const auto &I : S->captures()) {
599 if (I.capturesThis() || I.capturesVariableArrayType())
600 Record.AddDeclRef(
nullptr);
602 Record.AddDeclRef(I.getCapturedVar());
603 Record.push_back(I.getCaptureKind());
604 Record.AddSourceLocation(I.getLocation());
610void ASTStmtWriter::VisitExpr(
Expr *
E) {
613 CurrentPackingBits.updateBits();
631 switch (
E->getResultStorageKind()) {
635 Record.push_back(
E->Int64Result());
638 Record.AddAPValue(
E->APValueResult());
642 Record.AddStmt(
E->getSubExpr());
649 Record.AddSourceLocation(
E->getLocation());
650 Record.AddSourceLocation(
E->getLParenLocation());
651 Record.AddSourceLocation(
E->getRParenLocation());
652 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
660 bool HasFunctionName =
E->getFunctionName() !=
nullptr;
661 Record.push_back(HasFunctionName);
663 llvm::to_underlying(
E->getIdentKind()));
664 Record.push_back(
E->isTransparent());
665 Record.AddSourceLocation(
E->getLocation());
667 Record.AddStmt(
E->getFunctionName());
674 CurrentPackingBits.updateBits();
676 CurrentPackingBits.addBit(
E->hadMultipleCandidates());
677 CurrentPackingBits.addBit(
E->refersToEnclosingVariableOrCapture());
678 CurrentPackingBits.addBits(
E->isNonOdrUse(), 2);
679 CurrentPackingBits.addBit(
E->isImmediateEscalating());
680 CurrentPackingBits.addBit(
E->getDecl() !=
E->getFoundDecl());
681 CurrentPackingBits.addBit(
E->hasQualifier());
682 CurrentPackingBits.addBit(
E->hasTemplateKWAndArgsInfo());
684 if (
E->hasTemplateKWAndArgsInfo()) {
685 unsigned NumTemplateArgs =
E->getNumTemplateArgs();
686 Record.push_back(NumTemplateArgs);
691 if ((!
E->hasTemplateKWAndArgsInfo()) && (!
E->hasQualifier()) &&
692 (
E->getDecl() ==
E->getFoundDecl()) &&
697 if (
E->hasQualifier())
698 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
700 if (
E->getDecl() !=
E->getFoundDecl())
701 Record.AddDeclRef(
E->getFoundDecl());
703 if (
E->hasTemplateKWAndArgsInfo())
707 Record.AddDeclRef(
E->getDecl());
708 Record.AddSourceLocation(
E->getLocation());
709 Record.AddDeclarationNameLoc(
E->DNLoc,
E->getDecl()->getDeclName());
715 Record.AddSourceLocation(
E->getLocation());
716 Record.AddAPInt(
E->getValue());
718 if (
E->getValue().getBitWidth() == 32) {
727 Record.AddSourceLocation(
E->getLocation());
728 Record.push_back(
E->getScale());
729 Record.AddAPInt(
E->getValue());
735 Record.push_back(
E->getRawSemantics());
736 Record.push_back(
E->isExact());
737 Record.AddAPFloat(
E->getValue());
738 Record.AddSourceLocation(
E->getLocation());
744 Record.AddStmt(
E->getSubExpr());
752 Record.push_back(
E->getNumConcatenated());
753 Record.push_back(
E->getLength());
754 Record.push_back(
E->getCharByteWidth());
755 Record.push_back(llvm::to_underlying(
E->getKind()));
756 Record.push_back(
E->isPascal());
759 for (
unsigned I = 0, N =
E->getNumConcatenated(); I != N; ++I)
760 Record.AddSourceLocation(
E->getStrTokenLoc(I));
763 StringRef StrData =
E->getBytes();
764 for (
unsigned I = 0, N =
E->getByteLength(); I != N; ++I)
765 Record.push_back(StrData[I]);
772 Record.push_back(
E->getValue());
773 Record.AddSourceLocation(
E->getLocation());
774 Record.push_back(llvm::to_underlying(
E->getKind()));
781void ASTStmtWriter::VisitParenExpr(
ParenExpr *
E) {
783 Record.AddSourceLocation(
E->getLParen());
784 Record.AddSourceLocation(
E->getRParen());
785 Record.AddStmt(
E->getSubExpr());
791 Record.push_back(
E->getNumExprs());
792 for (
auto *SubStmt :
E->exprs())
794 Record.AddSourceLocation(
E->getLParenLoc());
795 Record.AddSourceLocation(
E->getRParenLoc());
801 bool HasFPFeatures =
E->hasStoredFPFeatures();
804 CurrentPackingBits.addBit(HasFPFeatures);
805 Record.AddStmt(
E->getSubExpr());
806 CurrentPackingBits.addBits(
E->getOpcode(),
808 Record.AddSourceLocation(
E->getOperatorLoc());
809 CurrentPackingBits.addBit(
E->canOverflow());
812 Record.push_back(
E->getStoredFPFeatures().getAsOpaqueInt());
818 Record.push_back(
E->getNumComponents());
819 Record.push_back(
E->getNumExpressions());
820 Record.AddSourceLocation(
E->getOperatorLoc());
821 Record.AddSourceLocation(
E->getRParenLoc());
822 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
823 for (
unsigned I = 0, N =
E->getNumComponents(); I != N; ++I) {
846 for (
unsigned I = 0, N =
E->getNumExpressions(); I != N; ++I)
847 Record.AddStmt(
E->getIndexExpr(I));
853 Record.push_back(
E->getKind());
854 if (
E->isArgumentType())
855 Record.AddTypeSourceInfo(
E->getArgumentTypeInfo());
858 Record.AddStmt(
E->getArgumentExpr());
860 Record.AddSourceLocation(
E->getOperatorLoc());
861 Record.AddSourceLocation(
E->getRParenLoc());
869 Record.AddSourceLocation(
E->getRBracketLoc());
876 Record.AddStmt(
E->getRowIdx());
877 Record.AddStmt(
E->getColumnIdx());
878 Record.AddSourceLocation(
E->getRBracketLoc());
886 Record.AddStmt(
E->getLowerBound());
887 Record.AddStmt(
E->getLength());
888 if (
E->isOMPArraySection())
889 Record.AddStmt(
E->getStride());
890 Record.AddSourceLocation(
E->getColonLocFirst());
892 if (
E->isOMPArraySection())
893 Record.AddSourceLocation(
E->getColonLocSecond());
895 Record.AddSourceLocation(
E->getRBracketLoc());
901 Record.push_back(
E->getDimensions().size());
903 for (
Expr *Dim :
E->getDimensions())
906 Record.AddSourceRange(SR);
907 Record.AddSourceLocation(
E->getLParenLoc());
908 Record.AddSourceLocation(
E->getRParenLoc());
914 Record.push_back(
E->numOfIterators());
915 Record.AddSourceLocation(
E->getIteratorKwLoc());
916 Record.AddSourceLocation(
E->getLParenLoc());
917 Record.AddSourceLocation(
E->getRParenLoc());
918 for (
unsigned I = 0, End =
E->numOfIterators(); I < End; ++I) {
919 Record.AddDeclRef(
E->getIteratorDecl(I));
920 Record.AddSourceLocation(
E->getAssignLoc(I));
925 Record.AddSourceLocation(
E->getColonLoc(I));
927 Record.AddSourceLocation(
E->getSecondColonLoc(I));
938void ASTStmtWriter::VisitCallExpr(
CallExpr *
E) {
941 Record.push_back(
E->getNumArgs());
942 CurrentPackingBits.updateBits();
943 CurrentPackingBits.addBit(
static_cast<bool>(
E->getADLCallKind()));
944 CurrentPackingBits.addBit(
E->hasStoredFPFeatures());
946 Record.AddSourceLocation(
E->getRParenLoc());
947 Record.AddStmt(
E->getCallee());
949 Arg != ArgEnd; ++Arg)
952 if (
E->hasStoredFPFeatures())
953 Record.push_back(
E->getFPFeatures().getAsOpaqueInt());
955 if (!
E->hasStoredFPFeatures() && !
static_cast<bool>(
E->getADLCallKind()) &&
972void ASTStmtWriter::VisitMemberExpr(
MemberExpr *
E) {
975 bool HasQualifier =
E->hasQualifier();
976 bool HasFoundDecl =
E->hasFoundDecl();
977 bool HasTemplateInfo =
E->hasTemplateKWAndArgsInfo();
978 unsigned NumTemplateArgs =
E->getNumTemplateArgs();
982 CurrentPackingBits.updateBits();
983 CurrentPackingBits.addBit(HasQualifier);
984 CurrentPackingBits.addBit(HasFoundDecl);
985 CurrentPackingBits.addBit(HasTemplateInfo);
986 Record.push_back(NumTemplateArgs);
989 Record.AddDeclRef(
E->getMemberDecl());
990 Record.AddDeclarationNameLoc(
E->MemberDNLoc,
991 E->getMemberDecl()->getDeclName());
992 Record.AddSourceLocation(
E->getMemberLoc());
993 CurrentPackingBits.addBit(
E->isArrow());
994 CurrentPackingBits.addBit(
E->hadMultipleCandidates());
995 CurrentPackingBits.addBits(
E->isNonOdrUse(), 2);
996 Record.AddSourceLocation(
E->getOperatorLoc());
999 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
1003 Record.AddDeclRef(FoundDecl.getDecl());
1004 CurrentPackingBits.addBits(FoundDecl.
getAccess(), 2);
1007 if (HasTemplateInfo)
1017 Record.AddSourceLocation(
E->getIsaMemberLoc());
1018 Record.AddSourceLocation(
E->getOpLoc());
1019 Record.push_back(
E->isArrow());
1026 Record.AddStmt(
E->getSubExpr());
1027 Record.push_back(
E->shouldCopy());
1032 VisitExplicitCastExpr(
E);
1033 Record.AddSourceLocation(
E->getLParenLoc());
1034 Record.AddSourceLocation(
E->getBridgeKeywordLoc());
1035 Record.push_back(
E->getBridgeKind());
1039void ASTStmtWriter::VisitCastExpr(
CastExpr *
E) {
1042 Record.push_back(
E->path_size());
1043 CurrentPackingBits.updateBits();
1045 CurrentPackingBits.addBits(
E->getCastKind(), 7);
1046 CurrentPackingBits.addBit(
E->hasStoredFPFeatures());
1047 Record.AddStmt(
E->getSubExpr());
1050 PI =
E->path_begin(), PE =
E->path_end(); PI != PE; ++PI)
1051 Record.AddCXXBaseSpecifier(**PI);
1053 if (
E->hasStoredFPFeatures())
1054 Record.push_back(
E->getFPFeatures().getAsOpaqueInt());
1062 CurrentPackingBits.updateBits();
1063 CurrentPackingBits.addBits(
E->getOpcode(), 6);
1064 bool HasFPFeatures =
E->hasStoredFPFeatures();
1065 CurrentPackingBits.addBit(HasFPFeatures);
1068 Record.AddSourceLocation(
E->getOperatorLoc());
1070 Record.push_back(
E->getStoredFPFeatures().getAsOpaqueInt());
1080 VisitBinaryOperator(
E);
1081 Record.AddTypeRef(
E->getComputationLHSType());
1082 Record.AddTypeRef(
E->getComputationResultType());
1096 Record.AddSourceLocation(
E->getQuestionLoc());
1097 Record.AddSourceLocation(
E->getColonLoc());
1104 Record.AddStmt(
E->getOpaqueValue());
1105 Record.AddStmt(
E->getCommon());
1107 Record.AddStmt(
E->getTrueExpr());
1108 Record.AddStmt(
E->getFalseExpr());
1109 Record.AddSourceLocation(
E->getQuestionLoc());
1110 Record.AddSourceLocation(
E->getColonLoc());
1116 CurrentPackingBits.addBit(
E->isPartOfExplicitCast());
1118 if (
E->path_size() == 0 && !
E->hasStoredFPFeatures())
1126 Record.AddTypeSourceInfo(
E->getTypeInfoAsWritten());
1130 VisitExplicitCastExpr(
E);
1131 Record.AddSourceLocation(
E->getLParenLoc());
1132 Record.AddSourceLocation(
E->getRParenLoc());
1138 Record.AddSourceLocation(
E->getLParenLoc());
1139 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1140 Record.AddStmt(
E->getInitializer());
1141 Record.push_back(
E->isFileScope());
1148 Record.AddIdentifierRef(&
E->getAccessor());
1149 Record.AddSourceLocation(
E->getAccessorLoc());
1157 Record.AddStmt(
E->getSyntacticForm());
1158 Record.AddSourceLocation(
E->getLBraceLoc());
1159 Record.AddSourceLocation(
E->getRBraceLoc());
1160 bool isArrayFiller =
E->ArrayFillerOrUnionFieldInit.is<
Expr*>();
1161 Record.push_back(isArrayFiller);
1163 Record.AddStmt(
E->getArrayFiller());
1165 Record.AddDeclRef(
E->getInitializedFieldInUnion());
1166 Record.push_back(
E->hadArrayRangeDesignator());
1167 Record.push_back(
E->getNumInits());
1168 if (isArrayFiller) {
1171 Expr *filler =
E->getArrayFiller();
1172 for (
unsigned I = 0, N =
E->getNumInits(); I != N; ++I)
1173 Record.AddStmt(
E->getInit(I) != filler ?
E->getInit(I) :
nullptr);
1175 for (
unsigned I = 0, N =
E->getNumInits(); I != N; ++I)
1176 Record.AddStmt(
E->getInit(I));
1183 Record.push_back(
E->getNumSubExprs());
1184 for (
unsigned I = 0, N =
E->getNumSubExprs(); I != N; ++I)
1185 Record.AddStmt(
E->getSubExpr(I));
1186 Record.AddSourceLocation(
E->getEqualOrColonLoc());
1187 Record.push_back(
E->usesGNUSyntax());
1189 if (
D.isFieldDesignator()) {
1192 Record.AddDeclRef(Field);
1195 Record.AddIdentifierRef(
D.getFieldName());
1197 Record.AddSourceLocation(
D.getDotLoc());
1198 Record.AddSourceLocation(
D.getFieldLoc());
1199 }
else if (
D.isArrayDesignator()) {
1201 Record.push_back(
D.getArrayIndex());
1202 Record.AddSourceLocation(
D.getLBracketLoc());
1203 Record.AddSourceLocation(
D.getRBracketLoc());
1205 assert(
D.isArrayRangeDesignator() &&
"Unknown designator");
1207 Record.push_back(
D.getArrayIndex());
1208 Record.AddSourceLocation(
D.getLBracketLoc());
1209 Record.AddSourceLocation(
D.getEllipsisLoc());
1210 Record.AddSourceLocation(
D.getRBracketLoc());
1219 Record.AddStmt(
E->getUpdater());
1223void ASTStmtWriter::VisitNoInitExpr(
NoInitExpr *
E) {
1230 Record.AddStmt(
E->SubExprs[0]);
1231 Record.AddStmt(
E->SubExprs[1]);
1245void ASTStmtWriter::VisitVAArgExpr(
VAArgExpr *
E) {
1247 Record.AddStmt(
E->getSubExpr());
1248 Record.AddTypeSourceInfo(
E->getWrittenTypeInfo());
1249 Record.AddSourceLocation(
E->getBuiltinLoc());
1250 Record.AddSourceLocation(
E->getRParenLoc());
1251 Record.push_back(
E->isMicrosoftABI());
1257 Record.AddDeclRef(cast_or_null<Decl>(
E->getParentContext()));
1260 Record.push_back(llvm::to_underlying(
E->getIdentKind()));
1264void ASTStmtWriter::VisitEmbedExpr(
EmbedExpr *
E) {
1268 Record.AddStmt(
E->getDataStringLiteral());
1269 Record.writeUInt32(
E->getStartingElementPos());
1270 Record.writeUInt32(
E->getDataElementCount());
1276 Record.AddSourceLocation(
E->getAmpAmpLoc());
1277 Record.AddSourceLocation(
E->getLabelLoc());
1278 Record.AddDeclRef(
E->getLabel());
1282void ASTStmtWriter::VisitStmtExpr(
StmtExpr *
E) {
1284 Record.AddStmt(
E->getSubStmt());
1285 Record.AddSourceLocation(
E->getLParenLoc());
1286 Record.AddSourceLocation(
E->getRParenLoc());
1287 Record.push_back(
E->getTemplateDepth());
1291void ASTStmtWriter::VisitChooseExpr(
ChooseExpr *
E) {
1296 Record.AddSourceLocation(
E->getBuiltinLoc());
1297 Record.AddSourceLocation(
E->getRParenLoc());
1298 Record.push_back(
E->isConditionDependent() ?
false :
E->isConditionTrue());
1304 Record.AddSourceLocation(
E->getTokenLocation());
1310 Record.push_back(
E->getNumSubExprs());
1311 for (
unsigned I = 0, N =
E->getNumSubExprs(); I != N; ++I)
1312 Record.AddStmt(
E->getExpr(I));
1313 Record.AddSourceLocation(
E->getBuiltinLoc());
1314 Record.AddSourceLocation(
E->getRParenLoc());
1320 Record.AddSourceLocation(
E->getBuiltinLoc());
1321 Record.AddSourceLocation(
E->getRParenLoc());
1322 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1323 Record.AddStmt(
E->getSrcExpr());
1327void ASTStmtWriter::VisitBlockExpr(
BlockExpr *
E) {
1329 Record.AddDeclRef(
E->getBlockDecl());
1336 Record.push_back(
E->getNumAssocs());
1337 Record.push_back(
E->isExprPredicate());
1338 Record.push_back(
E->ResultIndex);
1339 Record.AddSourceLocation(
E->getGenericLoc());
1340 Record.AddSourceLocation(
E->getDefaultLoc());
1341 Record.AddSourceLocation(
E->getRParenLoc());
1343 Stmt **Stmts =
E->getTrailingObjects<
Stmt *>();
1347 for (
unsigned I = 0, N =
E->getNumAssocs() + 1; I < N; ++I)
1348 Record.AddStmt(Stmts[I]);
1351 for (
unsigned I = 0, N =
E->getNumAssocs(); I < N; ++I)
1352 Record.AddTypeSourceInfo(TSIs[I]);
1359 Record.push_back(
E->getNumSemanticExprs());
1363 unsigned result =
E->getResultExprIndex();
1365 Record.push_back(result);
1367 Record.AddStmt(
E->getSyntacticForm());
1369 i =
E->semantics_begin(), e =
E->semantics_end(); i != e; ++i) {
1375void ASTStmtWriter::VisitAtomicExpr(
AtomicExpr *
E) {
1378 for (
unsigned I = 0, N =
E->getNumSubExprs(); I != N; ++I)
1379 Record.AddStmt(
E->getSubExprs()[I]);
1380 Record.AddSourceLocation(
E->getBuiltinLoc());
1381 Record.AddSourceLocation(
E->getRParenLoc());
1391 Record.AddStmt(
E->getString());
1392 Record.AddSourceLocation(
E->getAtLoc());
1398 Record.AddStmt(
E->getSubExpr());
1399 Record.AddDeclRef(
E->getBoxingMethod());
1406 Record.push_back(
E->getNumElements());
1407 for (
unsigned i = 0; i <
E->getNumElements(); i++)
1408 Record.AddStmt(
E->getElement(i));
1409 Record.AddDeclRef(
E->getArrayWithObjectsMethod());
1416 Record.push_back(
E->getNumElements());
1417 Record.push_back(
E->HasPackExpansions);
1418 for (
unsigned i = 0; i <
E->getNumElements(); i++) {
1420 Record.AddStmt(Element.Key);
1421 Record.AddStmt(Element.Value);
1422 if (
E->HasPackExpansions) {
1423 Record.AddSourceLocation(Element.EllipsisLoc);
1424 unsigned NumExpansions = 0;
1425 if (Element.NumExpansions)
1426 NumExpansions = *Element.NumExpansions + 1;
1427 Record.push_back(NumExpansions);
1431 Record.AddDeclRef(
E->getDictWithObjectsMethod());
1438 Record.AddTypeSourceInfo(
E->getEncodedTypeSourceInfo());
1439 Record.AddSourceLocation(
E->getAtLoc());
1440 Record.AddSourceLocation(
E->getRParenLoc());
1446 Record.AddSelectorRef(
E->getSelector());
1447 Record.AddSourceLocation(
E->getAtLoc());
1448 Record.AddSourceLocation(
E->getRParenLoc());
1454 Record.AddDeclRef(
E->getProtocol());
1455 Record.AddSourceLocation(
E->getAtLoc());
1456 Record.AddSourceLocation(
E->ProtoLoc);
1457 Record.AddSourceLocation(
E->getRParenLoc());
1463 Record.AddDeclRef(
E->getDecl());
1464 Record.AddSourceLocation(
E->getLocation());
1465 Record.AddSourceLocation(
E->getOpLoc());
1467 Record.push_back(
E->isArrow());
1468 Record.push_back(
E->isFreeIvar());
1474 Record.push_back(
E->SetterAndMethodRefFlags.getInt());
1475 Record.push_back(
E->isImplicitProperty());
1476 if (
E->isImplicitProperty()) {
1477 Record.AddDeclRef(
E->getImplicitPropertyGetter());
1478 Record.AddDeclRef(
E->getImplicitPropertySetter());
1480 Record.AddDeclRef(
E->getExplicitProperty());
1482 Record.AddSourceLocation(
E->getLocation());
1483 Record.AddSourceLocation(
E->getReceiverLocation());
1484 if (
E->isObjectReceiver()) {
1487 }
else if (
E->isSuperReceiver()) {
1489 Record.AddTypeRef(
E->getSuperReceiverType());
1492 Record.AddDeclRef(
E->getClassReceiver());
1500 Record.AddSourceLocation(
E->getRBracket());
1501 Record.AddStmt(
E->getBaseExpr());
1502 Record.AddStmt(
E->getKeyExpr());
1503 Record.AddDeclRef(
E->getAtIndexMethodDecl());
1504 Record.AddDeclRef(
E->setAtIndexMethodDecl());
1511 Record.push_back(
E->getNumArgs());
1512 Record.push_back(
E->getNumStoredSelLocs());
1513 Record.push_back(
E->SelLocsKind);
1514 Record.push_back(
E->isDelegateInitCall());
1515 Record.push_back(
E->IsImplicit);
1516 Record.push_back((
unsigned)
E->getReceiverKind());
1517 switch (
E->getReceiverKind()) {
1519 Record.AddStmt(
E->getInstanceReceiver());
1523 Record.AddTypeSourceInfo(
E->getClassReceiverTypeInfo());
1528 Record.AddTypeRef(
E->getSuperType());
1529 Record.AddSourceLocation(
E->getSuperLoc());
1533 if (
E->getMethodDecl()) {
1535 Record.AddDeclRef(
E->getMethodDecl());
1538 Record.AddSelectorRef(
E->getSelector());
1541 Record.AddSourceLocation(
E->getLeftLoc());
1542 Record.AddSourceLocation(
E->getRightLoc());
1545 Arg != ArgEnd; ++Arg)
1549 for (
unsigned i = 0, e =
E->getNumStoredSelLocs(); i != e; ++i)
1550 Record.AddSourceLocation(Locs[i]);
1557 Record.AddStmt(S->getElement());
1558 Record.AddStmt(S->getCollection());
1559 Record.AddStmt(S->getBody());
1560 Record.AddSourceLocation(S->getForLoc());
1561 Record.AddSourceLocation(S->getRParenLoc());
1567 Record.AddStmt(S->getCatchBody());
1568 Record.AddDeclRef(S->getCatchParamDecl());
1569 Record.AddSourceLocation(S->getAtCatchLoc());
1570 Record.AddSourceLocation(S->getRParenLoc());
1576 Record.AddStmt(S->getFinallyBody());
1577 Record.AddSourceLocation(S->getAtFinallyLoc());
1583 Record.AddStmt(S->getSubStmt());
1584 Record.AddSourceLocation(S->getAtLoc());
1590 Record.push_back(S->getNumCatchStmts());
1591 Record.push_back(S->getFinallyStmt() !=
nullptr);
1592 Record.AddStmt(S->getTryBody());
1595 if (S->getFinallyStmt())
1596 Record.AddStmt(S->getFinallyStmt());
1597 Record.AddSourceLocation(S->getAtTryLoc());
1603 Record.AddStmt(S->getSynchExpr());
1604 Record.AddStmt(S->getSynchBody());
1605 Record.AddSourceLocation(S->getAtSynchronizedLoc());
1611 Record.AddStmt(S->getThrowExpr());
1612 Record.AddSourceLocation(S->getThrowLoc());
1618 Record.push_back(
E->getValue());
1619 Record.AddSourceLocation(
E->getLocation());
1626 Record.AddVersionTuple(
E->getVersion());
1634void ASTStmtWriter::VisitCXXCatchStmt(
CXXCatchStmt *S) {
1636 Record.AddSourceLocation(S->getCatchLoc());
1637 Record.AddDeclRef(S->getExceptionDecl());
1638 Record.AddStmt(S->getHandlerBlock());
1642void ASTStmtWriter::VisitCXXTryStmt(
CXXTryStmt *S) {
1644 Record.push_back(S->getNumHandlers());
1645 Record.AddSourceLocation(S->getTryLoc());
1646 Record.AddStmt(S->getTryBlock());
1647 for (
unsigned i = 0, e = S->getNumHandlers(); i != e; ++i)
1648 Record.AddStmt(S->getHandler(i));
1654 Record.AddSourceLocation(S->getForLoc());
1655 Record.AddSourceLocation(S->getCoawaitLoc());
1656 Record.AddSourceLocation(S->getColonLoc());
1657 Record.AddSourceLocation(S->getRParenLoc());
1658 Record.AddStmt(S->getInit());
1659 Record.AddStmt(S->getRangeStmt());
1660 Record.AddStmt(S->getBeginStmt());
1661 Record.AddStmt(S->getEndStmt());
1662 Record.AddStmt(S->getCond());
1663 Record.AddStmt(S->getInc());
1664 Record.AddStmt(S->getLoopVarStmt());
1665 Record.AddStmt(S->getBody());
1671 Record.AddSourceLocation(S->getKeywordLoc());
1672 Record.push_back(S->isIfExists());
1673 Record.AddNestedNameSpecifierLoc(S->getQualifierLoc());
1674 Record.AddDeclarationNameInfo(S->getNameInfo());
1675 Record.AddStmt(S->getSubStmt());
1681 Record.push_back(
E->getOperator());
1682 Record.AddSourceRange(
E->Range);
1684 if (!
E->hasStoredFPFeatures() && !
static_cast<bool>(
E->getADLCallKind()))
1693 if (!
E->hasStoredFPFeatures() && !
static_cast<bool>(
E->getADLCallKind()))
1699void ASTStmtWriter::VisitCXXRewrittenBinaryOperator(
1702 Record.push_back(
E->isReversed());
1703 Record.AddStmt(
E->getSemanticForm());
1710 Record.push_back(
E->getNumArgs());
1711 Record.push_back(
E->isElidable());
1712 Record.push_back(
E->hadMultipleCandidates());
1713 Record.push_back(
E->isListInitialization());
1714 Record.push_back(
E->isStdInitListInitialization());
1715 Record.push_back(
E->requiresZeroInitialization());
1717 llvm::to_underlying(
E->getConstructionKind()));
1718 Record.push_back(
E->isImmediateEscalating());
1719 Record.AddSourceLocation(
E->getLocation());
1720 Record.AddDeclRef(
E->getConstructor());
1721 Record.AddSourceRange(
E->getParenOrBraceRange());
1723 for (
unsigned I = 0, N =
E->getNumArgs(); I != N; ++I)
1731 Record.AddDeclRef(
E->getConstructor());
1732 Record.AddSourceLocation(
E->getLocation());
1733 Record.push_back(
E->constructsVBase());
1734 Record.push_back(
E->inheritedFromVBase());
1739 VisitCXXConstructExpr(
E);
1740 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1744void ASTStmtWriter::VisitLambdaExpr(
LambdaExpr *
E) {
1747 Record.AddSourceRange(
E->IntroducerRange);
1749 Record.AddSourceLocation(
E->CaptureDefaultLoc);
1752 Record.AddSourceLocation(
E->ClosingBrace);
1756 CEnd =
E->capture_init_end();
1769 Record.AddStmt(
E->getSubExpr());
1774 VisitExplicitCastExpr(
E);
1776 CurrentPackingBits.addBit(
E->getAngleBrackets().isValid());
1777 if (
E->getAngleBrackets().isValid())
1778 Record.AddSourceRange(
E->getAngleBrackets());
1782 VisitCXXNamedCastExpr(
E);
1787 VisitCXXNamedCastExpr(
E);
1792 VisitCXXNamedCastExpr(
E);
1797 VisitCXXNamedCastExpr(
E);
1802 VisitCXXNamedCastExpr(
E);
1807 VisitExplicitCastExpr(
E);
1808 Record.AddSourceLocation(
E->getLParenLoc());
1809 Record.AddSourceLocation(
E->getRParenLoc());
1814 VisitExplicitCastExpr(
E);
1822 Record.AddSourceLocation(
E->UDSuffixLoc);
1828 Record.push_back(
E->getValue());
1829 Record.AddSourceLocation(
E->getLocation());
1835 Record.AddSourceLocation(
E->getLocation());
1842 if (
E->isTypeOperand()) {
1843 Record.AddTypeSourceInfo(
E->getTypeOperandSourceInfo());
1846 Record.AddStmt(
E->getExprOperand());
1853 Record.AddSourceLocation(
E->getLocation());
1854 Record.push_back(
E->isImplicit());
1855 Record.push_back(
E->isCapturedByCopyInLambdaWithExplicitObjectParameter());
1862 Record.AddSourceLocation(
E->getThrowLoc());
1863 Record.AddStmt(
E->getSubExpr());
1864 Record.push_back(
E->isThrownVariableInScope());
1870 Record.AddDeclRef(
E->getParam());
1871 Record.AddDeclRef(cast_or_null<Decl>(
E->getUsedContext()));
1872 Record.AddSourceLocation(
E->getUsedLocation());
1873 Record.push_back(
E->hasRewrittenInit());
1874 if (
E->hasRewrittenInit())
1875 Record.AddStmt(
E->getRewrittenExpr());
1881 Record.push_back(
E->hasRewrittenInit());
1882 Record.AddDeclRef(
E->getField());
1883 Record.AddDeclRef(cast_or_null<Decl>(
E->getUsedContext()));
1885 if (
E->hasRewrittenInit())
1886 Record.AddStmt(
E->getRewrittenExpr());
1892 Record.AddCXXTemporary(
E->getTemporary());
1893 Record.AddStmt(
E->getSubExpr());
1899 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1900 Record.AddSourceLocation(
E->getRParenLoc());
1904void ASTStmtWriter::VisitCXXNewExpr(
CXXNewExpr *
E) {
1907 Record.push_back(
E->isArray());
1908 Record.push_back(
E->hasInitializer());
1909 Record.push_back(
E->getNumPlacementArgs());
1910 Record.push_back(
E->isParenTypeId());
1912 Record.push_back(
E->isGlobalNew());
1913 Record.push_back(
E->passAlignment());
1914 Record.push_back(
E->doesUsualArrayDeleteWantSize());
1918 Record.AddDeclRef(
E->getOperatorNew());
1919 Record.AddDeclRef(
E->getOperatorDelete());
1920 Record.AddTypeSourceInfo(
E->getAllocatedTypeSourceInfo());
1921 if (
E->isParenTypeId())
1922 Record.AddSourceRange(
E->getTypeIdParens());
1924 Record.AddSourceRange(
E->getDirectInitRange());
1935 Record.push_back(
E->isGlobalDelete());
1936 Record.push_back(
E->isArrayForm());
1937 Record.push_back(
E->isArrayFormAsWritten());
1938 Record.push_back(
E->doesUsualArrayDeleteWantSize());
1939 Record.AddDeclRef(
E->getOperatorDelete());
1940 Record.AddStmt(
E->getArgument());
1950 Record.push_back(
E->isArrow());
1951 Record.AddSourceLocation(
E->getOperatorLoc());
1952 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
1953 Record.AddTypeSourceInfo(
E->getScopeTypeInfo());
1954 Record.AddSourceLocation(
E->getColonColonLoc());
1955 Record.AddSourceLocation(
E->getTildeLoc());
1958 Record.AddIdentifierRef(
E->getDestroyedTypeIdentifier());
1959 if (
E->getDestroyedTypeIdentifier())
1960 Record.AddSourceLocation(
E->getDestroyedTypeLoc());
1962 Record.AddTypeSourceInfo(
E->getDestroyedTypeInfo());
1969 Record.push_back(
E->getNumObjects());
1970 for (
auto &Obj :
E->getObjects()) {
1971 if (
auto *BD = Obj.dyn_cast<
BlockDecl *>()) {
1980 Record.push_back(
E->cleanupsHaveSideEffects());
1981 Record.AddStmt(
E->getSubExpr());
1985void ASTStmtWriter::VisitCXXDependentScopeMemberExpr(
1991 Record.push_back(
E->getNumTemplateArgs());
1992 CurrentPackingBits.updateBits();
1993 CurrentPackingBits.addBit(
E->hasTemplateKWAndArgsInfo());
1994 CurrentPackingBits.addBit(
E->hasFirstQualifierFoundInScope());
1996 if (
E->hasTemplateKWAndArgsInfo()) {
2003 CurrentPackingBits.addBit(
E->isArrow());
2005 Record.AddTypeRef(
E->getBaseType());
2006 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2007 CurrentPackingBits.addBit(!
E->isImplicitAccess());
2008 if (!
E->isImplicitAccess())
2011 Record.AddSourceLocation(
E->getOperatorLoc());
2013 if (
E->hasFirstQualifierFoundInScope())
2014 Record.AddDeclRef(
E->getFirstQualifierFoundInScope());
2016 Record.AddDeclarationNameInfo(
E->MemberNameInfo);
2026 CurrentPackingBits.addBit(
2038 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2039 Record.AddDeclarationNameInfo(
E->NameInfo);
2046 Record.push_back(
E->getNumArgs());
2048 ArgI =
E->arg_begin(), ArgE =
E->arg_end(); ArgI != ArgE; ++ArgI)
2050 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
2051 Record.AddSourceLocation(
E->getLParenLoc());
2052 Record.AddSourceLocation(
E->getRParenLoc());
2053 Record.push_back(
E->isListInitialization());
2060 Record.push_back(
E->getNumDecls());
2062 CurrentPackingBits.updateBits();
2063 CurrentPackingBits.addBit(
E->hasTemplateKWAndArgsInfo());
2064 if (
E->hasTemplateKWAndArgsInfo()) {
2066 *
E->getTrailingASTTemplateKWAndArgsInfo();
2072 OvE =
E->decls_end();
2073 OvI != OvE; ++OvI) {
2074 Record.AddDeclRef(OvI.getDecl());
2075 Record.push_back(OvI.getAccess());
2078 Record.AddDeclarationNameInfo(
E->getNameInfo());
2079 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2083 VisitOverloadExpr(
E);
2084 CurrentPackingBits.addBit(
E->isArrow());
2085 CurrentPackingBits.addBit(
E->hasUnresolvedUsing());
2086 CurrentPackingBits.addBit(!
E->isImplicitAccess());
2087 if (!
E->isImplicitAccess())
2090 Record.AddSourceLocation(
E->getOperatorLoc());
2092 Record.AddTypeRef(
E->getBaseType());
2097 VisitOverloadExpr(
E);
2098 CurrentPackingBits.addBit(
E->requiresADL());
2099 Record.AddDeclRef(
E->getNamingClass());
2108 if (
Found->isFromASTFile())
2113 for (
auto *NS : ExternalNSs)
2114 for (
auto *
Found : NS->lookup(Name))
2125 for (
unsigned I = 0, N =
E->getNumArgs(); I != N; ++I)
2126 Record.AddTypeSourceInfo(
E->getArg(I));
2132 Record.push_back(
E->getTrait());
2133 Record.push_back(
E->getValue());
2135 Record.AddTypeSourceInfo(
E->getQueriedTypeSourceInfo());
2136 Record.AddStmt(
E->getDimensionExpression());
2142 Record.push_back(
E->getTrait());
2143 Record.push_back(
E->getValue());
2145 Record.AddStmt(
E->getQueriedExpression());
2151 Record.push_back(
E->getValue());
2153 Record.AddStmt(
E->getOperand());
2159 Record.AddSourceLocation(
E->getEllipsisLoc());
2160 Record.push_back(
E->NumExpansions);
2161 Record.AddStmt(
E->getPattern());
2167 Record.push_back(
E->isPartiallySubstituted() ?
E->getPartialArguments().size()
2169 Record.AddSourceLocation(
E->OperatorLoc);
2170 Record.AddSourceLocation(
E->PackLoc);
2171 Record.AddSourceLocation(
E->RParenLoc);
2173 if (
E->isPartiallySubstituted()) {
2174 for (
const auto &TA :
E->getPartialArguments())
2175 Record.AddTemplateArgument(TA);
2177 Record.push_back(
E->getPackLength());
2184 Record.push_back(
E->TransformedExpressions);
2185 Record.push_back(
E->ExpandedToEmptyPack);
2186 Record.AddSourceLocation(
E->getEllipsisLoc());
2187 Record.AddSourceLocation(
E->getRSquareLoc());
2188 Record.AddStmt(
E->getPackIdExpression());
2189 Record.AddStmt(
E->getIndexExpr());
2190 for (
Expr *Sub :
E->getExpressions())
2195void ASTStmtWriter::VisitSubstNonTypeTemplateParmExpr(
2198 Record.AddDeclRef(
E->getAssociatedDecl());
2199 CurrentPackingBits.addBit(
E->isReferenceParameter());
2200 CurrentPackingBits.addBits(
E->getIndex(), 12);
2201 CurrentPackingBits.addBit((
bool)
E->getPackIndex());
2202 if (
auto PackIndex =
E->getPackIndex())
2203 Record.push_back(*PackIndex + 1);
2205 Record.AddSourceLocation(
E->getNameLoc());
2206 Record.AddStmt(
E->getReplacement());
2210void ASTStmtWriter::VisitSubstNonTypeTemplateParmPackExpr(
2213 Record.AddDeclRef(
E->getAssociatedDecl());
2214 Record.push_back(
E->getIndex());
2215 Record.AddTemplateArgument(
E->getArgumentPack());
2216 Record.AddSourceLocation(
E->getParameterPackLocation());
2222 Record.push_back(
E->getNumExpansions());
2223 Record.AddDeclRef(
E->getParameterPack());
2224 Record.AddSourceLocation(
E->getParameterPackLocation());
2233 Record.push_back(
static_cast<bool>(
E->getLifetimeExtendedTemporaryDecl()));
2234 if (
E->getLifetimeExtendedTemporaryDecl())
2235 Record.AddDeclRef(
E->getLifetimeExtendedTemporaryDecl());
2237 Record.AddStmt(
E->getSubExpr());
2243 Record.AddSourceLocation(
E->LParenLoc);
2244 Record.AddSourceLocation(
E->EllipsisLoc);
2245 Record.AddSourceLocation(
E->RParenLoc);
2246 Record.push_back(
E->NumExpansions);
2247 Record.AddStmt(
E->SubExprs[0]);
2248 Record.AddStmt(
E->SubExprs[1]);
2249 Record.AddStmt(
E->SubExprs[2]);
2257 Record.push_back(InitExprs.size());
2258 Record.push_back(
E->getUserSpecifiedInitExprs().size());
2259 Record.AddSourceLocation(
E->getInitLoc());
2262 for (
Expr *InitExpr :
E->getInitExprs())
2263 Record.AddStmt(InitExpr);
2264 Expr *ArrayFiller =
E->getArrayFiller();
2265 FieldDecl *UnionField =
E->getInitializedFieldInUnion();
2266 bool HasArrayFillerOrUnionDecl = ArrayFiller || UnionField;
2267 Record.push_back(HasArrayFillerOrUnionDecl);
2268 if (HasArrayFillerOrUnionDecl) {
2269 Record.push_back(
static_cast<bool>(ArrayFiller));
2271 Record.AddStmt(ArrayFiller);
2273 Record.AddDeclRef(UnionField);
2280 Record.AddStmt(
E->getSourceExpr());
2281 Record.AddSourceLocation(
E->getLocation());
2282 Record.push_back(
E->isUnique());
2286void ASTStmtWriter::VisitTypoExpr(
TypoExpr *
E) {
2289 llvm_unreachable(
"Cannot write TypoExpr nodes");
2298 Record.AddStmt(
E->getConfig());
2305void ASTStmtWriter::VisitAsTypeExpr(
AsTypeExpr *
E) {
2307 Record.AddSourceLocation(
E->getBuiltinLoc());
2308 Record.AddSourceLocation(
E->getRParenLoc());
2309 Record.AddStmt(
E->getSrcExpr());
2318 Record.push_back(
E->isArrow());
2319 Record.AddStmt(
E->getBaseExpr());
2320 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2321 Record.AddSourceLocation(
E->getMemberLoc());
2322 Record.AddDeclRef(
E->getPropertyDecl());
2330 Record.AddSourceLocation(
E->getRBracketLoc());
2337 Record.AddDeclRef(
E->getGuidDecl());
2338 if (
E->isTypeOperand()) {
2339 Record.AddTypeSourceInfo(
E->getTypeOperandSourceInfo());
2342 Record.AddStmt(
E->getExprOperand());
2349 Record.AddSourceLocation(S->getExceptLoc());
2350 Record.AddStmt(S->getFilterExpr());
2351 Record.AddStmt(S->getBlock());
2357 Record.AddSourceLocation(S->getFinallyLoc());
2358 Record.AddStmt(S->getBlock());
2362void ASTStmtWriter::VisitSEHTryStmt(
SEHTryStmt *S) {
2364 Record.push_back(S->getIsCXXTry());
2365 Record.AddSourceLocation(S->getTryLoc());
2366 Record.AddStmt(S->getTryBlock());
2367 Record.AddStmt(S->getHandler());
2371void ASTStmtWriter::VisitSEHLeaveStmt(
SEHLeaveStmt *S) {
2373 Record.AddSourceLocation(S->getLeaveLoc());
2383 for (
Stmt *SubStmt : S->SubStmts)
2389 Record.writeOMPChildren(
E->Data);
2396 Record.writeUInt32(
D->getLoopsNumber());
2397 VisitOMPExecutableDirective(
D);
2401 VisitOMPLoopBasedDirective(
D);
2406 Record.push_back(
D->getNumClauses());
2407 VisitOMPExecutableDirective(
D);
2413 VisitOMPExecutableDirective(
D);
2414 Record.writeBool(
D->hasCancel());
2419 VisitOMPLoopDirective(
D);
2423void ASTStmtWriter::VisitOMPLoopTransformationDirective(
2425 VisitOMPLoopBasedDirective(
D);
2426 Record.writeUInt32(
D->getNumGeneratedLoops());
2430 VisitOMPLoopTransformationDirective(
D);
2435 VisitOMPLoopTransformationDirective(
D);
2440 VisitOMPLoopTransformationDirective(
D);
2445 VisitOMPLoopTransformationDirective(
D);
2450 VisitOMPLoopDirective(
D);
2451 Record.writeBool(
D->hasCancel());
2456 VisitOMPLoopDirective(
D);
2462 VisitOMPExecutableDirective(
D);
2463 Record.writeBool(
D->hasCancel());
2469 VisitOMPExecutableDirective(
D);
2470 Record.writeBool(
D->hasCancel());
2476 VisitOMPExecutableDirective(
D);
2482 VisitOMPExecutableDirective(
D);
2488 VisitOMPExecutableDirective(
D);
2494 VisitOMPExecutableDirective(
D);
2495 Record.AddDeclarationNameInfo(
D->getDirectiveName());
2500 VisitOMPLoopDirective(
D);
2501 Record.writeBool(
D->hasCancel());
2505void ASTStmtWriter::VisitOMPParallelForSimdDirective(
2507 VisitOMPLoopDirective(
D);
2511void ASTStmtWriter::VisitOMPParallelMasterDirective(
2514 VisitOMPExecutableDirective(
D);
2518void ASTStmtWriter::VisitOMPParallelMaskedDirective(
2521 VisitOMPExecutableDirective(
D);
2525void ASTStmtWriter::VisitOMPParallelSectionsDirective(
2528 VisitOMPExecutableDirective(
D);
2529 Record.writeBool(
D->hasCancel());
2535 VisitOMPExecutableDirective(
D);
2536 Record.writeBool(
D->hasCancel());
2542 VisitOMPExecutableDirective(
D);
2543 Record.writeBool(
D->isXLHSInRHSPart());
2544 Record.writeBool(
D->isPostfixUpdate());
2545 Record.writeBool(
D->isFailOnly());
2551 VisitOMPExecutableDirective(
D);
2557 VisitOMPExecutableDirective(
D);
2561void ASTStmtWriter::VisitOMPTargetEnterDataDirective(
2564 VisitOMPExecutableDirective(
D);
2568void ASTStmtWriter::VisitOMPTargetExitDataDirective(
2571 VisitOMPExecutableDirective(
D);
2575void ASTStmtWriter::VisitOMPTargetParallelDirective(
2578 VisitOMPExecutableDirective(
D);
2579 Record.writeBool(
D->hasCancel());
2583void ASTStmtWriter::VisitOMPTargetParallelForDirective(
2585 VisitOMPLoopDirective(
D);
2586 Record.writeBool(
D->hasCancel());
2592 VisitOMPExecutableDirective(
D);
2598 VisitOMPExecutableDirective(
D);
2604 Record.push_back(
D->getNumClauses());
2605 VisitOMPExecutableDirective(
D);
2611 VisitOMPExecutableDirective(
D);
2617 Record.push_back(
D->getNumClauses());
2618 VisitOMPExecutableDirective(
D);
2624 VisitOMPExecutableDirective(
D);
2630 VisitOMPExecutableDirective(
D);
2636 VisitOMPExecutableDirective(
D);
2642 VisitOMPExecutableDirective(
D);
2648 VisitOMPExecutableDirective(
D);
2654 VisitOMPExecutableDirective(
D);
2658void ASTStmtWriter::VisitOMPCancellationPointDirective(
2661 VisitOMPExecutableDirective(
D);
2662 Record.writeEnum(
D->getCancelRegion());
2668 VisitOMPExecutableDirective(
D);
2669 Record.writeEnum(
D->getCancelRegion());
2674 VisitOMPLoopDirective(
D);
2675 Record.writeBool(
D->hasCancel());
2680 VisitOMPLoopDirective(
D);
2684void ASTStmtWriter::VisitOMPMasterTaskLoopDirective(
2686 VisitOMPLoopDirective(
D);
2687 Record.writeBool(
D->hasCancel());
2691void ASTStmtWriter::VisitOMPMaskedTaskLoopDirective(
2693 VisitOMPLoopDirective(
D);
2694 Record.writeBool(
D->hasCancel());
2698void ASTStmtWriter::VisitOMPMasterTaskLoopSimdDirective(
2700 VisitOMPLoopDirective(
D);
2704void ASTStmtWriter::VisitOMPMaskedTaskLoopSimdDirective(
2706 VisitOMPLoopDirective(
D);
2710void ASTStmtWriter::VisitOMPParallelMasterTaskLoopDirective(
2712 VisitOMPLoopDirective(
D);
2713 Record.writeBool(
D->hasCancel());
2717void ASTStmtWriter::VisitOMPParallelMaskedTaskLoopDirective(
2719 VisitOMPLoopDirective(
D);
2720 Record.writeBool(
D->hasCancel());
2724void ASTStmtWriter::VisitOMPParallelMasterTaskLoopSimdDirective(
2726 VisitOMPLoopDirective(
D);
2730void ASTStmtWriter::VisitOMPParallelMaskedTaskLoopSimdDirective(
2732 VisitOMPLoopDirective(
D);
2737 VisitOMPLoopDirective(
D);
2743 VisitOMPExecutableDirective(
D);
2747void ASTStmtWriter::VisitOMPDistributeParallelForDirective(
2749 VisitOMPLoopDirective(
D);
2750 Record.writeBool(
D->hasCancel());
2754void ASTStmtWriter::VisitOMPDistributeParallelForSimdDirective(
2756 VisitOMPLoopDirective(
D);
2760void ASTStmtWriter::VisitOMPDistributeSimdDirective(
2762 VisitOMPLoopDirective(
D);
2766void ASTStmtWriter::VisitOMPTargetParallelForSimdDirective(
2768 VisitOMPLoopDirective(
D);
2773 VisitOMPLoopDirective(
D);
2777void ASTStmtWriter::VisitOMPTeamsDistributeDirective(
2779 VisitOMPLoopDirective(
D);
2783void ASTStmtWriter::VisitOMPTeamsDistributeSimdDirective(
2785 VisitOMPLoopDirective(
D);
2789void ASTStmtWriter::VisitOMPTeamsDistributeParallelForSimdDirective(
2791 VisitOMPLoopDirective(
D);
2795void ASTStmtWriter::VisitOMPTeamsDistributeParallelForDirective(
2797 VisitOMPLoopDirective(
D);
2798 Record.writeBool(
D->hasCancel());
2804 VisitOMPExecutableDirective(
D);
2808void ASTStmtWriter::VisitOMPTargetTeamsDistributeDirective(
2810 VisitOMPLoopDirective(
D);
2814void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForDirective(
2816 VisitOMPLoopDirective(
D);
2817 Record.writeBool(
D->hasCancel());
2821void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
2823 VisitOMPLoopDirective(
D);
2828void ASTStmtWriter::VisitOMPTargetTeamsDistributeSimdDirective(
2830 VisitOMPLoopDirective(
D);
2836 VisitOMPExecutableDirective(
D);
2842 VisitOMPExecutableDirective(
D);
2843 Record.AddSourceLocation(
D->getTargetCallLoc());
2849 VisitOMPExecutableDirective(
D);
2854 VisitOMPLoopDirective(
D);
2858void ASTStmtWriter::VisitOMPTeamsGenericLoopDirective(
2860 VisitOMPLoopDirective(
D);
2864void ASTStmtWriter::VisitOMPTargetTeamsGenericLoopDirective(
2866 VisitOMPLoopDirective(
D);
2867 Record.writeBool(
D->canBeParallelFor());
2871void ASTStmtWriter::VisitOMPParallelGenericLoopDirective(
2873 VisitOMPLoopDirective(
D);
2877void ASTStmtWriter::VisitOMPTargetParallelGenericLoopDirective(
2879 VisitOMPLoopDirective(
D);
2887 Record.push_back(S->clauses().size());
2888 Record.writeEnum(S->Kind);
2889 Record.AddSourceRange(S->Range);
2890 Record.AddSourceLocation(S->DirectiveLoc);
2891 Record.writeOpenACCClauseList(S->clauses());
2894void ASTStmtWriter::VisitOpenACCAssociatedStmtConstruct(
2896 VisitOpenACCConstructStmt(S);
2897 Record.AddStmt(S->getAssociatedStmt());
2902 VisitOpenACCAssociatedStmtConstruct(S);
2908 VisitOpenACCAssociatedStmtConstruct(S);
2917 assert(!SwitchCaseIDs.contains(S) &&
"SwitchCase recorded twice");
2918 unsigned NextID = SwitchCaseIDs.size();
2919 SwitchCaseIDs[S] = NextID;
2924 assert(SwitchCaseIDs.contains(S) &&
"SwitchCase hasn't been seen yet");
2925 return SwitchCaseIDs[S];
2929 SwitchCaseIDs.clear();
2934void ASTWriter::WriteSubStmt(
Stmt *S) {
2944 llvm::DenseMap<Stmt *, uint64_t>::iterator I = SubStmtEntries.find(S);
2945 if (I != SubStmtEntries.end()) {
2946 Record.push_back(I->second);
2952 assert(!ParentStmts.count(S) &&
"There is a Stmt cycle!");
2954 struct ParentStmtInserterRAII {
2959 : S(S), ParentStmts(ParentStmts) {
2960 ParentStmts.insert(S);
2962 ~ParentStmtInserterRAII() {
2963 ParentStmts.erase(S);
2967 ParentStmtInserterRAII ParentStmtInserter(S, ParentStmts);
2973 SubStmtEntries[S] = Offset;
2978void ASTRecordWriter::FlushStmts() {
2981 assert(Writer->SubStmtEntries.empty() &&
"unexpected entries in sub-stmt map");
2982 assert(Writer->ParentStmts.empty() &&
"unexpected entries in parent stmt map");
2984 for (
unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
2985 Writer->WriteSubStmt(StmtsToEmit[I]);
2987 assert(N == StmtsToEmit.size() &&
"record modified while being written!");
2994 Writer->SubStmtEntries.clear();
2995 Writer->ParentStmts.clear();
2998 StmtsToEmit.clear();
3001void ASTRecordWriter::FlushSubStmts() {
3005 for (
unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
3006 Writer->WriteSubStmt(StmtsToEmit[N - I - 1]);
3007 assert(N == StmtsToEmit.size() &&
"record modified while being written!");
3010 StmtsToEmit.clear();
This file provides AST data structures related to concepts.
Defines the clang::ASTContext interface.
static void addConstraintSatisfaction(ASTRecordWriter &Record, const ASTConstraintSatisfaction &Satisfaction)
static void addSubstitutionDiagnostic(ASTRecordWriter &Record, const concepts::Requirement::SubstitutionDiagnostic *D)
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Defines the C++ template declaration subclasses.
static DiagnosticBuilder Diag(DiagnosticsEngine *Diags, const LangOptions &Features, FullSourceLoc TokLoc, const char *TokBegin, const char *TokRangeBegin, const char *TokRangeEnd, unsigned DiagID)
Produce a diagnostic highlighting some portion of a literal.
llvm::MachO::Record Record
TranslationUnitDecl * getTranslationUnitDecl() const
void ReadKnownNamespaces(SmallVectorImpl< NamespaceDecl * > &Namespaces) override
Load the set of namespaces that are known to the external source, which will be used during typo corr...
An object for streaming information to a record.
void AddTemplateKWAndArgsInfo(const ASTTemplateKWAndArgsInfo &ArgInfo, const TemplateArgumentLoc *Args)
ASTStmtWriter(const ASTStmtWriter &)=delete
ASTStmtWriter & operator=(const ASTStmtWriter &)=delete
ASTStmtWriter(ASTWriter &Writer, ASTWriter::RecordData &Record)
Writes an AST file containing the contents of a translation unit.
unsigned getBinaryOperatorAbbrev() const
bool isWritingStdCXXNamedModules() const
unsigned getExprImplicitCastAbbrev() const
unsigned getSwitchCaseID(SwitchCase *S)
Retrieve the ID for the given switch-case statement.
unsigned getDeclRefExprAbbrev() const
unsigned getCXXOperatorCallExprAbbrev()
void ClearSwitchCaseIDs()
LocalDeclID GetDeclRef(const Decl *D)
Force a declaration to be emitted and get its local ID to the module file been writing.
ASTContext & getASTContext() const
unsigned getCXXMemberCallExprAbbrev()
ASTReader * getChain() const
unsigned getCompoundAssignOperatorAbbrev() const
unsigned RecordSwitchCaseID(SwitchCase *S)
Record an ID for the given switch-case statement.
unsigned getCharacterLiteralAbbrev() const
unsigned getCompoundStmtAbbrev() const
void AddToken(const Token &Tok, RecordDataImpl &Record)
Emit a token.
SmallVector< uint64_t, 64 > RecordData
unsigned getCallExprAbbrev() const
unsigned getIntegerLiteralAbbrev() const
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,...
Represents an attribute applied to a statement.
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".
A simple helper class to pack several bits in order into (a) 32 bit integer(s).
Represents a block literal declaration, which is like an unnamed FunctionDecl.
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....
Represents a call to a CUDA kernel function.
A C++ addrspace_cast expression (currently only enabled for OpenCL).
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]).
Represents a call to a C++ constructor.
A default argument (C++ [dcl.fct.default]).
A use of a default initializer in a constructor or in aggregate initialization.
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...
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
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....
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....
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)".
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.
Represents a list-initialization with parenthesis.
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
A rewritten comparison expression that was originally written using operator syntax.
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type.
A C++ static_cast expression (C++ [expr.static.cast]).
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.
Represents the this expression in C++.
A C++ throw-expression (C++ [except.throw]).
CXXTryStmt - A C++ try block, including all 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...
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]).
This captures a statement into a function.
CaseStmt - Represent a 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.
CompoundLiteralExpr - [C99 6.5.2.5].
CompoundStmt - This represents a group of statements like { stmt stmt }.
A reference to a concept and its template args, as it appears in the code.
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...
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.
ArrayRef< Stmt const * > getParamMoves() const
Represents an expression that might suspend coroutine execution; either a co_await or co_yield expres...
Represents a 'co_yield' expression.
A POD class for pairing a NamedDecl* with an access specifier.
lookup_result lookup(DeclarationName Name) const
lookup - Find the declarations (if any) with the given Name in this context.
A reference to a declared variable, function, enum, etc.
DeclStmt - Adaptor class for mixing declarations with statements and expressions.
Decl - This represents one declaration (or definition), e.g.
AccessSpecifier getAccess() const
The name of a declaration.
NameKind
The kind of the name stored in this DeclarationName.
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.
Represents a single C99 designator.
Represents a C99 designated initializer expression.
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...
This represents one expression.
bool isValueDependent() const
Determines whether the value of this expression depends on.
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
ExprObjectKind getObjectKind() const
getObjectKind - The object kind that this expression produces.
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
ExprDependence getDependence() const
An expression trait intrinsic.
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Represents a member of a struct/union/class.
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...
VarDecl *const * iterator
Iterators over the parameters which the parameter pack expanded into.
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.
GotoStmt - This represents a direct goto.
IfStmt - This represents an if/then/else.
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1....
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
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.
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...
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.
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]......
This represents '#pragma omp atomic' directive.
This represents '#pragma omp barrier' directive.
This represents '#pragma omp cancel' directive.
This represents '#pragma omp cancellation point' directive.
Representation of an OpenMP canonical loop.
This represents '#pragma omp critical' directive.
This represents '#pragma omp depobj' directive.
This represents '#pragma omp dispatch' directive.
This represents '#pragma omp distribute' directive.
This represents '#pragma omp distribute parallel for' composite directive.
This represents '#pragma omp distribute parallel for simd' composite directive.
This represents '#pragma omp distribute simd' composite directive.
This represents '#pragma omp error' directive.
This is a basic class for representing single OpenMP executable directive.
This represents '#pragma omp flush' directive.
This represents '#pragma omp for' directive.
This represents '#pragma omp for simd' directive.
This represents '#pragma omp loop' directive.
Represents the '#pragma omp interchange' loop transformation directive.
This represents '#pragma omp interop' directive.
OpenMP 5.0 [2.1.6 Iterators] Iterators are identifiers that expand to multiple values in the clause o...
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.
This represents '#pragma omp masked taskloop' directive.
This represents '#pragma omp masked taskloop simd' directive.
This represents '#pragma omp master' directive.
This represents '#pragma omp master taskloop' directive.
This represents '#pragma omp master taskloop simd' directive.
This represents '#pragma omp ordered' directive.
This represents '#pragma omp parallel' directive.
This represents '#pragma omp parallel for' directive.
This represents '#pragma omp parallel for simd' directive.
This represents '#pragma omp parallel loop' directive.
This represents '#pragma omp parallel masked' directive.
This represents '#pragma omp parallel masked taskloop' directive.
This represents '#pragma omp parallel masked taskloop simd' directive.
This represents '#pragma omp parallel master' directive.
This represents '#pragma omp parallel master taskloop' directive.
This represents '#pragma omp parallel master taskloop simd' directive.
This represents '#pragma omp parallel sections' directive.
Represents the '#pragma omp reverse' loop transformation directive.
This represents '#pragma omp scan' directive.
This represents '#pragma omp scope' directive.
This represents '#pragma omp section' directive.
This represents '#pragma omp sections' directive.
This represents '#pragma omp simd' directive.
This represents '#pragma omp single' directive.
This represents '#pragma omp target data' directive.
This represents '#pragma omp target' directive.
This represents '#pragma omp target enter data' directive.
This represents '#pragma omp target exit data' directive.
This represents '#pragma omp target parallel' directive.
This represents '#pragma omp target parallel for' directive.
This represents '#pragma omp target parallel for simd' directive.
This represents '#pragma omp target parallel loop' directive.
This represents '#pragma omp target simd' directive.
This represents '#pragma omp target teams' directive.
This represents '#pragma omp target teams distribute' combined directive.
This represents '#pragma omp target teams distribute parallel for' combined directive.
This represents '#pragma omp target teams distribute parallel for simd' combined directive.
This represents '#pragma omp target teams distribute simd' combined directive.
This represents '#pragma omp target teams loop' directive.
This represents '#pragma omp target update' directive.
This represents '#pragma omp task' directive.
This represents '#pragma omp taskloop' directive.
This represents '#pragma omp taskloop simd' directive.
This represents '#pragma omp taskgroup' directive.
This represents '#pragma omp taskwait' directive.
This represents '#pragma omp taskyield' directive.
This represents '#pragma omp teams' directive.
This represents '#pragma omp teams distribute' directive.
This represents '#pragma omp teams distribute parallel for' composite directive.
This represents '#pragma omp teams distribute parallel for simd' composite directive.
This represents '#pragma omp teams distribute simd' combined directive.
This represents '#pragma omp teams loop' directive.
This represents the '#pragma omp tile' loop transformation directive.
This represents the '#pragma omp unroll' loop transformation directive.
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp,...
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.
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...
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.
@ 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,...
Helper class for OffsetOfExpr.
unsigned getArrayExprIndex() const
For an array element node, returns the index into the array of expressions.
FieldDecl * getField() const
For a field offsetof node, returns the field.
IdentifierInfo * getFieldName() const
For a field or identifier offsetof node, returns the name of the field.
SourceRange getSourceRange() const LLVM_READONLY
Retrieve the source range that covers this offsetof node.
@ 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.
Kind getKind() const
Determine what kind of offsetof node this is.
CXXBaseSpecifier * getBase() const
For a base class node, returns the base specifier.
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 class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...
This is the base class for an OpenACC statement-level construct, other construct types are expected t...
This class represents a 'loop' construct.
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.
ParenExpr - This represents a parenthesized expression, e.g.
Represents a parameter to a function.
[C99 6.4.2.2] - A predefined identifier such as func.
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
Expr *const * semantics_iterator
Frontend produces RecoveryExprs on semantic errors that prevent creating other well-formed expression...
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
ReturnStmt - This represents a return, optionally of an expression: return; return 4;.
Represents a __leave statement.
static std::enable_if_t< std::is_base_of_v< Attr, AttrInfo >, SourceLocation > getAttrLoc(const AttrInfo &AL)
A helper function to provide Attribute Location for the Attr types AND the ParsedAttr.
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
Represents an expression that computes the length of a parameter pack.
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.
SourceLocation getEndLoc() const LLVM_READONLY
LambdaExprBitfields LambdaExprBits
StmtClass getStmtClass() const
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
TypeTraitExprBitfields TypeTraitExprBits
CXXNewExprBitfields CXXNewExprBits
ConstantExprBitfields ConstantExprBits
RequiresExprBitfields RequiresExprBits
DependentScopeDeclRefExprBitfields DependentScopeDeclRefExprBits
SourceLocation getBeginLoc() const LLVM_READONLY
void AddString(StringRef V) const
StringLiteral - This represents a string literal expression, e.g.
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...
SwitchStmt - This represents a 'switch' stmt.
Location wrapper for a TemplateArgument.
A container of type source information.
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
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),...
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Represents a C++ member access expression for which lookup produced a set of overloaded functions.
The iterator over UnresolvedSets.
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit....
Represents a call to the builtin function __builtin_va_arg.
WhileStmt - This represents a 'while' stmt.
@ SS_ConstraintsNotSatisfied
A static requirement that can be used in a requires-expression to check properties of types and expre...
StmtCode
Record codes for each kind of statement or expression.
@ STMT_OMP_SECTION_DIRECTIVE
@ EXPR_DESIGNATED_INIT
A DesignatedInitExpr record.
@ EXPR_COMPOUND_LITERAL
A CompoundLiteralExpr record.
@ STMT_OMP_ASSUME_DIRECTIVE
@ 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
@ EXPR_OBJC_ISA
An ObjCIsa Expr record.
@ STMT_OMP_SINGLE_DIRECTIVE
@ 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_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_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_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.
@ 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_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_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
@ EXPR_CXX_CONSTRUCT
A CXXConstructExpr record.
@ STMT_OMP_PARALLEL_MASKED_DIRECTIVE
@ STMT_OMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_DIRECTIVE
@ 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.
@ 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
@ 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.
@ OK_Ordinary
An ordinary object is located at an address in memory.
@ VK_PRValue
A pr-value expression (in the C++11 taxonomy) produces a temporary value.
The result of a constraint satisfaction check, containing the necessary information to diagnose an un...
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
SourceLocation LAngleLoc
The source location of the left angle bracket ('<').
unsigned NumTemplateArgs
The number of template arguments in TemplateArgs.
SourceLocation RAngleLoc
The source location of the right angle bracket ('>').
SourceLocation TemplateKWLoc
The source location of the template keyword; this is used as part of the representation of qualified ...
Iterator range representation begin:end[:step].
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.
An element in an Objective-C dictionary literal.
Iterator for iterating over Stmt * arrays that contain only T *.