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;
97 Code(serialization::STMT_NULL_PTR), AbbrevToUse(0),
98 CurrentPackingBits(this->
Record) {}
104 CurrentPackingBits.writeBits();
106 "unhandled sub-statement writing AST file");
107 return Record.EmitStmt(Code, AbbrevToUse);
114#define STMT(Type, Base) \
115 void Visit##Type(Type *);
116#include "clang/AST/StmtNodes.inc"
126 Record.AddTemplateArgumentLoc(Args[i]);
132void ASTStmtWriter::VisitNullStmt(
NullStmt *S) {
134 Record.AddSourceLocation(S->getSemiLoc());
135 Record.push_back(S->NullStmtBits.HasLeadingEmptyMacro);
142 Record.push_back(S->size());
143 Record.push_back(S->hasStoredFPFeatures());
145 for (
auto *CS : S->body())
147 if (S->hasStoredFPFeatures())
148 Record.push_back(S->getStoredFPFeatures().getAsOpaqueInt());
149 Record.AddSourceLocation(S->getLBracLoc());
150 Record.AddSourceLocation(S->getRBracLoc());
152 if (!S->hasStoredFPFeatures())
158void ASTStmtWriter::VisitSwitchCase(
SwitchCase *S) {
161 Record.AddSourceLocation(S->getKeywordLoc());
162 Record.AddSourceLocation(S->getColonLoc());
165void ASTStmtWriter::VisitCaseStmt(
CaseStmt *S) {
167 Record.push_back(S->caseStmtIsGNURange());
168 Record.AddStmt(S->getLHS());
169 Record.AddStmt(S->getSubStmt());
170 if (S->caseStmtIsGNURange()) {
171 Record.AddStmt(S->getRHS());
172 Record.AddSourceLocation(S->getEllipsisLoc());
177void ASTStmtWriter::VisitDefaultStmt(
DefaultStmt *S) {
179 Record.AddStmt(S->getSubStmt());
183void ASTStmtWriter::VisitLabelStmt(
LabelStmt *S) {
185 Record.push_back(S->isSideEntry());
186 Record.AddDeclRef(S->getDecl());
187 Record.AddStmt(S->getSubStmt());
188 Record.AddSourceLocation(S->getIdentLoc());
194 Record.push_back(S->getAttrs().size());
195 Record.AddAttributes(S->getAttrs());
196 Record.AddStmt(S->getSubStmt());
201void ASTStmtWriter::VisitIfStmt(
IfStmt *S) {
204 bool HasElse = S->getElse() !=
nullptr;
205 bool HasVar = S->getConditionVariableDeclStmt() !=
nullptr;
206 bool HasInit = S->getInit() !=
nullptr;
208 CurrentPackingBits.updateBits();
210 CurrentPackingBits.addBit(HasElse);
211 CurrentPackingBits.addBit(HasVar);
212 CurrentPackingBits.addBit(HasInit);
214 Record.AddStmt(S->getCond());
215 Record.AddStmt(S->getThen());
217 Record.AddStmt(S->getElse());
219 Record.AddStmt(S->getConditionVariableDeclStmt());
221 Record.AddStmt(S->getInit());
223 Record.AddSourceLocation(S->getIfLoc());
224 Record.AddSourceLocation(S->getLParenLoc());
225 Record.AddSourceLocation(S->getRParenLoc());
227 Record.AddSourceLocation(S->getElseLoc());
232void ASTStmtWriter::VisitSwitchStmt(
SwitchStmt *S) {
235 bool HasInit = S->getInit() !=
nullptr;
236 bool HasVar = S->getConditionVariableDeclStmt() !=
nullptr;
237 Record.push_back(HasInit);
239 Record.push_back(S->isAllEnumCasesCovered());
241 Record.AddStmt(S->getCond());
242 Record.AddStmt(S->getBody());
244 Record.AddStmt(S->getInit());
246 Record.AddStmt(S->getConditionVariableDeclStmt());
248 Record.AddSourceLocation(S->getSwitchLoc());
249 Record.AddSourceLocation(S->getLParenLoc());
250 Record.AddSourceLocation(S->getRParenLoc());
252 for (
SwitchCase *SC = S->getSwitchCaseList(); SC;
253 SC = SC->getNextSwitchCase())
258void ASTStmtWriter::VisitWhileStmt(
WhileStmt *S) {
261 bool HasVar = S->getConditionVariableDeclStmt() !=
nullptr;
264 Record.AddStmt(S->getCond());
265 Record.AddStmt(S->getBody());
267 Record.AddStmt(S->getConditionVariableDeclStmt());
269 Record.AddSourceLocation(S->getWhileLoc());
270 Record.AddSourceLocation(S->getLParenLoc());
271 Record.AddSourceLocation(S->getRParenLoc());
275void ASTStmtWriter::VisitDoStmt(
DoStmt *S) {
277 Record.AddStmt(S->getCond());
278 Record.AddStmt(S->getBody());
279 Record.AddSourceLocation(S->getDoLoc());
280 Record.AddSourceLocation(S->getWhileLoc());
281 Record.AddSourceLocation(S->getRParenLoc());
285void ASTStmtWriter::VisitForStmt(
ForStmt *S) {
287 Record.AddStmt(S->getInit());
288 Record.AddStmt(S->getCond());
289 Record.AddStmt(S->getConditionVariableDeclStmt());
290 Record.AddStmt(S->getInc());
291 Record.AddStmt(S->getBody());
292 Record.AddSourceLocation(S->getForLoc());
293 Record.AddSourceLocation(S->getLParenLoc());
294 Record.AddSourceLocation(S->getRParenLoc());
298void ASTStmtWriter::VisitGotoStmt(
GotoStmt *S) {
300 Record.AddDeclRef(S->getLabel());
301 Record.AddSourceLocation(S->getGotoLoc());
302 Record.AddSourceLocation(S->getLabelLoc());
308 Record.AddSourceLocation(S->getGotoLoc());
309 Record.AddSourceLocation(S->getStarLoc());
310 Record.AddStmt(S->getTarget());
316 Record.AddSourceLocation(S->getContinueLoc());
320void ASTStmtWriter::VisitBreakStmt(
BreakStmt *S) {
322 Record.AddSourceLocation(S->getBreakLoc());
326void ASTStmtWriter::VisitReturnStmt(
ReturnStmt *S) {
329 bool HasNRVOCandidate = S->getNRVOCandidate() !=
nullptr;
330 Record.push_back(HasNRVOCandidate);
332 Record.AddStmt(S->getRetValue());
333 if (HasNRVOCandidate)
334 Record.AddDeclRef(S->getNRVOCandidate());
336 Record.AddSourceLocation(S->getReturnLoc());
340void ASTStmtWriter::VisitDeclStmt(
DeclStmt *S) {
342 Record.AddSourceLocation(S->getBeginLoc());
343 Record.AddSourceLocation(S->getEndLoc());
350void ASTStmtWriter::VisitAsmStmt(
AsmStmt *S) {
352 Record.push_back(S->getNumOutputs());
353 Record.push_back(S->getNumInputs());
354 Record.push_back(S->getNumClobbers());
355 Record.AddSourceLocation(S->getAsmLoc());
356 Record.push_back(S->isVolatile());
357 Record.push_back(S->isSimple());
360void ASTStmtWriter::VisitGCCAsmStmt(
GCCAsmStmt *S) {
362 Record.push_back(S->getNumLabels());
363 Record.AddSourceLocation(S->getRParenLoc());
364 Record.AddStmt(S->getAsmString());
367 for (
unsigned I = 0, N = S->getNumOutputs(); I != N; ++I) {
368 Record.AddIdentifierRef(S->getOutputIdentifier(I));
369 Record.AddStmt(S->getOutputConstraintLiteral(I));
370 Record.AddStmt(S->getOutputExpr(I));
374 for (
unsigned I = 0, N = S->getNumInputs(); I != N; ++I) {
375 Record.AddIdentifierRef(S->getInputIdentifier(I));
376 Record.AddStmt(S->getInputConstraintLiteral(I));
377 Record.AddStmt(S->getInputExpr(I));
381 for (
unsigned I = 0, N = S->getNumClobbers(); I != N; ++I)
382 Record.AddStmt(S->getClobberStringLiteral(I));
385 for (
unsigned I = 0, N = S->getNumLabels(); I != N; ++I) {
386 Record.AddIdentifierRef(S->getLabelIdentifier(I));
387 Record.AddStmt(S->getLabelExpr(I));
393void ASTStmtWriter::VisitMSAsmStmt(
MSAsmStmt *S) {
395 Record.AddSourceLocation(S->getLBraceLoc());
396 Record.AddSourceLocation(S->getEndLoc());
397 Record.push_back(S->getNumAsmToks());
398 Record.AddString(S->getAsmString());
401 for (
unsigned I = 0, N = S->getNumAsmToks(); I != N; ++I) {
407 for (
unsigned I = 0, N = S->getNumClobbers(); I != N; ++I) {
408 Record.AddString(S->getClobber(I));
412 for (
unsigned I = 0, N = S->getNumOutputs(); I != N; ++I) {
413 Record.AddStmt(S->getOutputExpr(I));
414 Record.AddString(S->getOutputConstraint(I));
418 for (
unsigned I = 0, N = S->getNumInputs(); I != N; ++I) {
419 Record.AddStmt(S->getInputExpr(I));
420 Record.AddString(S->getInputConstraint(I));
436 Record.AddSourceLocation(S->getKeywordLoc());
437 Record.AddStmt(S->getOperand());
438 Record.AddStmt(S->getPromiseCall());
439 Record.push_back(S->isImplicit());
445 Record.AddSourceLocation(
E->getKeywordLoc());
448 Record.AddStmt(
E->getOpaqueValue());
452 VisitCoroutineSuspendExpr(
E);
453 Record.push_back(
E->isImplicit());
458 VisitCoroutineSuspendExpr(
E);
464 Record.AddSourceLocation(
E->getKeywordLoc());
477 for (
const auto &DetailRecord : Satisfaction) {
478 auto *
E = DetailRecord.dyn_cast<
Expr *>();
479 Record.push_back(
E ==
nullptr);
483 auto *
Diag = cast<std::pair<SourceLocation, StringRef> *>(DetailRecord);
495 Record.AddString(
D->SubstitutedEntity);
496 Record.AddSourceLocation(
D->DiagLoc);
497 Record.AddString(
D->DiagMessage);
500void ASTStmtWriter::VisitConceptSpecializationExpr(
503 Record.AddDeclRef(
E->getSpecializationDecl());
505 Record.push_back(CR !=
nullptr);
507 Record.AddConceptReference(CR);
516 Record.push_back(
E->getLocalParameters().size());
517 Record.push_back(
E->getRequirements().size());
520 Record.AddDeclRef(
E->getBody());
524 if (
auto *TypeReq = dyn_cast<concepts::TypeRequirement>(R)) {
526 Record.push_back(TypeReq->Status);
530 Record.AddTypeSourceInfo(TypeReq->getType());
531 }
else if (
auto *ExprReq = dyn_cast<concepts::ExprRequirement>(R)) {
532 Record.push_back(ExprReq->getKind());
533 Record.push_back(ExprReq->Status);
534 if (ExprReq->isExprSubstitutionFailure()) {
536 Record, cast<concepts::Requirement::SubstitutionDiagnostic *>(
539 Record.AddStmt(cast<Expr *>(ExprReq->Value));
541 Record.AddSourceLocation(ExprReq->NoexceptLoc);
542 const auto &RetReq = ExprReq->getReturnTypeRequirement();
543 if (RetReq.isSubstitutionFailure()) {
546 }
else if (RetReq.isTypeConstraint()) {
548 Record.AddTemplateParameterList(
549 RetReq.getTypeConstraintTemplateParameterList());
550 if (ExprReq->Status >=
553 ExprReq->getReturnTypeRequirementSubstitutedConstraintExpr());
555 assert(RetReq.isEmpty());
560 auto *NestedReq = cast<concepts::NestedRequirement>(R);
562 Record.push_back(NestedReq->hasInvalidConstraint());
563 if (NestedReq->hasInvalidConstraint()) {
564 Record.AddString(NestedReq->getInvalidConstraintEntity());
567 Record.AddStmt(NestedReq->getConstraintExpr());
568 if (!NestedReq->isDependent())
573 Record.AddSourceLocation(
E->getLParenLoc());
574 Record.AddSourceLocation(
E->getRParenLoc());
584 Record.push_back(std::distance(S->capture_begin(), S->capture_end()));
587 Record.AddDeclRef(S->getCapturedDecl());
588 Record.push_back(S->getCapturedRegionKind());
590 Record.AddDeclRef(S->getCapturedRecordDecl());
593 for (
auto *I : S->capture_inits())
597 Record.AddStmt(S->getCapturedStmt());
600 for (
const auto &I : S->captures()) {
601 if (I.capturesThis() || I.capturesVariableArrayType())
602 Record.AddDeclRef(
nullptr);
604 Record.AddDeclRef(I.getCapturedVar());
605 Record.push_back(I.getCaptureKind());
606 Record.AddSourceLocation(I.getLocation());
612void ASTStmtWriter::VisitExpr(
Expr *
E) {
615 CurrentPackingBits.updateBits();
633 switch (
E->getResultStorageKind()) {
637 Record.push_back(
E->Int64Result());
640 Record.AddAPValue(
E->APValueResult());
644 Record.AddStmt(
E->getSubExpr());
650 Record.AddSourceLocation(
E->getLocation());
657 Record.AddSourceLocation(
E->getLocation());
658 Record.AddSourceLocation(
E->getLParenLocation());
659 Record.AddSourceLocation(
E->getRParenLocation());
660 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
668 bool HasFunctionName =
E->getFunctionName() !=
nullptr;
669 Record.push_back(HasFunctionName);
671 llvm::to_underlying(
E->getIdentKind()));
672 Record.push_back(
E->isTransparent());
673 Record.AddSourceLocation(
E->getLocation());
675 Record.AddStmt(
E->getFunctionName());
682 CurrentPackingBits.updateBits();
684 CurrentPackingBits.addBit(
E->hadMultipleCandidates());
685 CurrentPackingBits.addBit(
E->refersToEnclosingVariableOrCapture());
686 CurrentPackingBits.addBits(
E->isNonOdrUse(), 2);
687 CurrentPackingBits.addBit(
E->isImmediateEscalating());
688 CurrentPackingBits.addBit(
E->getDecl() !=
E->getFoundDecl());
689 CurrentPackingBits.addBit(
E->hasQualifier());
690 CurrentPackingBits.addBit(
E->hasTemplateKWAndArgsInfo());
692 if (
E->hasTemplateKWAndArgsInfo()) {
693 unsigned NumTemplateArgs =
E->getNumTemplateArgs();
694 Record.push_back(NumTemplateArgs);
699 if ((!
E->hasTemplateKWAndArgsInfo()) && (!
E->hasQualifier()) &&
700 (
E->getDecl() ==
E->getFoundDecl()) &&
705 if (
E->hasQualifier())
706 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
708 if (
E->getDecl() !=
E->getFoundDecl())
709 Record.AddDeclRef(
E->getFoundDecl());
711 if (
E->hasTemplateKWAndArgsInfo())
715 Record.AddDeclRef(
E->getDecl());
716 Record.AddSourceLocation(
E->getLocation());
717 Record.AddDeclarationNameLoc(
E->DNLoc,
E->getDecl()->getDeclName());
723 Record.AddSourceLocation(
E->getLocation());
724 Record.AddAPInt(
E->getValue());
726 if (
E->getValue().getBitWidth() == 32) {
735 Record.AddSourceLocation(
E->getLocation());
736 Record.push_back(
E->getScale());
737 Record.AddAPInt(
E->getValue());
743 Record.push_back(
E->getRawSemantics());
744 Record.push_back(
E->isExact());
745 Record.AddAPFloat(
E->getValue());
746 Record.AddSourceLocation(
E->getLocation());
752 Record.AddStmt(
E->getSubExpr());
760 Record.push_back(
E->getNumConcatenated());
761 Record.push_back(
E->getLength());
762 Record.push_back(
E->getCharByteWidth());
763 Record.push_back(llvm::to_underlying(
E->getKind()));
764 Record.push_back(
E->isPascal());
767 for (
unsigned I = 0, N =
E->getNumConcatenated(); I != N; ++I)
768 Record.AddSourceLocation(
E->getStrTokenLoc(I));
771 StringRef StrData =
E->getBytes();
772 for (
unsigned I = 0, N =
E->getByteLength(); I != N; ++I)
773 Record.push_back(StrData[I]);
780 Record.push_back(
E->getValue());
781 Record.AddSourceLocation(
E->getLocation());
782 Record.push_back(llvm::to_underlying(
E->getKind()));
789void ASTStmtWriter::VisitParenExpr(
ParenExpr *
E) {
791 Record.push_back(
E->isProducedByFoldExpansion());
792 Record.AddSourceLocation(
E->getLParen());
793 Record.AddSourceLocation(
E->getRParen());
794 Record.AddStmt(
E->getSubExpr());
800 Record.push_back(
E->getNumExprs());
801 for (
auto *SubStmt :
E->exprs())
803 Record.AddSourceLocation(
E->getLParenLoc());
804 Record.AddSourceLocation(
E->getRParenLoc());
810 bool HasFPFeatures =
E->hasStoredFPFeatures();
813 CurrentPackingBits.addBit(HasFPFeatures);
814 Record.AddStmt(
E->getSubExpr());
815 CurrentPackingBits.addBits(
E->getOpcode(),
817 Record.AddSourceLocation(
E->getOperatorLoc());
818 CurrentPackingBits.addBit(
E->canOverflow());
821 Record.push_back(
E->getStoredFPFeatures().getAsOpaqueInt());
827 Record.push_back(
E->getNumComponents());
828 Record.push_back(
E->getNumExpressions());
829 Record.AddSourceLocation(
E->getOperatorLoc());
830 Record.AddSourceLocation(
E->getRParenLoc());
831 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
832 for (
unsigned I = 0, N =
E->getNumComponents(); I != N; ++I) {
855 for (
unsigned I = 0, N =
E->getNumExpressions(); I != N; ++I)
856 Record.AddStmt(
E->getIndexExpr(I));
862 Record.push_back(
E->getKind());
863 if (
E->isArgumentType())
864 Record.AddTypeSourceInfo(
E->getArgumentTypeInfo());
867 Record.AddStmt(
E->getArgumentExpr());
869 Record.AddSourceLocation(
E->getOperatorLoc());
870 Record.AddSourceLocation(
E->getRParenLoc());
878 Record.AddSourceLocation(
E->getRBracketLoc());
885 Record.AddStmt(
E->getRowIdx());
886 Record.AddStmt(
E->getColumnIdx());
887 Record.AddSourceLocation(
E->getRBracketLoc());
895 Record.AddStmt(
E->getLowerBound());
896 Record.AddStmt(
E->getLength());
897 if (
E->isOMPArraySection())
898 Record.AddStmt(
E->getStride());
899 Record.AddSourceLocation(
E->getColonLocFirst());
901 if (
E->isOMPArraySection())
902 Record.AddSourceLocation(
E->getColonLocSecond());
904 Record.AddSourceLocation(
E->getRBracketLoc());
910 Record.push_back(
E->getDimensions().size());
912 for (
Expr *
Dim :
E->getDimensions())
915 Record.AddSourceRange(SR);
916 Record.AddSourceLocation(
E->getLParenLoc());
917 Record.AddSourceLocation(
E->getRParenLoc());
923 Record.push_back(
E->numOfIterators());
924 Record.AddSourceLocation(
E->getIteratorKwLoc());
925 Record.AddSourceLocation(
E->getLParenLoc());
926 Record.AddSourceLocation(
E->getRParenLoc());
927 for (
unsigned I = 0, End =
E->numOfIterators(); I < End; ++I) {
928 Record.AddDeclRef(
E->getIteratorDecl(I));
929 Record.AddSourceLocation(
E->getAssignLoc(I));
934 Record.AddSourceLocation(
E->getColonLoc(I));
936 Record.AddSourceLocation(
E->getSecondColonLoc(I));
947void ASTStmtWriter::VisitCallExpr(
CallExpr *
E) {
950 Record.push_back(
E->getNumArgs());
951 CurrentPackingBits.updateBits();
952 CurrentPackingBits.addBit(
static_cast<bool>(
E->getADLCallKind()));
953 CurrentPackingBits.addBit(
E->hasStoredFPFeatures());
955 Record.AddSourceLocation(
E->getRParenLoc());
956 Record.AddStmt(
E->getCallee());
958 Arg != ArgEnd; ++Arg)
961 if (
E->hasStoredFPFeatures())
962 Record.push_back(
E->getFPFeatures().getAsOpaqueInt());
964 if (!
E->hasStoredFPFeatures() && !
static_cast<bool>(
E->getADLCallKind()) &&
981void ASTStmtWriter::VisitMemberExpr(
MemberExpr *
E) {
984 bool HasQualifier =
E->hasQualifier();
985 bool HasFoundDecl =
E->hasFoundDecl();
986 bool HasTemplateInfo =
E->hasTemplateKWAndArgsInfo();
987 unsigned NumTemplateArgs =
E->getNumTemplateArgs();
991 CurrentPackingBits.updateBits();
992 CurrentPackingBits.addBit(HasQualifier);
993 CurrentPackingBits.addBit(HasFoundDecl);
994 CurrentPackingBits.addBit(HasTemplateInfo);
995 Record.push_back(NumTemplateArgs);
998 Record.AddDeclRef(
E->getMemberDecl());
999 Record.AddDeclarationNameLoc(
E->MemberDNLoc,
1000 E->getMemberDecl()->getDeclName());
1001 Record.AddSourceLocation(
E->getMemberLoc());
1002 CurrentPackingBits.addBit(
E->isArrow());
1003 CurrentPackingBits.addBit(
E->hadMultipleCandidates());
1004 CurrentPackingBits.addBits(
E->isNonOdrUse(), 2);
1005 Record.AddSourceLocation(
E->getOperatorLoc());
1008 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
1012 Record.AddDeclRef(FoundDecl.getDecl());
1013 CurrentPackingBits.addBits(FoundDecl.
getAccess(), 2);
1016 if (HasTemplateInfo)
1026 Record.AddSourceLocation(
E->getIsaMemberLoc());
1027 Record.AddSourceLocation(
E->getOpLoc());
1028 Record.push_back(
E->isArrow());
1035 Record.AddStmt(
E->getSubExpr());
1036 Record.push_back(
E->shouldCopy());
1041 VisitExplicitCastExpr(
E);
1042 Record.AddSourceLocation(
E->getLParenLoc());
1043 Record.AddSourceLocation(
E->getBridgeKeywordLoc());
1044 Record.push_back(
E->getBridgeKind());
1048void ASTStmtWriter::VisitCastExpr(
CastExpr *
E) {
1051 Record.push_back(
E->path_size());
1052 CurrentPackingBits.updateBits();
1054 CurrentPackingBits.addBits(
E->getCastKind(), 7);
1055 CurrentPackingBits.addBit(
E->hasStoredFPFeatures());
1056 Record.AddStmt(
E->getSubExpr());
1059 PI =
E->path_begin(), PE =
E->path_end(); PI != PE; ++PI)
1060 Record.AddCXXBaseSpecifier(**PI);
1062 if (
E->hasStoredFPFeatures())
1063 Record.push_back(
E->getFPFeatures().getAsOpaqueInt());
1071 CurrentPackingBits.updateBits();
1072 CurrentPackingBits.addBits(
E->getOpcode(), 6);
1073 bool HasFPFeatures =
E->hasStoredFPFeatures();
1074 CurrentPackingBits.addBit(HasFPFeatures);
1075 CurrentPackingBits.addBit(
E->hasExcludedOverflowPattern());
1078 Record.AddSourceLocation(
E->getOperatorLoc());
1080 Record.push_back(
E->getStoredFPFeatures().getAsOpaqueInt());
1090 VisitBinaryOperator(
E);
1091 Record.AddTypeRef(
E->getComputationLHSType());
1092 Record.AddTypeRef(
E->getComputationResultType());
1106 Record.AddSourceLocation(
E->getQuestionLoc());
1107 Record.AddSourceLocation(
E->getColonLoc());
1114 Record.AddStmt(
E->getOpaqueValue());
1115 Record.AddStmt(
E->getCommon());
1117 Record.AddStmt(
E->getTrueExpr());
1118 Record.AddStmt(
E->getFalseExpr());
1119 Record.AddSourceLocation(
E->getQuestionLoc());
1120 Record.AddSourceLocation(
E->getColonLoc());
1126 CurrentPackingBits.addBit(
E->isPartOfExplicitCast());
1128 if (
E->path_size() == 0 && !
E->hasStoredFPFeatures())
1136 Record.AddTypeSourceInfo(
E->getTypeInfoAsWritten());
1140 VisitExplicitCastExpr(
E);
1141 Record.AddSourceLocation(
E->getLParenLoc());
1142 Record.AddSourceLocation(
E->getRParenLoc());
1148 Record.AddSourceLocation(
E->getLParenLoc());
1149 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1150 Record.AddStmt(
E->getInitializer());
1151 Record.push_back(
E->isFileScope());
1158 Record.AddIdentifierRef(&
E->getAccessor());
1159 Record.AddSourceLocation(
E->getAccessorLoc());
1167 Record.AddStmt(
E->getSyntacticForm());
1168 Record.AddSourceLocation(
E->getLBraceLoc());
1169 Record.AddSourceLocation(
E->getRBraceLoc());
1170 bool isArrayFiller = isa<Expr *>(
E->ArrayFillerOrUnionFieldInit);
1171 Record.push_back(isArrayFiller);
1173 Record.AddStmt(
E->getArrayFiller());
1175 Record.AddDeclRef(
E->getInitializedFieldInUnion());
1176 Record.push_back(
E->hadArrayRangeDesignator());
1177 Record.push_back(
E->getNumInits());
1178 if (isArrayFiller) {
1181 Expr *filler =
E->getArrayFiller();
1182 for (
unsigned I = 0, N =
E->getNumInits(); I != N; ++I)
1183 Record.AddStmt(
E->getInit(I) != filler ?
E->getInit(I) :
nullptr);
1185 for (
unsigned I = 0, N =
E->getNumInits(); I != N; ++I)
1186 Record.AddStmt(
E->getInit(I));
1193 Record.push_back(
E->getNumSubExprs());
1194 for (
unsigned I = 0, N =
E->getNumSubExprs(); I != N; ++I)
1195 Record.AddStmt(
E->getSubExpr(I));
1196 Record.AddSourceLocation(
E->getEqualOrColonLoc());
1197 Record.push_back(
E->usesGNUSyntax());
1199 if (
D.isFieldDesignator()) {
1202 Record.AddDeclRef(Field);
1205 Record.AddIdentifierRef(
D.getFieldName());
1207 Record.AddSourceLocation(
D.getDotLoc());
1208 Record.AddSourceLocation(
D.getFieldLoc());
1209 }
else if (
D.isArrayDesignator()) {
1211 Record.push_back(
D.getArrayIndex());
1212 Record.AddSourceLocation(
D.getLBracketLoc());
1213 Record.AddSourceLocation(
D.getRBracketLoc());
1215 assert(
D.isArrayRangeDesignator() &&
"Unknown designator");
1217 Record.push_back(
D.getArrayIndex());
1218 Record.AddSourceLocation(
D.getLBracketLoc());
1219 Record.AddSourceLocation(
D.getEllipsisLoc());
1220 Record.AddSourceLocation(
D.getRBracketLoc());
1229 Record.AddStmt(
E->getUpdater());
1233void ASTStmtWriter::VisitNoInitExpr(
NoInitExpr *
E) {
1240 Record.AddStmt(
E->SubExprs[0]);
1241 Record.AddStmt(
E->SubExprs[1]);
1255void ASTStmtWriter::VisitVAArgExpr(
VAArgExpr *
E) {
1257 Record.AddStmt(
E->getSubExpr());
1258 Record.AddTypeSourceInfo(
E->getWrittenTypeInfo());
1259 Record.AddSourceLocation(
E->getBuiltinLoc());
1260 Record.AddSourceLocation(
E->getRParenLoc());
1261 Record.push_back(
E->isMicrosoftABI());
1267 Record.AddDeclRef(cast_or_null<Decl>(
E->getParentContext()));
1270 Record.push_back(llvm::to_underlying(
E->getIdentKind()));
1274void ASTStmtWriter::VisitEmbedExpr(
EmbedExpr *
E) {
1278 Record.AddStmt(
E->getDataStringLiteral());
1279 Record.writeUInt32(
E->getStartingElementPos());
1280 Record.writeUInt32(
E->getDataElementCount());
1286 Record.AddSourceLocation(
E->getAmpAmpLoc());
1287 Record.AddSourceLocation(
E->getLabelLoc());
1288 Record.AddDeclRef(
E->getLabel());
1292void ASTStmtWriter::VisitStmtExpr(
StmtExpr *
E) {
1294 Record.AddStmt(
E->getSubStmt());
1295 Record.AddSourceLocation(
E->getLParenLoc());
1296 Record.AddSourceLocation(
E->getRParenLoc());
1297 Record.push_back(
E->getTemplateDepth());
1301void ASTStmtWriter::VisitChooseExpr(
ChooseExpr *
E) {
1306 Record.AddSourceLocation(
E->getBuiltinLoc());
1307 Record.AddSourceLocation(
E->getRParenLoc());
1308 Record.push_back(
E->isConditionDependent() ?
false :
E->isConditionTrue());
1314 Record.AddSourceLocation(
E->getTokenLocation());
1320 Record.push_back(
E->getNumSubExprs());
1321 for (
unsigned I = 0, N =
E->getNumSubExprs(); I != N; ++I)
1322 Record.AddStmt(
E->getExpr(I));
1323 Record.AddSourceLocation(
E->getBuiltinLoc());
1324 Record.AddSourceLocation(
E->getRParenLoc());
1330 Record.AddSourceLocation(
E->getBuiltinLoc());
1331 Record.AddSourceLocation(
E->getRParenLoc());
1332 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1333 Record.AddStmt(
E->getSrcExpr());
1337void ASTStmtWriter::VisitBlockExpr(
BlockExpr *
E) {
1339 Record.AddDeclRef(
E->getBlockDecl());
1346 Record.push_back(
E->getNumAssocs());
1347 Record.push_back(
E->isExprPredicate());
1348 Record.push_back(
E->ResultIndex);
1349 Record.AddSourceLocation(
E->getGenericLoc());
1350 Record.AddSourceLocation(
E->getDefaultLoc());
1351 Record.AddSourceLocation(
E->getRParenLoc());
1353 Stmt **Stmts =
E->getTrailingObjects<
Stmt *>();
1357 for (
unsigned I = 0, N =
E->getNumAssocs() + 1; I < N; ++I)
1358 Record.AddStmt(Stmts[I]);
1361 for (
unsigned I = 0, N =
E->getNumAssocs(); I < N; ++I)
1362 Record.AddTypeSourceInfo(TSIs[I]);
1369 Record.push_back(
E->getNumSemanticExprs());
1373 unsigned result =
E->getResultExprIndex();
1375 Record.push_back(result);
1377 Record.AddStmt(
E->getSyntacticForm());
1379 i =
E->semantics_begin(), e =
E->semantics_end(); i != e; ++i) {
1385void ASTStmtWriter::VisitAtomicExpr(
AtomicExpr *
E) {
1388 for (
unsigned I = 0, N =
E->getNumSubExprs(); I != N; ++I)
1389 Record.AddStmt(
E->getSubExprs()[I]);
1390 Record.AddSourceLocation(
E->getBuiltinLoc());
1391 Record.AddSourceLocation(
E->getRParenLoc());
1401 Record.AddStmt(
E->getString());
1402 Record.AddSourceLocation(
E->getAtLoc());
1408 Record.AddStmt(
E->getSubExpr());
1409 Record.AddDeclRef(
E->getBoxingMethod());
1416 Record.push_back(
E->getNumElements());
1417 for (
unsigned i = 0; i <
E->getNumElements(); i++)
1418 Record.AddStmt(
E->getElement(i));
1419 Record.AddDeclRef(
E->getArrayWithObjectsMethod());
1426 Record.push_back(
E->getNumElements());
1427 Record.push_back(
E->HasPackExpansions);
1428 for (
unsigned i = 0; i <
E->getNumElements(); i++) {
1430 Record.AddStmt(Element.Key);
1431 Record.AddStmt(Element.Value);
1432 if (
E->HasPackExpansions) {
1433 Record.AddSourceLocation(Element.EllipsisLoc);
1434 unsigned NumExpansions = 0;
1435 if (Element.NumExpansions)
1436 NumExpansions = *Element.NumExpansions + 1;
1437 Record.push_back(NumExpansions);
1441 Record.AddDeclRef(
E->getDictWithObjectsMethod());
1448 Record.AddTypeSourceInfo(
E->getEncodedTypeSourceInfo());
1449 Record.AddSourceLocation(
E->getAtLoc());
1450 Record.AddSourceLocation(
E->getRParenLoc());
1456 Record.AddSelectorRef(
E->getSelector());
1457 Record.AddSourceLocation(
E->getAtLoc());
1458 Record.AddSourceLocation(
E->getRParenLoc());
1464 Record.AddDeclRef(
E->getProtocol());
1465 Record.AddSourceLocation(
E->getAtLoc());
1466 Record.AddSourceLocation(
E->ProtoLoc);
1467 Record.AddSourceLocation(
E->getRParenLoc());
1473 Record.AddDeclRef(
E->getDecl());
1474 Record.AddSourceLocation(
E->getLocation());
1475 Record.AddSourceLocation(
E->getOpLoc());
1477 Record.push_back(
E->isArrow());
1478 Record.push_back(
E->isFreeIvar());
1484 Record.push_back(
E->SetterAndMethodRefFlags.getInt());
1485 Record.push_back(
E->isImplicitProperty());
1486 if (
E->isImplicitProperty()) {
1487 Record.AddDeclRef(
E->getImplicitPropertyGetter());
1488 Record.AddDeclRef(
E->getImplicitPropertySetter());
1490 Record.AddDeclRef(
E->getExplicitProperty());
1492 Record.AddSourceLocation(
E->getLocation());
1493 Record.AddSourceLocation(
E->getReceiverLocation());
1494 if (
E->isObjectReceiver()) {
1497 }
else if (
E->isSuperReceiver()) {
1499 Record.AddTypeRef(
E->getSuperReceiverType());
1502 Record.AddDeclRef(
E->getClassReceiver());
1510 Record.AddSourceLocation(
E->getRBracket());
1511 Record.AddStmt(
E->getBaseExpr());
1512 Record.AddStmt(
E->getKeyExpr());
1513 Record.AddDeclRef(
E->getAtIndexMethodDecl());
1514 Record.AddDeclRef(
E->setAtIndexMethodDecl());
1521 Record.push_back(
E->getNumArgs());
1522 Record.push_back(
E->getNumStoredSelLocs());
1523 Record.push_back(
E->SelLocsKind);
1524 Record.push_back(
E->isDelegateInitCall());
1525 Record.push_back(
E->IsImplicit);
1526 Record.push_back((
unsigned)
E->getReceiverKind());
1527 switch (
E->getReceiverKind()) {
1529 Record.AddStmt(
E->getInstanceReceiver());
1533 Record.AddTypeSourceInfo(
E->getClassReceiverTypeInfo());
1538 Record.AddTypeRef(
E->getSuperType());
1539 Record.AddSourceLocation(
E->getSuperLoc());
1543 if (
E->getMethodDecl()) {
1545 Record.AddDeclRef(
E->getMethodDecl());
1548 Record.AddSelectorRef(
E->getSelector());
1551 Record.AddSourceLocation(
E->getLeftLoc());
1552 Record.AddSourceLocation(
E->getRightLoc());
1555 Arg != ArgEnd; ++Arg)
1559 for (
unsigned i = 0, e =
E->getNumStoredSelLocs(); i != e; ++i)
1560 Record.AddSourceLocation(Locs[i]);
1567 Record.AddStmt(S->getElement());
1568 Record.AddStmt(S->getCollection());
1569 Record.AddStmt(S->getBody());
1570 Record.AddSourceLocation(S->getForLoc());
1571 Record.AddSourceLocation(S->getRParenLoc());
1577 Record.AddStmt(S->getCatchBody());
1578 Record.AddDeclRef(S->getCatchParamDecl());
1579 Record.AddSourceLocation(S->getAtCatchLoc());
1580 Record.AddSourceLocation(S->getRParenLoc());
1586 Record.AddStmt(S->getFinallyBody());
1587 Record.AddSourceLocation(S->getAtFinallyLoc());
1593 Record.AddStmt(S->getSubStmt());
1594 Record.AddSourceLocation(S->getAtLoc());
1600 Record.push_back(S->getNumCatchStmts());
1601 Record.push_back(S->getFinallyStmt() !=
nullptr);
1602 Record.AddStmt(S->getTryBody());
1605 if (S->getFinallyStmt())
1606 Record.AddStmt(S->getFinallyStmt());
1607 Record.AddSourceLocation(S->getAtTryLoc());
1613 Record.AddStmt(S->getSynchExpr());
1614 Record.AddStmt(S->getSynchBody());
1615 Record.AddSourceLocation(S->getAtSynchronizedLoc());
1621 Record.AddStmt(S->getThrowExpr());
1622 Record.AddSourceLocation(S->getThrowLoc());
1628 Record.push_back(
E->getValue());
1629 Record.AddSourceLocation(
E->getLocation());
1636 Record.AddVersionTuple(
E->getVersion());
1644void ASTStmtWriter::VisitCXXCatchStmt(
CXXCatchStmt *S) {
1646 Record.AddSourceLocation(S->getCatchLoc());
1647 Record.AddDeclRef(S->getExceptionDecl());
1648 Record.AddStmt(S->getHandlerBlock());
1652void ASTStmtWriter::VisitCXXTryStmt(
CXXTryStmt *S) {
1654 Record.push_back(S->getNumHandlers());
1655 Record.AddSourceLocation(S->getTryLoc());
1656 Record.AddStmt(S->getTryBlock());
1657 for (
unsigned i = 0, e = S->getNumHandlers(); i != e; ++i)
1658 Record.AddStmt(S->getHandler(i));
1664 Record.AddSourceLocation(S->getForLoc());
1665 Record.AddSourceLocation(S->getCoawaitLoc());
1666 Record.AddSourceLocation(S->getColonLoc());
1667 Record.AddSourceLocation(S->getRParenLoc());
1668 Record.AddStmt(S->getInit());
1669 Record.AddStmt(S->getRangeStmt());
1670 Record.AddStmt(S->getBeginStmt());
1671 Record.AddStmt(S->getEndStmt());
1672 Record.AddStmt(S->getCond());
1673 Record.AddStmt(S->getInc());
1674 Record.AddStmt(S->getLoopVarStmt());
1675 Record.AddStmt(S->getBody());
1681 Record.AddSourceLocation(S->getKeywordLoc());
1682 Record.push_back(S->isIfExists());
1683 Record.AddNestedNameSpecifierLoc(S->getQualifierLoc());
1684 Record.AddDeclarationNameInfo(S->getNameInfo());
1685 Record.AddStmt(S->getSubStmt());
1691 Record.push_back(
E->getOperator());
1692 Record.AddSourceRange(
E->Range);
1694 if (!
E->hasStoredFPFeatures() && !
static_cast<bool>(
E->getADLCallKind()))
1703 if (!
E->hasStoredFPFeatures() && !
static_cast<bool>(
E->getADLCallKind()))
1709void ASTStmtWriter::VisitCXXRewrittenBinaryOperator(
1712 Record.push_back(
E->isReversed());
1713 Record.AddStmt(
E->getSemanticForm());
1720 Record.push_back(
E->getNumArgs());
1721 Record.push_back(
E->isElidable());
1722 Record.push_back(
E->hadMultipleCandidates());
1723 Record.push_back(
E->isListInitialization());
1724 Record.push_back(
E->isStdInitListInitialization());
1725 Record.push_back(
E->requiresZeroInitialization());
1727 llvm::to_underlying(
E->getConstructionKind()));
1728 Record.push_back(
E->isImmediateEscalating());
1729 Record.AddSourceLocation(
E->getLocation());
1730 Record.AddDeclRef(
E->getConstructor());
1731 Record.AddSourceRange(
E->getParenOrBraceRange());
1733 for (
unsigned I = 0, N =
E->getNumArgs(); I != N; ++I)
1741 Record.AddDeclRef(
E->getConstructor());
1742 Record.AddSourceLocation(
E->getLocation());
1743 Record.push_back(
E->constructsVBase());
1744 Record.push_back(
E->inheritedFromVBase());
1749 VisitCXXConstructExpr(
E);
1750 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1754void ASTStmtWriter::VisitLambdaExpr(
LambdaExpr *
E) {
1757 Record.AddSourceRange(
E->IntroducerRange);
1759 Record.AddSourceLocation(
E->CaptureDefaultLoc);
1762 Record.AddSourceLocation(
E->ClosingBrace);
1766 CEnd =
E->capture_init_end();
1779 Record.AddStmt(
E->getSubExpr());
1784 VisitExplicitCastExpr(
E);
1786 CurrentPackingBits.addBit(
E->getAngleBrackets().isValid());
1787 if (
E->getAngleBrackets().isValid())
1788 Record.AddSourceRange(
E->getAngleBrackets());
1792 VisitCXXNamedCastExpr(
E);
1797 VisitCXXNamedCastExpr(
E);
1802 VisitCXXNamedCastExpr(
E);
1807 VisitCXXNamedCastExpr(
E);
1812 VisitCXXNamedCastExpr(
E);
1817 VisitExplicitCastExpr(
E);
1818 Record.AddSourceLocation(
E->getLParenLoc());
1819 Record.AddSourceLocation(
E->getRParenLoc());
1824 VisitExplicitCastExpr(
E);
1832 Record.AddSourceLocation(
E->UDSuffixLoc);
1838 Record.push_back(
E->getValue());
1839 Record.AddSourceLocation(
E->getLocation());
1845 Record.AddSourceLocation(
E->getLocation());
1852 if (
E->isTypeOperand()) {
1853 Record.AddTypeSourceInfo(
E->getTypeOperandSourceInfo());
1856 Record.AddStmt(
E->getExprOperand());
1863 Record.AddSourceLocation(
E->getLocation());
1864 Record.push_back(
E->isImplicit());
1865 Record.push_back(
E->isCapturedByCopyInLambdaWithExplicitObjectParameter());
1872 Record.AddSourceLocation(
E->getThrowLoc());
1873 Record.AddStmt(
E->getSubExpr());
1874 Record.push_back(
E->isThrownVariableInScope());
1880 Record.AddDeclRef(
E->getParam());
1881 Record.AddDeclRef(cast_or_null<Decl>(
E->getUsedContext()));
1882 Record.AddSourceLocation(
E->getUsedLocation());
1883 Record.push_back(
E->hasRewrittenInit());
1884 if (
E->hasRewrittenInit())
1885 Record.AddStmt(
E->getRewrittenExpr());
1891 Record.push_back(
E->hasRewrittenInit());
1892 Record.AddDeclRef(
E->getField());
1893 Record.AddDeclRef(cast_or_null<Decl>(
E->getUsedContext()));
1895 if (
E->hasRewrittenInit())
1896 Record.AddStmt(
E->getRewrittenExpr());
1902 Record.AddCXXTemporary(
E->getTemporary());
1903 Record.AddStmt(
E->getSubExpr());
1909 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1910 Record.AddSourceLocation(
E->getRParenLoc());
1914void ASTStmtWriter::VisitCXXNewExpr(
CXXNewExpr *
E) {
1917 Record.push_back(
E->isArray());
1918 Record.push_back(
E->hasInitializer());
1919 Record.push_back(
E->getNumPlacementArgs());
1920 Record.push_back(
E->isParenTypeId());
1922 Record.push_back(
E->isGlobalNew());
1923 Record.push_back(
E->passAlignment());
1924 Record.push_back(
E->doesUsualArrayDeleteWantSize());
1928 Record.AddDeclRef(
E->getOperatorNew());
1929 Record.AddDeclRef(
E->getOperatorDelete());
1930 Record.AddTypeSourceInfo(
E->getAllocatedTypeSourceInfo());
1931 if (
E->isParenTypeId())
1932 Record.AddSourceRange(
E->getTypeIdParens());
1934 Record.AddSourceRange(
E->getDirectInitRange());
1945 Record.push_back(
E->isGlobalDelete());
1946 Record.push_back(
E->isArrayForm());
1947 Record.push_back(
E->isArrayFormAsWritten());
1948 Record.push_back(
E->doesUsualArrayDeleteWantSize());
1949 Record.AddDeclRef(
E->getOperatorDelete());
1950 Record.AddStmt(
E->getArgument());
1960 Record.push_back(
E->isArrow());
1961 Record.AddSourceLocation(
E->getOperatorLoc());
1962 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
1963 Record.AddTypeSourceInfo(
E->getScopeTypeInfo());
1964 Record.AddSourceLocation(
E->getColonColonLoc());
1965 Record.AddSourceLocation(
E->getTildeLoc());
1968 Record.AddIdentifierRef(
E->getDestroyedTypeIdentifier());
1969 if (
E->getDestroyedTypeIdentifier())
1970 Record.AddSourceLocation(
E->getDestroyedTypeLoc());
1972 Record.AddTypeSourceInfo(
E->getDestroyedTypeInfo());
1979 Record.push_back(
E->getNumObjects());
1980 for (
auto &Obj :
E->getObjects()) {
1981 if (
auto *BD = Obj.dyn_cast<
BlockDecl *>()) {
1990 Record.push_back(
E->cleanupsHaveSideEffects());
1991 Record.AddStmt(
E->getSubExpr());
1995void ASTStmtWriter::VisitCXXDependentScopeMemberExpr(
2001 Record.push_back(
E->getNumTemplateArgs());
2002 CurrentPackingBits.updateBits();
2003 CurrentPackingBits.addBit(
E->hasTemplateKWAndArgsInfo());
2004 CurrentPackingBits.addBit(
E->hasFirstQualifierFoundInScope());
2006 if (
E->hasTemplateKWAndArgsInfo()) {
2013 CurrentPackingBits.addBit(
E->isArrow());
2015 Record.AddTypeRef(
E->getBaseType());
2016 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2017 CurrentPackingBits.addBit(!
E->isImplicitAccess());
2018 if (!
E->isImplicitAccess())
2021 Record.AddSourceLocation(
E->getOperatorLoc());
2023 if (
E->hasFirstQualifierFoundInScope())
2024 Record.AddDeclRef(
E->getFirstQualifierFoundInScope());
2026 Record.AddDeclarationNameInfo(
E->MemberNameInfo);
2036 CurrentPackingBits.addBit(
2048 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2049 Record.AddDeclarationNameInfo(
E->NameInfo);
2056 Record.push_back(
E->getNumArgs());
2058 ArgI =
E->arg_begin(), ArgE =
E->arg_end(); ArgI != ArgE; ++ArgI)
2060 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
2061 Record.AddSourceLocation(
E->getLParenLoc());
2062 Record.AddSourceLocation(
E->getRParenLoc());
2063 Record.push_back(
E->isListInitialization());
2070 Record.push_back(
E->getNumDecls());
2072 CurrentPackingBits.updateBits();
2073 CurrentPackingBits.addBit(
E->hasTemplateKWAndArgsInfo());
2074 if (
E->hasTemplateKWAndArgsInfo()) {
2076 *
E->getTrailingASTTemplateKWAndArgsInfo();
2082 OvE =
E->decls_end();
2083 OvI != OvE; ++OvI) {
2084 Record.AddDeclRef(OvI.getDecl());
2085 Record.push_back(OvI.getAccess());
2088 Record.AddDeclarationNameInfo(
E->getNameInfo());
2089 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2093 VisitOverloadExpr(
E);
2094 CurrentPackingBits.addBit(
E->isArrow());
2095 CurrentPackingBits.addBit(
E->hasUnresolvedUsing());
2096 CurrentPackingBits.addBit(!
E->isImplicitAccess());
2097 if (!
E->isImplicitAccess())
2100 Record.AddSourceLocation(
E->getOperatorLoc());
2102 Record.AddTypeRef(
E->getBaseType());
2107 VisitOverloadExpr(
E);
2108 CurrentPackingBits.addBit(
E->requiresADL());
2109 Record.AddDeclRef(
E->getNamingClass());
2117 Record.getASTContext().getTranslationUnitDecl()->lookup(Name))
2118 if (
Found->isFromASTFile())
2123 for (
auto *NS : ExternalNSs)
2124 for (
auto *
Found : NS->lookup(Name))
2135 for (
unsigned I = 0, N =
E->getNumArgs(); I != N; ++I)
2136 Record.AddTypeSourceInfo(
E->getArg(I));
2142 Record.push_back(
E->getTrait());
2143 Record.push_back(
E->getValue());
2145 Record.AddTypeSourceInfo(
E->getQueriedTypeSourceInfo());
2146 Record.AddStmt(
E->getDimensionExpression());
2152 Record.push_back(
E->getTrait());
2153 Record.push_back(
E->getValue());
2155 Record.AddStmt(
E->getQueriedExpression());
2161 Record.push_back(
E->getValue());
2163 Record.AddStmt(
E->getOperand());
2169 Record.AddSourceLocation(
E->getEllipsisLoc());
2170 Record.push_back(
E->NumExpansions);
2171 Record.AddStmt(
E->getPattern());
2177 Record.push_back(
E->isPartiallySubstituted() ?
E->getPartialArguments().size()
2179 Record.AddSourceLocation(
E->OperatorLoc);
2180 Record.AddSourceLocation(
E->PackLoc);
2181 Record.AddSourceLocation(
E->RParenLoc);
2183 if (
E->isPartiallySubstituted()) {
2184 for (
const auto &TA :
E->getPartialArguments())
2185 Record.AddTemplateArgument(TA);
2187 Record.push_back(
E->getPackLength());
2194 Record.push_back(
E->TransformedExpressions);
2195 Record.push_back(
E->FullySubstituted);
2196 Record.AddSourceLocation(
E->getEllipsisLoc());
2197 Record.AddSourceLocation(
E->getRSquareLoc());
2198 Record.AddStmt(
E->getPackIdExpression());
2199 Record.AddStmt(
E->getIndexExpr());
2200 for (
Expr *Sub :
E->getExpressions())
2205void ASTStmtWriter::VisitSubstNonTypeTemplateParmExpr(
2208 Record.AddDeclRef(
E->getAssociatedDecl());
2209 CurrentPackingBits.addBit(
E->isReferenceParameter());
2210 CurrentPackingBits.addBits(
E->getIndex(), 12);
2211 CurrentPackingBits.addBit((
bool)
E->getPackIndex());
2212 if (
auto PackIndex =
E->getPackIndex())
2213 Record.push_back(*PackIndex + 1);
2215 Record.AddSourceLocation(
E->getNameLoc());
2216 Record.AddStmt(
E->getReplacement());
2220void ASTStmtWriter::VisitSubstNonTypeTemplateParmPackExpr(
2223 Record.AddDeclRef(
E->getAssociatedDecl());
2224 Record.push_back(
E->getIndex());
2225 Record.AddTemplateArgument(
E->getArgumentPack());
2226 Record.AddSourceLocation(
E->getParameterPackLocation());
2232 Record.push_back(
E->getNumExpansions());
2233 Record.AddDeclRef(
E->getParameterPack());
2234 Record.AddSourceLocation(
E->getParameterPackLocation());
2243 Record.push_back(
static_cast<bool>(
E->getLifetimeExtendedTemporaryDecl()));
2244 if (
E->getLifetimeExtendedTemporaryDecl())
2245 Record.AddDeclRef(
E->getLifetimeExtendedTemporaryDecl());
2247 Record.AddStmt(
E->getSubExpr());
2253 Record.AddSourceLocation(
E->LParenLoc);
2254 Record.AddSourceLocation(
E->EllipsisLoc);
2255 Record.AddSourceLocation(
E->RParenLoc);
2256 Record.push_back(
E->NumExpansions);
2257 Record.AddStmt(
E->SubExprs[0]);
2258 Record.AddStmt(
E->SubExprs[1]);
2259 Record.AddStmt(
E->SubExprs[2]);
2267 Record.push_back(InitExprs.size());
2268 Record.push_back(
E->getUserSpecifiedInitExprs().size());
2269 Record.AddSourceLocation(
E->getInitLoc());
2272 for (
Expr *InitExpr :
E->getInitExprs())
2273 Record.AddStmt(InitExpr);
2274 Expr *ArrayFiller =
E->getArrayFiller();
2275 FieldDecl *UnionField =
E->getInitializedFieldInUnion();
2276 bool HasArrayFillerOrUnionDecl = ArrayFiller || UnionField;
2277 Record.push_back(HasArrayFillerOrUnionDecl);
2278 if (HasArrayFillerOrUnionDecl) {
2279 Record.push_back(
static_cast<bool>(ArrayFiller));
2281 Record.AddStmt(ArrayFiller);
2283 Record.AddDeclRef(UnionField);
2290 Record.AddStmt(
E->getSourceExpr());
2291 Record.AddSourceLocation(
E->getLocation());
2292 Record.push_back(
E->isUnique());
2296void ASTStmtWriter::VisitTypoExpr(
TypoExpr *
E) {
2299 llvm_unreachable(
"Cannot write TypoExpr nodes");
2308 Record.AddStmt(
E->getConfig());
2315void ASTStmtWriter::VisitAsTypeExpr(
AsTypeExpr *
E) {
2317 Record.AddSourceLocation(
E->getBuiltinLoc());
2318 Record.AddSourceLocation(
E->getRParenLoc());
2319 Record.AddStmt(
E->getSrcExpr());
2328 Record.push_back(
E->isArrow());
2329 Record.AddStmt(
E->getBaseExpr());
2330 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2331 Record.AddSourceLocation(
E->getMemberLoc());
2332 Record.AddDeclRef(
E->getPropertyDecl());
2340 Record.AddSourceLocation(
E->getRBracketLoc());
2347 Record.AddDeclRef(
E->getGuidDecl());
2348 if (
E->isTypeOperand()) {
2349 Record.AddTypeSourceInfo(
E->getTypeOperandSourceInfo());
2352 Record.AddStmt(
E->getExprOperand());
2359 Record.AddSourceLocation(S->getExceptLoc());
2360 Record.AddStmt(S->getFilterExpr());
2361 Record.AddStmt(S->getBlock());
2367 Record.AddSourceLocation(S->getFinallyLoc());
2368 Record.AddStmt(S->getBlock());
2372void ASTStmtWriter::VisitSEHTryStmt(
SEHTryStmt *S) {
2374 Record.push_back(S->getIsCXXTry());
2375 Record.AddSourceLocation(S->getTryLoc());
2376 Record.AddStmt(S->getTryBlock());
2377 Record.AddStmt(S->getHandler());
2381void ASTStmtWriter::VisitSEHLeaveStmt(
SEHLeaveStmt *S) {
2383 Record.AddSourceLocation(S->getLeaveLoc());
2393 for (
Stmt *SubStmt : S->SubStmts)
2399 Record.writeOMPChildren(
E->Data);
2406 Record.writeUInt32(
D->getLoopsNumber());
2407 VisitOMPExecutableDirective(
D);
2411 VisitOMPLoopBasedDirective(
D);
2416 Record.push_back(
D->getNumClauses());
2417 VisitOMPExecutableDirective(
D);
2423 VisitOMPExecutableDirective(
D);
2424 Record.writeBool(
D->hasCancel());
2429 VisitOMPLoopDirective(
D);
2433void ASTStmtWriter::VisitOMPLoopTransformationDirective(
2435 VisitOMPLoopBasedDirective(
D);
2436 Record.writeUInt32(
D->getNumGeneratedLoops());
2440 VisitOMPLoopTransformationDirective(
D);
2445 VisitOMPLoopTransformationDirective(
D);
2450 VisitOMPLoopTransformationDirective(
D);
2455 VisitOMPLoopTransformationDirective(
D);
2460 VisitOMPLoopDirective(
D);
2461 Record.writeBool(
D->hasCancel());
2466 VisitOMPLoopDirective(
D);
2472 VisitOMPExecutableDirective(
D);
2473 Record.writeBool(
D->hasCancel());
2479 VisitOMPExecutableDirective(
D);
2480 Record.writeBool(
D->hasCancel());
2486 VisitOMPExecutableDirective(
D);
2492 VisitOMPExecutableDirective(
D);
2498 VisitOMPExecutableDirective(
D);
2504 VisitOMPExecutableDirective(
D);
2505 Record.AddDeclarationNameInfo(
D->getDirectiveName());
2510 VisitOMPLoopDirective(
D);
2511 Record.writeBool(
D->hasCancel());
2515void ASTStmtWriter::VisitOMPParallelForSimdDirective(
2517 VisitOMPLoopDirective(
D);
2521void ASTStmtWriter::VisitOMPParallelMasterDirective(
2524 VisitOMPExecutableDirective(
D);
2528void ASTStmtWriter::VisitOMPParallelMaskedDirective(
2531 VisitOMPExecutableDirective(
D);
2535void ASTStmtWriter::VisitOMPParallelSectionsDirective(
2538 VisitOMPExecutableDirective(
D);
2539 Record.writeBool(
D->hasCancel());
2545 VisitOMPExecutableDirective(
D);
2546 Record.writeBool(
D->hasCancel());
2552 VisitOMPExecutableDirective(
D);
2553 Record.writeBool(
D->isXLHSInRHSPart());
2554 Record.writeBool(
D->isPostfixUpdate());
2555 Record.writeBool(
D->isFailOnly());
2561 VisitOMPExecutableDirective(
D);
2567 VisitOMPExecutableDirective(
D);
2571void ASTStmtWriter::VisitOMPTargetEnterDataDirective(
2574 VisitOMPExecutableDirective(
D);
2578void ASTStmtWriter::VisitOMPTargetExitDataDirective(
2581 VisitOMPExecutableDirective(
D);
2585void ASTStmtWriter::VisitOMPTargetParallelDirective(
2588 VisitOMPExecutableDirective(
D);
2589 Record.writeBool(
D->hasCancel());
2593void ASTStmtWriter::VisitOMPTargetParallelForDirective(
2595 VisitOMPLoopDirective(
D);
2596 Record.writeBool(
D->hasCancel());
2602 VisitOMPExecutableDirective(
D);
2608 VisitOMPExecutableDirective(
D);
2614 Record.push_back(
D->getNumClauses());
2615 VisitOMPExecutableDirective(
D);
2621 VisitOMPExecutableDirective(
D);
2627 Record.push_back(
D->getNumClauses());
2628 VisitOMPExecutableDirective(
D);
2634 VisitOMPExecutableDirective(
D);
2640 VisitOMPExecutableDirective(
D);
2646 VisitOMPExecutableDirective(
D);
2652 VisitOMPExecutableDirective(
D);
2658 VisitOMPExecutableDirective(
D);
2664 VisitOMPExecutableDirective(
D);
2668void ASTStmtWriter::VisitOMPCancellationPointDirective(
2671 VisitOMPExecutableDirective(
D);
2672 Record.writeEnum(
D->getCancelRegion());
2678 VisitOMPExecutableDirective(
D);
2679 Record.writeEnum(
D->getCancelRegion());
2684 VisitOMPLoopDirective(
D);
2685 Record.writeBool(
D->hasCancel());
2690 VisitOMPLoopDirective(
D);
2694void ASTStmtWriter::VisitOMPMasterTaskLoopDirective(
2696 VisitOMPLoopDirective(
D);
2697 Record.writeBool(
D->hasCancel());
2701void ASTStmtWriter::VisitOMPMaskedTaskLoopDirective(
2703 VisitOMPLoopDirective(
D);
2704 Record.writeBool(
D->hasCancel());
2708void ASTStmtWriter::VisitOMPMasterTaskLoopSimdDirective(
2710 VisitOMPLoopDirective(
D);
2714void ASTStmtWriter::VisitOMPMaskedTaskLoopSimdDirective(
2716 VisitOMPLoopDirective(
D);
2720void ASTStmtWriter::VisitOMPParallelMasterTaskLoopDirective(
2722 VisitOMPLoopDirective(
D);
2723 Record.writeBool(
D->hasCancel());
2727void ASTStmtWriter::VisitOMPParallelMaskedTaskLoopDirective(
2729 VisitOMPLoopDirective(
D);
2730 Record.writeBool(
D->hasCancel());
2734void ASTStmtWriter::VisitOMPParallelMasterTaskLoopSimdDirective(
2736 VisitOMPLoopDirective(
D);
2740void ASTStmtWriter::VisitOMPParallelMaskedTaskLoopSimdDirective(
2742 VisitOMPLoopDirective(
D);
2747 VisitOMPLoopDirective(
D);
2753 VisitOMPExecutableDirective(
D);
2757void ASTStmtWriter::VisitOMPDistributeParallelForDirective(
2759 VisitOMPLoopDirective(
D);
2760 Record.writeBool(
D->hasCancel());
2764void ASTStmtWriter::VisitOMPDistributeParallelForSimdDirective(
2766 VisitOMPLoopDirective(
D);
2770void ASTStmtWriter::VisitOMPDistributeSimdDirective(
2772 VisitOMPLoopDirective(
D);
2776void ASTStmtWriter::VisitOMPTargetParallelForSimdDirective(
2778 VisitOMPLoopDirective(
D);
2783 VisitOMPLoopDirective(
D);
2787void ASTStmtWriter::VisitOMPTeamsDistributeDirective(
2789 VisitOMPLoopDirective(
D);
2793void ASTStmtWriter::VisitOMPTeamsDistributeSimdDirective(
2795 VisitOMPLoopDirective(
D);
2799void ASTStmtWriter::VisitOMPTeamsDistributeParallelForSimdDirective(
2801 VisitOMPLoopDirective(
D);
2805void ASTStmtWriter::VisitOMPTeamsDistributeParallelForDirective(
2807 VisitOMPLoopDirective(
D);
2808 Record.writeBool(
D->hasCancel());
2814 VisitOMPExecutableDirective(
D);
2818void ASTStmtWriter::VisitOMPTargetTeamsDistributeDirective(
2820 VisitOMPLoopDirective(
D);
2824void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForDirective(
2826 VisitOMPLoopDirective(
D);
2827 Record.writeBool(
D->hasCancel());
2831void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
2833 VisitOMPLoopDirective(
D);
2838void ASTStmtWriter::VisitOMPTargetTeamsDistributeSimdDirective(
2840 VisitOMPLoopDirective(
D);
2846 VisitOMPExecutableDirective(
D);
2852 VisitOMPExecutableDirective(
D);
2853 Record.AddSourceLocation(
D->getTargetCallLoc());
2859 VisitOMPExecutableDirective(
D);
2864 VisitOMPLoopDirective(
D);
2868void ASTStmtWriter::VisitOMPTeamsGenericLoopDirective(
2870 VisitOMPLoopDirective(
D);
2874void ASTStmtWriter::VisitOMPTargetTeamsGenericLoopDirective(
2876 VisitOMPLoopDirective(
D);
2877 Record.writeBool(
D->canBeParallelFor());
2881void ASTStmtWriter::VisitOMPParallelGenericLoopDirective(
2883 VisitOMPLoopDirective(
D);
2887void ASTStmtWriter::VisitOMPTargetParallelGenericLoopDirective(
2889 VisitOMPLoopDirective(
D);
2897 Record.push_back(S->clauses().size());
2898 Record.writeEnum(S->Kind);
2899 Record.AddSourceRange(S->Range);
2900 Record.AddSourceLocation(S->DirectiveLoc);
2901 Record.writeOpenACCClauseList(S->clauses());
2904void ASTStmtWriter::VisitOpenACCAssociatedStmtConstruct(
2906 VisitOpenACCConstructStmt(S);
2907 Record.AddStmt(S->getAssociatedStmt());
2912 VisitOpenACCAssociatedStmtConstruct(S);
2918 VisitOpenACCAssociatedStmtConstruct(S);
2919 Record.writeEnum(S->getParentComputeConstructKind());
2925 VisitOpenACCAssociatedStmtConstruct(S);
2931 VisitOpenACCAssociatedStmtConstruct(S);
2935void ASTStmtWriter::VisitOpenACCEnterDataConstruct(
2938 VisitOpenACCConstructStmt(S);
2944 VisitOpenACCConstructStmt(S);
2950 VisitOpenACCConstructStmt(S);
2956 VisitOpenACCConstructStmt(S);
2962 VisitOpenACCAssociatedStmtConstruct(S);
2968 Record.push_back(S->getExprs().size());
2969 VisitOpenACCConstructStmt(S);
2970 Record.AddSourceLocation(S->LParenLoc);
2971 Record.AddSourceLocation(S->RParenLoc);
2972 Record.AddSourceLocation(S->QueuesLoc);
2974 for(
Expr *
E : S->getExprs())
2986 Record.AddStmt(S->getOpaqueArgLValue());
2987 Record.AddStmt(S->getCastedTemporary());
2988 Record.AddStmt(S->getWritebackCast());
2989 Record.writeBool(S->isInOut());
2998 assert(!SwitchCaseIDs.contains(S) &&
"SwitchCase recorded twice");
2999 unsigned NextID = SwitchCaseIDs.size();
3000 SwitchCaseIDs[S] = NextID;
3005 assert(SwitchCaseIDs.contains(S) &&
"SwitchCase hasn't been seen yet");
3006 return SwitchCaseIDs[S];
3010 SwitchCaseIDs.clear();
3025 llvm::DenseMap<Stmt *, uint64_t>::iterator I = SubStmtEntries.find(S);
3026 if (I != SubStmtEntries.end()) {
3027 Record.push_back(I->second);
3033 assert(!ParentStmts.count(S) &&
"There is a Stmt cycle!");
3035 struct ParentStmtInserterRAII {
3037 llvm::DenseSet<Stmt *> &ParentStmts;
3039 ParentStmtInserterRAII(
Stmt *S, llvm::DenseSet<Stmt *> &ParentStmts)
3040 : S(S), ParentStmts(ParentStmts) {
3041 ParentStmts.insert(S);
3043 ~ParentStmtInserterRAII() {
3044 ParentStmts.erase(S);
3048 ParentStmtInserterRAII ParentStmtInserter(S, ParentStmts);
3054 SubStmtEntries[S] = Offset;
3059void ASTRecordWriter::FlushStmts() {
3062 assert(Writer->SubStmtEntries.empty() &&
"unexpected entries in sub-stmt map");
3063 assert(Writer->ParentStmts.empty() &&
"unexpected entries in parent stmt map");
3065 for (
unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
3066 Writer->WriteSubStmt(getASTContext(), StmtsToEmit[I]);
3068 assert(N == StmtsToEmit.size() &&
"record modified while being written!");
3075 Writer->SubStmtEntries.clear();
3076 Writer->ParentStmts.clear();
3079 StmtsToEmit.clear();
3082void ASTRecordWriter::FlushSubStmts() {
3086 for (
unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
3087 Writer->WriteSubStmt(getASTContext(), StmtsToEmit[N - I - 1]);
3088 assert(N == StmtsToEmit.size() &&
"record modified while being written!");
3091 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
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
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(ASTContext &Context, 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.
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 an rvalue of a non-class type T.
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.
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.
This class represents temporary values used to represent inout and out arguments in HLSL.
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 expression type represents an asterisk in an OpenACC Size-Expr, used in the 'tile' and 'gang' cl...
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
@ STMT_OPENACC_COMBINED_CONSTRUCT
@ EXPR_DESIGNATED_INIT
A DesignatedInitExpr record.
@ EXPR_COMPOUND_LITERAL
A CompoundLiteralExpr record.
@ STMT_OMP_ASSUME_DIRECTIVE
@ STMT_OPENACC_HOST_DATA_CONSTRUCT
@ STMT_OMP_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE
@ EXPR_OBJC_IVAR_REF_EXPR
An ObjCIvarRefExpr record.
@ STMT_OMP_SCOPE_DIRECTIVE
@ STMT_OMP_PARALLEL_FOR_SIMD_DIRECTIVE
@ EXPR_MEMBER
A MemberExpr record.
@ STMT_OMP_TARGET_TEAMS_DIRECTIVE
@ EXPR_CXX_TEMPORARY_OBJECT
A CXXTemporaryObjectExpr record.
@ EXPR_CXX_UNRESOLVED_LOOKUP
@ STMT_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE
@ EXPR_COMPOUND_ASSIGN_OPERATOR
A CompoundAssignOperator record.
@ EXPR_EXPR_WITH_CLEANUPS
@ EXPR_CXX_STATIC_CAST
A CXXStaticCastExpr record.
@ STMT_OMP_META_DIRECTIVE
@ EXPR_OBJC_STRING_LITERAL
An ObjCStringLiteral record.
@ EXPR_CXX_PROPERTY_REF_EXPR
@ EXPR_SYCL_UNIQUE_STABLE_NAME
@ STMT_OMP_TARGET_DATA_DIRECTIVE
@ STMT_OMP_BARRIER_DIRECTIVE
@ EXPR_VA_ARG
A VAArgExpr record.
@ STMT_OMP_TEAMS_DISTRIBUTE_SIMD_DIRECTIVE
@ STMT_OPENACC_SHUTDOWN_CONSTRUCT
@ EXPR_OBJC_ISA
An ObjCIsa Expr record.
@ STMT_OMP_SINGLE_DIRECTIVE
@ STMT_OPENACC_EXIT_DATA_CONSTRUCT
@ EXPR_CXX_OPERATOR_CALL
A CXXOperatorCallExpr record.
@ STMT_OBJC_AT_TRY
An ObjCAtTryStmt record.
@ STMT_OMP_TARGET_EXIT_DATA_DIRECTIVE
@ EXPR_CXX_UNRESOLVED_CONSTRUCT
@ EXPR_FIXEDPOINT_LITERAL
@ STMT_DO
A DoStmt record.
@ STMT_OBJC_CATCH
An ObjCAtCatchStmt record.
@ STMT_OMP_TARGET_DIRECTIVE
@ STMT_IF
An IfStmt record.
@ EXPR_CXX_EXPRESSION_TRAIT
@ EXPR_STRING_LITERAL
A StringLiteral record.
@ EXPR_OBJC_AVAILABILITY_CHECK
An ObjCAvailabilityCheckExpr record.
@ STMT_OMP_PARALLEL_MASKED_TASKLOOP_DIRECTIVE
@ EXPR_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_OPENACC_ENTER_DATA_CONSTRUCT
@ STMT_OMP_CANCEL_DIRECTIVE
@ EXPR_OFFSETOF
An OffsetOfExpr record.
@ STMT_RETURN
A ReturnStmt record.
@ STMT_OBJC_FOR_COLLECTION
An ObjCForCollectionStmt record.
@ STMT_OMP_TARGET_TEAMS_DISTRIBUTE_DIRECTIVE
@ EXPR_ARRAY_INIT_LOOP
An ArrayInitLoopExpr record.
@ STMT_OMP_PARALLEL_MASTER_TASKLOOP_DIRECTIVE
@ STMT_OMP_PARALLEL_MASKED_TASKLOOP_SIMD_DIRECTIVE
@ STMT_CONTINUE
A ContinueStmt record.
@ EXPR_PREDEFINED
A PredefinedExpr record.
@ EXPR_OPENACC_ASTERISK_SIZE
@ STMT_OMP_DEPOBJ_DIRECTIVE
@ EXPR_CXX_BOOL_LITERAL
A CXXBoolLiteralExpr record.
@ EXPR_PAREN_LIST
A ParenListExpr record.
@ EXPR_CXX_PAREN_LIST_INIT
A CXXParenListInitExpr record.
@ STMT_OMP_DISPATCH_DIRECTIVE
@ STMT_OMP_MASTER_TASKLOOP_SIMD_DIRECTIVE
@ STMT_OPENACC_DATA_CONSTRUCT
@ STMT_OMP_TASKLOOP_DIRECTIVE
@ STMT_COMPOUND
A CompoundStmt record.
@ STMT_OMP_CANONICAL_LOOP
@ STMT_FOR
A ForStmt record.
@ STMT_ATTRIBUTED
An AttributedStmt record.
@ STMT_OMP_PARALLEL_MASTER_DIRECTIVE
@ STMT_OPENACC_WAIT_CONSTRUCT
@ STMT_OMP_TARGET_TEAMS_GENERIC_LOOP_DIRECTIVE
@ STMT_OMP_TEAMS_DIRECTIVE
@ STMT_OMP_TARGET_PARALLEL_DIRECTIVE
@ EXPR_CXX_REWRITTEN_BINARY_OPERATOR
A CXXRewrittenBinaryOperator record.
@ STMT_GOTO
A GotoStmt record.
@ EXPR_NO_INIT
An NoInitExpr record.
@ EXPR_OBJC_ARRAY_LITERAL
@ STMT_OMP_ERROR_DIRECTIVE
@ EXPR_OBJC_PROTOCOL_EXPR
An ObjCProtocolExpr record.
@ STMT_OMP_GENERIC_LOOP_DIRECTIVE
@ EXPR_ARRAY_INIT_INDEX
An ArrayInitIndexExpr record.
@ STMT_OMP_TASK_DIRECTIVE
@ STMT_OPENACC_INIT_CONSTRUCT
@ EXPR_CXX_CONSTRUCT
A CXXConstructExpr record.
@ STMT_OMP_PARALLEL_MASKED_DIRECTIVE
@ STMT_OMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_DIRECTIVE
@ STMT_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 *.