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);
1066 CurrentPackingBits.addBit(
E->hasExcludedOverflowPattern());
1069 Record.AddSourceLocation(
E->getOperatorLoc());
1071 Record.push_back(
E->getStoredFPFeatures().getAsOpaqueInt());
1081 VisitBinaryOperator(
E);
1082 Record.AddTypeRef(
E->getComputationLHSType());
1083 Record.AddTypeRef(
E->getComputationResultType());
1097 Record.AddSourceLocation(
E->getQuestionLoc());
1098 Record.AddSourceLocation(
E->getColonLoc());
1105 Record.AddStmt(
E->getOpaqueValue());
1106 Record.AddStmt(
E->getCommon());
1108 Record.AddStmt(
E->getTrueExpr());
1109 Record.AddStmt(
E->getFalseExpr());
1110 Record.AddSourceLocation(
E->getQuestionLoc());
1111 Record.AddSourceLocation(
E->getColonLoc());
1117 CurrentPackingBits.addBit(
E->isPartOfExplicitCast());
1119 if (
E->path_size() == 0 && !
E->hasStoredFPFeatures())
1127 Record.AddTypeSourceInfo(
E->getTypeInfoAsWritten());
1131 VisitExplicitCastExpr(
E);
1132 Record.AddSourceLocation(
E->getLParenLoc());
1133 Record.AddSourceLocation(
E->getRParenLoc());
1139 Record.AddSourceLocation(
E->getLParenLoc());
1140 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1141 Record.AddStmt(
E->getInitializer());
1142 Record.push_back(
E->isFileScope());
1149 Record.AddIdentifierRef(&
E->getAccessor());
1150 Record.AddSourceLocation(
E->getAccessorLoc());
1158 Record.AddStmt(
E->getSyntacticForm());
1159 Record.AddSourceLocation(
E->getLBraceLoc());
1160 Record.AddSourceLocation(
E->getRBraceLoc());
1161 bool isArrayFiller =
E->ArrayFillerOrUnionFieldInit.is<
Expr*>();
1162 Record.push_back(isArrayFiller);
1164 Record.AddStmt(
E->getArrayFiller());
1166 Record.AddDeclRef(
E->getInitializedFieldInUnion());
1167 Record.push_back(
E->hadArrayRangeDesignator());
1168 Record.push_back(
E->getNumInits());
1169 if (isArrayFiller) {
1172 Expr *filler =
E->getArrayFiller();
1173 for (
unsigned I = 0, N =
E->getNumInits(); I != N; ++I)
1174 Record.AddStmt(
E->getInit(I) != filler ?
E->getInit(I) :
nullptr);
1176 for (
unsigned I = 0, N =
E->getNumInits(); I != N; ++I)
1177 Record.AddStmt(
E->getInit(I));
1184 Record.push_back(
E->getNumSubExprs());
1185 for (
unsigned I = 0, N =
E->getNumSubExprs(); I != N; ++I)
1186 Record.AddStmt(
E->getSubExpr(I));
1187 Record.AddSourceLocation(
E->getEqualOrColonLoc());
1188 Record.push_back(
E->usesGNUSyntax());
1190 if (
D.isFieldDesignator()) {
1193 Record.AddDeclRef(Field);
1196 Record.AddIdentifierRef(
D.getFieldName());
1198 Record.AddSourceLocation(
D.getDotLoc());
1199 Record.AddSourceLocation(
D.getFieldLoc());
1200 }
else if (
D.isArrayDesignator()) {
1202 Record.push_back(
D.getArrayIndex());
1203 Record.AddSourceLocation(
D.getLBracketLoc());
1204 Record.AddSourceLocation(
D.getRBracketLoc());
1206 assert(
D.isArrayRangeDesignator() &&
"Unknown designator");
1208 Record.push_back(
D.getArrayIndex());
1209 Record.AddSourceLocation(
D.getLBracketLoc());
1210 Record.AddSourceLocation(
D.getEllipsisLoc());
1211 Record.AddSourceLocation(
D.getRBracketLoc());
1220 Record.AddStmt(
E->getUpdater());
1224void ASTStmtWriter::VisitNoInitExpr(
NoInitExpr *
E) {
1231 Record.AddStmt(
E->SubExprs[0]);
1232 Record.AddStmt(
E->SubExprs[1]);
1246void ASTStmtWriter::VisitVAArgExpr(
VAArgExpr *
E) {
1248 Record.AddStmt(
E->getSubExpr());
1249 Record.AddTypeSourceInfo(
E->getWrittenTypeInfo());
1250 Record.AddSourceLocation(
E->getBuiltinLoc());
1251 Record.AddSourceLocation(
E->getRParenLoc());
1252 Record.push_back(
E->isMicrosoftABI());
1258 Record.AddDeclRef(cast_or_null<Decl>(
E->getParentContext()));
1261 Record.push_back(llvm::to_underlying(
E->getIdentKind()));
1265void ASTStmtWriter::VisitEmbedExpr(
EmbedExpr *
E) {
1269 Record.AddStmt(
E->getDataStringLiteral());
1270 Record.writeUInt32(
E->getStartingElementPos());
1271 Record.writeUInt32(
E->getDataElementCount());
1277 Record.AddSourceLocation(
E->getAmpAmpLoc());
1278 Record.AddSourceLocation(
E->getLabelLoc());
1279 Record.AddDeclRef(
E->getLabel());
1283void ASTStmtWriter::VisitStmtExpr(
StmtExpr *
E) {
1285 Record.AddStmt(
E->getSubStmt());
1286 Record.AddSourceLocation(
E->getLParenLoc());
1287 Record.AddSourceLocation(
E->getRParenLoc());
1288 Record.push_back(
E->getTemplateDepth());
1292void ASTStmtWriter::VisitChooseExpr(
ChooseExpr *
E) {
1297 Record.AddSourceLocation(
E->getBuiltinLoc());
1298 Record.AddSourceLocation(
E->getRParenLoc());
1299 Record.push_back(
E->isConditionDependent() ?
false :
E->isConditionTrue());
1305 Record.AddSourceLocation(
E->getTokenLocation());
1311 Record.push_back(
E->getNumSubExprs());
1312 for (
unsigned I = 0, N =
E->getNumSubExprs(); I != N; ++I)
1313 Record.AddStmt(
E->getExpr(I));
1314 Record.AddSourceLocation(
E->getBuiltinLoc());
1315 Record.AddSourceLocation(
E->getRParenLoc());
1321 Record.AddSourceLocation(
E->getBuiltinLoc());
1322 Record.AddSourceLocation(
E->getRParenLoc());
1323 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1324 Record.AddStmt(
E->getSrcExpr());
1328void ASTStmtWriter::VisitBlockExpr(
BlockExpr *
E) {
1330 Record.AddDeclRef(
E->getBlockDecl());
1337 Record.push_back(
E->getNumAssocs());
1338 Record.push_back(
E->isExprPredicate());
1339 Record.push_back(
E->ResultIndex);
1340 Record.AddSourceLocation(
E->getGenericLoc());
1341 Record.AddSourceLocation(
E->getDefaultLoc());
1342 Record.AddSourceLocation(
E->getRParenLoc());
1344 Stmt **Stmts =
E->getTrailingObjects<
Stmt *>();
1348 for (
unsigned I = 0, N =
E->getNumAssocs() + 1; I < N; ++I)
1349 Record.AddStmt(Stmts[I]);
1352 for (
unsigned I = 0, N =
E->getNumAssocs(); I < N; ++I)
1353 Record.AddTypeSourceInfo(TSIs[I]);
1360 Record.push_back(
E->getNumSemanticExprs());
1364 unsigned result =
E->getResultExprIndex();
1366 Record.push_back(result);
1368 Record.AddStmt(
E->getSyntacticForm());
1370 i =
E->semantics_begin(), e =
E->semantics_end(); i != e; ++i) {
1376void ASTStmtWriter::VisitAtomicExpr(
AtomicExpr *
E) {
1379 for (
unsigned I = 0, N =
E->getNumSubExprs(); I != N; ++I)
1380 Record.AddStmt(
E->getSubExprs()[I]);
1381 Record.AddSourceLocation(
E->getBuiltinLoc());
1382 Record.AddSourceLocation(
E->getRParenLoc());
1392 Record.AddStmt(
E->getString());
1393 Record.AddSourceLocation(
E->getAtLoc());
1399 Record.AddStmt(
E->getSubExpr());
1400 Record.AddDeclRef(
E->getBoxingMethod());
1407 Record.push_back(
E->getNumElements());
1408 for (
unsigned i = 0; i <
E->getNumElements(); i++)
1409 Record.AddStmt(
E->getElement(i));
1410 Record.AddDeclRef(
E->getArrayWithObjectsMethod());
1417 Record.push_back(
E->getNumElements());
1418 Record.push_back(
E->HasPackExpansions);
1419 for (
unsigned i = 0; i <
E->getNumElements(); i++) {
1421 Record.AddStmt(Element.Key);
1422 Record.AddStmt(Element.Value);
1423 if (
E->HasPackExpansions) {
1424 Record.AddSourceLocation(Element.EllipsisLoc);
1425 unsigned NumExpansions = 0;
1426 if (Element.NumExpansions)
1427 NumExpansions = *Element.NumExpansions + 1;
1428 Record.push_back(NumExpansions);
1432 Record.AddDeclRef(
E->getDictWithObjectsMethod());
1439 Record.AddTypeSourceInfo(
E->getEncodedTypeSourceInfo());
1440 Record.AddSourceLocation(
E->getAtLoc());
1441 Record.AddSourceLocation(
E->getRParenLoc());
1447 Record.AddSelectorRef(
E->getSelector());
1448 Record.AddSourceLocation(
E->getAtLoc());
1449 Record.AddSourceLocation(
E->getRParenLoc());
1455 Record.AddDeclRef(
E->getProtocol());
1456 Record.AddSourceLocation(
E->getAtLoc());
1457 Record.AddSourceLocation(
E->ProtoLoc);
1458 Record.AddSourceLocation(
E->getRParenLoc());
1464 Record.AddDeclRef(
E->getDecl());
1465 Record.AddSourceLocation(
E->getLocation());
1466 Record.AddSourceLocation(
E->getOpLoc());
1468 Record.push_back(
E->isArrow());
1469 Record.push_back(
E->isFreeIvar());
1475 Record.push_back(
E->SetterAndMethodRefFlags.getInt());
1476 Record.push_back(
E->isImplicitProperty());
1477 if (
E->isImplicitProperty()) {
1478 Record.AddDeclRef(
E->getImplicitPropertyGetter());
1479 Record.AddDeclRef(
E->getImplicitPropertySetter());
1481 Record.AddDeclRef(
E->getExplicitProperty());
1483 Record.AddSourceLocation(
E->getLocation());
1484 Record.AddSourceLocation(
E->getReceiverLocation());
1485 if (
E->isObjectReceiver()) {
1488 }
else if (
E->isSuperReceiver()) {
1490 Record.AddTypeRef(
E->getSuperReceiverType());
1493 Record.AddDeclRef(
E->getClassReceiver());
1501 Record.AddSourceLocation(
E->getRBracket());
1502 Record.AddStmt(
E->getBaseExpr());
1503 Record.AddStmt(
E->getKeyExpr());
1504 Record.AddDeclRef(
E->getAtIndexMethodDecl());
1505 Record.AddDeclRef(
E->setAtIndexMethodDecl());
1512 Record.push_back(
E->getNumArgs());
1513 Record.push_back(
E->getNumStoredSelLocs());
1514 Record.push_back(
E->SelLocsKind);
1515 Record.push_back(
E->isDelegateInitCall());
1516 Record.push_back(
E->IsImplicit);
1517 Record.push_back((
unsigned)
E->getReceiverKind());
1518 switch (
E->getReceiverKind()) {
1520 Record.AddStmt(
E->getInstanceReceiver());
1524 Record.AddTypeSourceInfo(
E->getClassReceiverTypeInfo());
1529 Record.AddTypeRef(
E->getSuperType());
1530 Record.AddSourceLocation(
E->getSuperLoc());
1534 if (
E->getMethodDecl()) {
1536 Record.AddDeclRef(
E->getMethodDecl());
1539 Record.AddSelectorRef(
E->getSelector());
1542 Record.AddSourceLocation(
E->getLeftLoc());
1543 Record.AddSourceLocation(
E->getRightLoc());
1546 Arg != ArgEnd; ++Arg)
1550 for (
unsigned i = 0, e =
E->getNumStoredSelLocs(); i != e; ++i)
1551 Record.AddSourceLocation(Locs[i]);
1558 Record.AddStmt(S->getElement());
1559 Record.AddStmt(S->getCollection());
1560 Record.AddStmt(S->getBody());
1561 Record.AddSourceLocation(S->getForLoc());
1562 Record.AddSourceLocation(S->getRParenLoc());
1568 Record.AddStmt(S->getCatchBody());
1569 Record.AddDeclRef(S->getCatchParamDecl());
1570 Record.AddSourceLocation(S->getAtCatchLoc());
1571 Record.AddSourceLocation(S->getRParenLoc());
1577 Record.AddStmt(S->getFinallyBody());
1578 Record.AddSourceLocation(S->getAtFinallyLoc());
1584 Record.AddStmt(S->getSubStmt());
1585 Record.AddSourceLocation(S->getAtLoc());
1591 Record.push_back(S->getNumCatchStmts());
1592 Record.push_back(S->getFinallyStmt() !=
nullptr);
1593 Record.AddStmt(S->getTryBody());
1596 if (S->getFinallyStmt())
1597 Record.AddStmt(S->getFinallyStmt());
1598 Record.AddSourceLocation(S->getAtTryLoc());
1604 Record.AddStmt(S->getSynchExpr());
1605 Record.AddStmt(S->getSynchBody());
1606 Record.AddSourceLocation(S->getAtSynchronizedLoc());
1612 Record.AddStmt(S->getThrowExpr());
1613 Record.AddSourceLocation(S->getThrowLoc());
1619 Record.push_back(
E->getValue());
1620 Record.AddSourceLocation(
E->getLocation());
1627 Record.AddVersionTuple(
E->getVersion());
1635void ASTStmtWriter::VisitCXXCatchStmt(
CXXCatchStmt *S) {
1637 Record.AddSourceLocation(S->getCatchLoc());
1638 Record.AddDeclRef(S->getExceptionDecl());
1639 Record.AddStmt(S->getHandlerBlock());
1643void ASTStmtWriter::VisitCXXTryStmt(
CXXTryStmt *S) {
1645 Record.push_back(S->getNumHandlers());
1646 Record.AddSourceLocation(S->getTryLoc());
1647 Record.AddStmt(S->getTryBlock());
1648 for (
unsigned i = 0, e = S->getNumHandlers(); i != e; ++i)
1649 Record.AddStmt(S->getHandler(i));
1655 Record.AddSourceLocation(S->getForLoc());
1656 Record.AddSourceLocation(S->getCoawaitLoc());
1657 Record.AddSourceLocation(S->getColonLoc());
1658 Record.AddSourceLocation(S->getRParenLoc());
1659 Record.AddStmt(S->getInit());
1660 Record.AddStmt(S->getRangeStmt());
1661 Record.AddStmt(S->getBeginStmt());
1662 Record.AddStmt(S->getEndStmt());
1663 Record.AddStmt(S->getCond());
1664 Record.AddStmt(S->getInc());
1665 Record.AddStmt(S->getLoopVarStmt());
1666 Record.AddStmt(S->getBody());
1672 Record.AddSourceLocation(S->getKeywordLoc());
1673 Record.push_back(S->isIfExists());
1674 Record.AddNestedNameSpecifierLoc(S->getQualifierLoc());
1675 Record.AddDeclarationNameInfo(S->getNameInfo());
1676 Record.AddStmt(S->getSubStmt());
1682 Record.push_back(
E->getOperator());
1683 Record.AddSourceRange(
E->Range);
1685 if (!
E->hasStoredFPFeatures() && !
static_cast<bool>(
E->getADLCallKind()))
1694 if (!
E->hasStoredFPFeatures() && !
static_cast<bool>(
E->getADLCallKind()))
1700void ASTStmtWriter::VisitCXXRewrittenBinaryOperator(
1703 Record.push_back(
E->isReversed());
1704 Record.AddStmt(
E->getSemanticForm());
1711 Record.push_back(
E->getNumArgs());
1712 Record.push_back(
E->isElidable());
1713 Record.push_back(
E->hadMultipleCandidates());
1714 Record.push_back(
E->isListInitialization());
1715 Record.push_back(
E->isStdInitListInitialization());
1716 Record.push_back(
E->requiresZeroInitialization());
1718 llvm::to_underlying(
E->getConstructionKind()));
1719 Record.push_back(
E->isImmediateEscalating());
1720 Record.AddSourceLocation(
E->getLocation());
1721 Record.AddDeclRef(
E->getConstructor());
1722 Record.AddSourceRange(
E->getParenOrBraceRange());
1724 for (
unsigned I = 0, N =
E->getNumArgs(); I != N; ++I)
1732 Record.AddDeclRef(
E->getConstructor());
1733 Record.AddSourceLocation(
E->getLocation());
1734 Record.push_back(
E->constructsVBase());
1735 Record.push_back(
E->inheritedFromVBase());
1740 VisitCXXConstructExpr(
E);
1741 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1745void ASTStmtWriter::VisitLambdaExpr(
LambdaExpr *
E) {
1748 Record.AddSourceRange(
E->IntroducerRange);
1750 Record.AddSourceLocation(
E->CaptureDefaultLoc);
1753 Record.AddSourceLocation(
E->ClosingBrace);
1757 CEnd =
E->capture_init_end();
1770 Record.AddStmt(
E->getSubExpr());
1775 VisitExplicitCastExpr(
E);
1777 CurrentPackingBits.addBit(
E->getAngleBrackets().isValid());
1778 if (
E->getAngleBrackets().isValid())
1779 Record.AddSourceRange(
E->getAngleBrackets());
1783 VisitCXXNamedCastExpr(
E);
1788 VisitCXXNamedCastExpr(
E);
1793 VisitCXXNamedCastExpr(
E);
1798 VisitCXXNamedCastExpr(
E);
1803 VisitCXXNamedCastExpr(
E);
1808 VisitExplicitCastExpr(
E);
1809 Record.AddSourceLocation(
E->getLParenLoc());
1810 Record.AddSourceLocation(
E->getRParenLoc());
1815 VisitExplicitCastExpr(
E);
1823 Record.AddSourceLocation(
E->UDSuffixLoc);
1829 Record.push_back(
E->getValue());
1830 Record.AddSourceLocation(
E->getLocation());
1836 Record.AddSourceLocation(
E->getLocation());
1843 if (
E->isTypeOperand()) {
1844 Record.AddTypeSourceInfo(
E->getTypeOperandSourceInfo());
1847 Record.AddStmt(
E->getExprOperand());
1854 Record.AddSourceLocation(
E->getLocation());
1855 Record.push_back(
E->isImplicit());
1856 Record.push_back(
E->isCapturedByCopyInLambdaWithExplicitObjectParameter());
1863 Record.AddSourceLocation(
E->getThrowLoc());
1864 Record.AddStmt(
E->getSubExpr());
1865 Record.push_back(
E->isThrownVariableInScope());
1871 Record.AddDeclRef(
E->getParam());
1872 Record.AddDeclRef(cast_or_null<Decl>(
E->getUsedContext()));
1873 Record.AddSourceLocation(
E->getUsedLocation());
1874 Record.push_back(
E->hasRewrittenInit());
1875 if (
E->hasRewrittenInit())
1876 Record.AddStmt(
E->getRewrittenExpr());
1882 Record.push_back(
E->hasRewrittenInit());
1883 Record.AddDeclRef(
E->getField());
1884 Record.AddDeclRef(cast_or_null<Decl>(
E->getUsedContext()));
1886 if (
E->hasRewrittenInit())
1887 Record.AddStmt(
E->getRewrittenExpr());
1893 Record.AddCXXTemporary(
E->getTemporary());
1894 Record.AddStmt(
E->getSubExpr());
1900 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1901 Record.AddSourceLocation(
E->getRParenLoc());
1905void ASTStmtWriter::VisitCXXNewExpr(
CXXNewExpr *
E) {
1908 Record.push_back(
E->isArray());
1909 Record.push_back(
E->hasInitializer());
1910 Record.push_back(
E->getNumPlacementArgs());
1911 Record.push_back(
E->isParenTypeId());
1913 Record.push_back(
E->isGlobalNew());
1914 Record.push_back(
E->passAlignment());
1915 Record.push_back(
E->doesUsualArrayDeleteWantSize());
1919 Record.AddDeclRef(
E->getOperatorNew());
1920 Record.AddDeclRef(
E->getOperatorDelete());
1921 Record.AddTypeSourceInfo(
E->getAllocatedTypeSourceInfo());
1922 if (
E->isParenTypeId())
1923 Record.AddSourceRange(
E->getTypeIdParens());
1925 Record.AddSourceRange(
E->getDirectInitRange());
1936 Record.push_back(
E->isGlobalDelete());
1937 Record.push_back(
E->isArrayForm());
1938 Record.push_back(
E->isArrayFormAsWritten());
1939 Record.push_back(
E->doesUsualArrayDeleteWantSize());
1940 Record.AddDeclRef(
E->getOperatorDelete());
1941 Record.AddStmt(
E->getArgument());
1951 Record.push_back(
E->isArrow());
1952 Record.AddSourceLocation(
E->getOperatorLoc());
1953 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
1954 Record.AddTypeSourceInfo(
E->getScopeTypeInfo());
1955 Record.AddSourceLocation(
E->getColonColonLoc());
1956 Record.AddSourceLocation(
E->getTildeLoc());
1959 Record.AddIdentifierRef(
E->getDestroyedTypeIdentifier());
1960 if (
E->getDestroyedTypeIdentifier())
1961 Record.AddSourceLocation(
E->getDestroyedTypeLoc());
1963 Record.AddTypeSourceInfo(
E->getDestroyedTypeInfo());
1970 Record.push_back(
E->getNumObjects());
1971 for (
auto &Obj :
E->getObjects()) {
1972 if (
auto *BD = Obj.dyn_cast<
BlockDecl *>()) {
1981 Record.push_back(
E->cleanupsHaveSideEffects());
1982 Record.AddStmt(
E->getSubExpr());
1986void ASTStmtWriter::VisitCXXDependentScopeMemberExpr(
1992 Record.push_back(
E->getNumTemplateArgs());
1993 CurrentPackingBits.updateBits();
1994 CurrentPackingBits.addBit(
E->hasTemplateKWAndArgsInfo());
1995 CurrentPackingBits.addBit(
E->hasFirstQualifierFoundInScope());
1997 if (
E->hasTemplateKWAndArgsInfo()) {
2004 CurrentPackingBits.addBit(
E->isArrow());
2006 Record.AddTypeRef(
E->getBaseType());
2007 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2008 CurrentPackingBits.addBit(!
E->isImplicitAccess());
2009 if (!
E->isImplicitAccess())
2012 Record.AddSourceLocation(
E->getOperatorLoc());
2014 if (
E->hasFirstQualifierFoundInScope())
2015 Record.AddDeclRef(
E->getFirstQualifierFoundInScope());
2017 Record.AddDeclarationNameInfo(
E->MemberNameInfo);
2027 CurrentPackingBits.addBit(
2039 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2040 Record.AddDeclarationNameInfo(
E->NameInfo);
2047 Record.push_back(
E->getNumArgs());
2049 ArgI =
E->arg_begin(), ArgE =
E->arg_end(); ArgI != ArgE; ++ArgI)
2051 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
2052 Record.AddSourceLocation(
E->getLParenLoc());
2053 Record.AddSourceLocation(
E->getRParenLoc());
2054 Record.push_back(
E->isListInitialization());
2061 Record.push_back(
E->getNumDecls());
2063 CurrentPackingBits.updateBits();
2064 CurrentPackingBits.addBit(
E->hasTemplateKWAndArgsInfo());
2065 if (
E->hasTemplateKWAndArgsInfo()) {
2067 *
E->getTrailingASTTemplateKWAndArgsInfo();
2073 OvE =
E->decls_end();
2074 OvI != OvE; ++OvI) {
2075 Record.AddDeclRef(OvI.getDecl());
2076 Record.push_back(OvI.getAccess());
2079 Record.AddDeclarationNameInfo(
E->getNameInfo());
2080 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2084 VisitOverloadExpr(
E);
2085 CurrentPackingBits.addBit(
E->isArrow());
2086 CurrentPackingBits.addBit(
E->hasUnresolvedUsing());
2087 CurrentPackingBits.addBit(!
E->isImplicitAccess());
2088 if (!
E->isImplicitAccess())
2091 Record.AddSourceLocation(
E->getOperatorLoc());
2093 Record.AddTypeRef(
E->getBaseType());
2098 VisitOverloadExpr(
E);
2099 CurrentPackingBits.addBit(
E->requiresADL());
2100 Record.AddDeclRef(
E->getNamingClass());
2109 if (
Found->isFromASTFile())
2114 for (
auto *NS : ExternalNSs)
2115 for (
auto *
Found : NS->lookup(Name))
2126 for (
unsigned I = 0, N =
E->getNumArgs(); I != N; ++I)
2127 Record.AddTypeSourceInfo(
E->getArg(I));
2133 Record.push_back(
E->getTrait());
2134 Record.push_back(
E->getValue());
2136 Record.AddTypeSourceInfo(
E->getQueriedTypeSourceInfo());
2137 Record.AddStmt(
E->getDimensionExpression());
2143 Record.push_back(
E->getTrait());
2144 Record.push_back(
E->getValue());
2146 Record.AddStmt(
E->getQueriedExpression());
2152 Record.push_back(
E->getValue());
2154 Record.AddStmt(
E->getOperand());
2160 Record.AddSourceLocation(
E->getEllipsisLoc());
2161 Record.push_back(
E->NumExpansions);
2162 Record.AddStmt(
E->getPattern());
2168 Record.push_back(
E->isPartiallySubstituted() ?
E->getPartialArguments().size()
2170 Record.AddSourceLocation(
E->OperatorLoc);
2171 Record.AddSourceLocation(
E->PackLoc);
2172 Record.AddSourceLocation(
E->RParenLoc);
2174 if (
E->isPartiallySubstituted()) {
2175 for (
const auto &TA :
E->getPartialArguments())
2176 Record.AddTemplateArgument(TA);
2178 Record.push_back(
E->getPackLength());
2185 Record.push_back(
E->TransformedExpressions);
2186 Record.push_back(
E->ExpandedToEmptyPack);
2187 Record.AddSourceLocation(
E->getEllipsisLoc());
2188 Record.AddSourceLocation(
E->getRSquareLoc());
2189 Record.AddStmt(
E->getPackIdExpression());
2190 Record.AddStmt(
E->getIndexExpr());
2191 for (
Expr *Sub :
E->getExpressions())
2196void ASTStmtWriter::VisitSubstNonTypeTemplateParmExpr(
2199 Record.AddDeclRef(
E->getAssociatedDecl());
2200 CurrentPackingBits.addBit(
E->isReferenceParameter());
2201 CurrentPackingBits.addBits(
E->getIndex(), 12);
2202 CurrentPackingBits.addBit((
bool)
E->getPackIndex());
2203 if (
auto PackIndex =
E->getPackIndex())
2204 Record.push_back(*PackIndex + 1);
2206 Record.AddSourceLocation(
E->getNameLoc());
2207 Record.AddStmt(
E->getReplacement());
2211void ASTStmtWriter::VisitSubstNonTypeTemplateParmPackExpr(
2214 Record.AddDeclRef(
E->getAssociatedDecl());
2215 Record.push_back(
E->getIndex());
2216 Record.AddTemplateArgument(
E->getArgumentPack());
2217 Record.AddSourceLocation(
E->getParameterPackLocation());
2223 Record.push_back(
E->getNumExpansions());
2224 Record.AddDeclRef(
E->getParameterPack());
2225 Record.AddSourceLocation(
E->getParameterPackLocation());
2234 Record.push_back(
static_cast<bool>(
E->getLifetimeExtendedTemporaryDecl()));
2235 if (
E->getLifetimeExtendedTemporaryDecl())
2236 Record.AddDeclRef(
E->getLifetimeExtendedTemporaryDecl());
2238 Record.AddStmt(
E->getSubExpr());
2244 Record.AddSourceLocation(
E->LParenLoc);
2245 Record.AddSourceLocation(
E->EllipsisLoc);
2246 Record.AddSourceLocation(
E->RParenLoc);
2247 Record.push_back(
E->NumExpansions);
2248 Record.AddStmt(
E->SubExprs[0]);
2249 Record.AddStmt(
E->SubExprs[1]);
2250 Record.AddStmt(
E->SubExprs[2]);
2258 Record.push_back(InitExprs.size());
2259 Record.push_back(
E->getUserSpecifiedInitExprs().size());
2260 Record.AddSourceLocation(
E->getInitLoc());
2263 for (
Expr *InitExpr :
E->getInitExprs())
2264 Record.AddStmt(InitExpr);
2265 Expr *ArrayFiller =
E->getArrayFiller();
2266 FieldDecl *UnionField =
E->getInitializedFieldInUnion();
2267 bool HasArrayFillerOrUnionDecl = ArrayFiller || UnionField;
2268 Record.push_back(HasArrayFillerOrUnionDecl);
2269 if (HasArrayFillerOrUnionDecl) {
2270 Record.push_back(
static_cast<bool>(ArrayFiller));
2272 Record.AddStmt(ArrayFiller);
2274 Record.AddDeclRef(UnionField);
2281 Record.AddStmt(
E->getSourceExpr());
2282 Record.AddSourceLocation(
E->getLocation());
2283 Record.push_back(
E->isUnique());
2287void ASTStmtWriter::VisitTypoExpr(
TypoExpr *
E) {
2290 llvm_unreachable(
"Cannot write TypoExpr nodes");
2299 Record.AddStmt(
E->getConfig());
2306void ASTStmtWriter::VisitAsTypeExpr(
AsTypeExpr *
E) {
2308 Record.AddSourceLocation(
E->getBuiltinLoc());
2309 Record.AddSourceLocation(
E->getRParenLoc());
2310 Record.AddStmt(
E->getSrcExpr());
2319 Record.push_back(
E->isArrow());
2320 Record.AddStmt(
E->getBaseExpr());
2321 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2322 Record.AddSourceLocation(
E->getMemberLoc());
2323 Record.AddDeclRef(
E->getPropertyDecl());
2331 Record.AddSourceLocation(
E->getRBracketLoc());
2338 Record.AddDeclRef(
E->getGuidDecl());
2339 if (
E->isTypeOperand()) {
2340 Record.AddTypeSourceInfo(
E->getTypeOperandSourceInfo());
2343 Record.AddStmt(
E->getExprOperand());
2350 Record.AddSourceLocation(S->getExceptLoc());
2351 Record.AddStmt(S->getFilterExpr());
2352 Record.AddStmt(S->getBlock());
2358 Record.AddSourceLocation(S->getFinallyLoc());
2359 Record.AddStmt(S->getBlock());
2363void ASTStmtWriter::VisitSEHTryStmt(
SEHTryStmt *S) {
2365 Record.push_back(S->getIsCXXTry());
2366 Record.AddSourceLocation(S->getTryLoc());
2367 Record.AddStmt(S->getTryBlock());
2368 Record.AddStmt(S->getHandler());
2372void ASTStmtWriter::VisitSEHLeaveStmt(
SEHLeaveStmt *S) {
2374 Record.AddSourceLocation(S->getLeaveLoc());
2384 for (
Stmt *SubStmt : S->SubStmts)
2390 Record.writeOMPChildren(
E->Data);
2397 Record.writeUInt32(
D->getLoopsNumber());
2398 VisitOMPExecutableDirective(
D);
2402 VisitOMPLoopBasedDirective(
D);
2407 Record.push_back(
D->getNumClauses());
2408 VisitOMPExecutableDirective(
D);
2414 VisitOMPExecutableDirective(
D);
2415 Record.writeBool(
D->hasCancel());
2420 VisitOMPLoopDirective(
D);
2424void ASTStmtWriter::VisitOMPLoopTransformationDirective(
2426 VisitOMPLoopBasedDirective(
D);
2427 Record.writeUInt32(
D->getNumGeneratedLoops());
2431 VisitOMPLoopTransformationDirective(
D);
2436 VisitOMPLoopTransformationDirective(
D);
2441 VisitOMPLoopTransformationDirective(
D);
2446 VisitOMPLoopTransformationDirective(
D);
2451 VisitOMPLoopDirective(
D);
2452 Record.writeBool(
D->hasCancel());
2457 VisitOMPLoopDirective(
D);
2463 VisitOMPExecutableDirective(
D);
2464 Record.writeBool(
D->hasCancel());
2470 VisitOMPExecutableDirective(
D);
2471 Record.writeBool(
D->hasCancel());
2477 VisitOMPExecutableDirective(
D);
2483 VisitOMPExecutableDirective(
D);
2489 VisitOMPExecutableDirective(
D);
2495 VisitOMPExecutableDirective(
D);
2496 Record.AddDeclarationNameInfo(
D->getDirectiveName());
2501 VisitOMPLoopDirective(
D);
2502 Record.writeBool(
D->hasCancel());
2506void ASTStmtWriter::VisitOMPParallelForSimdDirective(
2508 VisitOMPLoopDirective(
D);
2512void ASTStmtWriter::VisitOMPParallelMasterDirective(
2515 VisitOMPExecutableDirective(
D);
2519void ASTStmtWriter::VisitOMPParallelMaskedDirective(
2522 VisitOMPExecutableDirective(
D);
2526void ASTStmtWriter::VisitOMPParallelSectionsDirective(
2529 VisitOMPExecutableDirective(
D);
2530 Record.writeBool(
D->hasCancel());
2536 VisitOMPExecutableDirective(
D);
2537 Record.writeBool(
D->hasCancel());
2543 VisitOMPExecutableDirective(
D);
2544 Record.writeBool(
D->isXLHSInRHSPart());
2545 Record.writeBool(
D->isPostfixUpdate());
2546 Record.writeBool(
D->isFailOnly());
2552 VisitOMPExecutableDirective(
D);
2558 VisitOMPExecutableDirective(
D);
2562void ASTStmtWriter::VisitOMPTargetEnterDataDirective(
2565 VisitOMPExecutableDirective(
D);
2569void ASTStmtWriter::VisitOMPTargetExitDataDirective(
2572 VisitOMPExecutableDirective(
D);
2576void ASTStmtWriter::VisitOMPTargetParallelDirective(
2579 VisitOMPExecutableDirective(
D);
2580 Record.writeBool(
D->hasCancel());
2584void ASTStmtWriter::VisitOMPTargetParallelForDirective(
2586 VisitOMPLoopDirective(
D);
2587 Record.writeBool(
D->hasCancel());
2593 VisitOMPExecutableDirective(
D);
2599 VisitOMPExecutableDirective(
D);
2605 Record.push_back(
D->getNumClauses());
2606 VisitOMPExecutableDirective(
D);
2612 VisitOMPExecutableDirective(
D);
2618 Record.push_back(
D->getNumClauses());
2619 VisitOMPExecutableDirective(
D);
2625 VisitOMPExecutableDirective(
D);
2631 VisitOMPExecutableDirective(
D);
2637 VisitOMPExecutableDirective(
D);
2643 VisitOMPExecutableDirective(
D);
2649 VisitOMPExecutableDirective(
D);
2655 VisitOMPExecutableDirective(
D);
2659void ASTStmtWriter::VisitOMPCancellationPointDirective(
2662 VisitOMPExecutableDirective(
D);
2663 Record.writeEnum(
D->getCancelRegion());
2669 VisitOMPExecutableDirective(
D);
2670 Record.writeEnum(
D->getCancelRegion());
2675 VisitOMPLoopDirective(
D);
2676 Record.writeBool(
D->hasCancel());
2681 VisitOMPLoopDirective(
D);
2685void ASTStmtWriter::VisitOMPMasterTaskLoopDirective(
2687 VisitOMPLoopDirective(
D);
2688 Record.writeBool(
D->hasCancel());
2692void ASTStmtWriter::VisitOMPMaskedTaskLoopDirective(
2694 VisitOMPLoopDirective(
D);
2695 Record.writeBool(
D->hasCancel());
2699void ASTStmtWriter::VisitOMPMasterTaskLoopSimdDirective(
2701 VisitOMPLoopDirective(
D);
2705void ASTStmtWriter::VisitOMPMaskedTaskLoopSimdDirective(
2707 VisitOMPLoopDirective(
D);
2711void ASTStmtWriter::VisitOMPParallelMasterTaskLoopDirective(
2713 VisitOMPLoopDirective(
D);
2714 Record.writeBool(
D->hasCancel());
2718void ASTStmtWriter::VisitOMPParallelMaskedTaskLoopDirective(
2720 VisitOMPLoopDirective(
D);
2721 Record.writeBool(
D->hasCancel());
2725void ASTStmtWriter::VisitOMPParallelMasterTaskLoopSimdDirective(
2727 VisitOMPLoopDirective(
D);
2731void ASTStmtWriter::VisitOMPParallelMaskedTaskLoopSimdDirective(
2733 VisitOMPLoopDirective(
D);
2738 VisitOMPLoopDirective(
D);
2744 VisitOMPExecutableDirective(
D);
2748void ASTStmtWriter::VisitOMPDistributeParallelForDirective(
2750 VisitOMPLoopDirective(
D);
2751 Record.writeBool(
D->hasCancel());
2755void ASTStmtWriter::VisitOMPDistributeParallelForSimdDirective(
2757 VisitOMPLoopDirective(
D);
2761void ASTStmtWriter::VisitOMPDistributeSimdDirective(
2763 VisitOMPLoopDirective(
D);
2767void ASTStmtWriter::VisitOMPTargetParallelForSimdDirective(
2769 VisitOMPLoopDirective(
D);
2774 VisitOMPLoopDirective(
D);
2778void ASTStmtWriter::VisitOMPTeamsDistributeDirective(
2780 VisitOMPLoopDirective(
D);
2784void ASTStmtWriter::VisitOMPTeamsDistributeSimdDirective(
2786 VisitOMPLoopDirective(
D);
2790void ASTStmtWriter::VisitOMPTeamsDistributeParallelForSimdDirective(
2792 VisitOMPLoopDirective(
D);
2796void ASTStmtWriter::VisitOMPTeamsDistributeParallelForDirective(
2798 VisitOMPLoopDirective(
D);
2799 Record.writeBool(
D->hasCancel());
2805 VisitOMPExecutableDirective(
D);
2809void ASTStmtWriter::VisitOMPTargetTeamsDistributeDirective(
2811 VisitOMPLoopDirective(
D);
2815void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForDirective(
2817 VisitOMPLoopDirective(
D);
2818 Record.writeBool(
D->hasCancel());
2822void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
2824 VisitOMPLoopDirective(
D);
2829void ASTStmtWriter::VisitOMPTargetTeamsDistributeSimdDirective(
2831 VisitOMPLoopDirective(
D);
2837 VisitOMPExecutableDirective(
D);
2843 VisitOMPExecutableDirective(
D);
2844 Record.AddSourceLocation(
D->getTargetCallLoc());
2850 VisitOMPExecutableDirective(
D);
2855 VisitOMPLoopDirective(
D);
2859void ASTStmtWriter::VisitOMPTeamsGenericLoopDirective(
2861 VisitOMPLoopDirective(
D);
2865void ASTStmtWriter::VisitOMPTargetTeamsGenericLoopDirective(
2867 VisitOMPLoopDirective(
D);
2868 Record.writeBool(
D->canBeParallelFor());
2872void ASTStmtWriter::VisitOMPParallelGenericLoopDirective(
2874 VisitOMPLoopDirective(
D);
2878void ASTStmtWriter::VisitOMPTargetParallelGenericLoopDirective(
2880 VisitOMPLoopDirective(
D);
2888 Record.push_back(S->clauses().size());
2889 Record.writeEnum(S->Kind);
2890 Record.AddSourceRange(S->Range);
2891 Record.AddSourceLocation(S->DirectiveLoc);
2892 Record.writeOpenACCClauseList(S->clauses());
2895void ASTStmtWriter::VisitOpenACCAssociatedStmtConstruct(
2897 VisitOpenACCConstructStmt(S);
2898 Record.AddStmt(S->getAssociatedStmt());
2903 VisitOpenACCAssociatedStmtConstruct(S);
2909 VisitOpenACCAssociatedStmtConstruct(S);
2918 assert(!SwitchCaseIDs.contains(S) &&
"SwitchCase recorded twice");
2919 unsigned NextID = SwitchCaseIDs.size();
2920 SwitchCaseIDs[S] = NextID;
2925 assert(SwitchCaseIDs.contains(S) &&
"SwitchCase hasn't been seen yet");
2926 return SwitchCaseIDs[S];
2930 SwitchCaseIDs.clear();
2935void ASTWriter::WriteSubStmt(
Stmt *S) {
2945 llvm::DenseMap<Stmt *, uint64_t>::iterator I = SubStmtEntries.find(S);
2946 if (I != SubStmtEntries.end()) {
2947 Record.push_back(I->second);
2953 assert(!ParentStmts.count(S) &&
"There is a Stmt cycle!");
2955 struct ParentStmtInserterRAII {
2957 llvm::DenseSet<Stmt *> &ParentStmts;
2959 ParentStmtInserterRAII(
Stmt *S, llvm::DenseSet<Stmt *> &ParentStmts)
2960 : S(S), ParentStmts(ParentStmts) {
2961 ParentStmts.insert(S);
2963 ~ParentStmtInserterRAII() {
2964 ParentStmts.erase(S);
2968 ParentStmtInserterRAII ParentStmtInserter(S, ParentStmts);
2974 SubStmtEntries[S] = Offset;
2979void ASTRecordWriter::FlushStmts() {
2982 assert(Writer->SubStmtEntries.empty() &&
"unexpected entries in sub-stmt map");
2983 assert(Writer->ParentStmts.empty() &&
"unexpected entries in parent stmt map");
2985 for (
unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
2986 Writer->WriteSubStmt(StmtsToEmit[I]);
2988 assert(N == StmtsToEmit.size() &&
"record modified while being written!");
2995 Writer->SubStmtEntries.clear();
2996 Writer->ParentStmts.clear();
2999 StmtsToEmit.clear();
3002void ASTRecordWriter::FlushSubStmts() {
3006 for (
unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
3007 Writer->WriteSubStmt(StmtsToEmit[N - I - 1]);
3008 assert(N == StmtsToEmit.size() &&
"record modified while being written!");
3011 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 *.