23#include "llvm/Bitstream/BitstreamWriter.h"
54 class PakedBitsWriter {
57 ~PakedBitsWriter() { assert(!CurrentIndex); }
59 void addBit(
bool Value) {
60 assert(CurrentIndex &&
"Writing Bits without recording first!");
61 PackingBits.addBit(
Value);
63 void addBits(uint32_t
Value, uint32_t BitsWidth) {
64 assert(CurrentIndex &&
"Writing Bits without recording first!");
65 PackingBits.addBits(
Value, BitsWidth);
72 RecordRef[*CurrentIndex] = (uint32_t)PackingBits;
73 CurrentIndex = std::nullopt;
80 CurrentIndex = RecordRef.size();
81 RecordRef.push_back(0);
87 std::optional<unsigned> CurrentIndex;
90 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->getKwLoc());
316 Record.push_back(S->hasLabelTarget());
317 if (S->hasLabelTarget()) {
318 Record.AddDeclRef(S->getLabelDecl());
319 Record.AddSourceLocation(S->getLabelLoc());
324 VisitLoopControlStmt(S);
328void ASTStmtWriter::VisitBreakStmt(
BreakStmt *S) {
329 VisitLoopControlStmt(S);
333void ASTStmtWriter::VisitReturnStmt(
ReturnStmt *S) {
336 bool HasNRVOCandidate = S->getNRVOCandidate() !=
nullptr;
337 Record.push_back(HasNRVOCandidate);
339 Record.AddStmt(S->getRetValue());
340 if (HasNRVOCandidate)
341 Record.AddDeclRef(S->getNRVOCandidate());
343 Record.AddSourceLocation(S->getReturnLoc());
347void ASTStmtWriter::VisitDeclStmt(
DeclStmt *S) {
349 Record.AddSourceLocation(S->getBeginLoc());
350 Record.AddSourceLocation(S->getEndLoc());
357void ASTStmtWriter::VisitAsmStmt(
AsmStmt *S) {
359 Record.push_back(S->getNumOutputs());
360 Record.push_back(S->getNumInputs());
361 Record.push_back(S->getNumClobbers());
362 Record.AddSourceLocation(S->getAsmLoc());
363 Record.push_back(S->isVolatile());
364 Record.push_back(S->isSimple());
367void ASTStmtWriter::VisitGCCAsmStmt(
GCCAsmStmt *S) {
369 Record.push_back(S->getNumLabels());
370 Record.AddSourceLocation(S->getRParenLoc());
371 Record.AddStmt(S->getAsmStringExpr());
374 for (
unsigned I = 0, N = S->getNumOutputs(); I != N; ++I) {
375 Record.AddIdentifierRef(S->getOutputIdentifier(I));
376 Record.AddStmt(S->getOutputConstraintExpr(I));
377 Record.AddStmt(S->getOutputExpr(I));
381 for (
unsigned I = 0, N = S->getNumInputs(); I != N; ++I) {
382 Record.AddIdentifierRef(S->getInputIdentifier(I));
383 Record.AddStmt(S->getInputConstraintExpr(I));
384 Record.AddStmt(S->getInputExpr(I));
388 for (
unsigned I = 0, N = S->getNumClobbers(); I != N; ++I)
389 Record.AddStmt(S->getClobberExpr(I));
392 for (
unsigned I = 0, N = S->getNumLabels(); I != N; ++I) {
393 Record.AddIdentifierRef(S->getLabelIdentifier(I));
394 Record.AddStmt(S->getLabelExpr(I));
400void ASTStmtWriter::VisitMSAsmStmt(
MSAsmStmt *S) {
402 Record.AddSourceLocation(S->getLBraceLoc());
403 Record.AddSourceLocation(S->getEndLoc());
404 Record.push_back(S->getNumAsmToks());
405 Record.AddString(S->getAsmString());
408 for (
unsigned I = 0, N = S->getNumAsmToks(); I != N; ++I) {
414 for (
unsigned I = 0, N = S->getNumClobbers(); I != N; ++I) {
415 Record.AddString(S->getClobber(I));
419 for (
unsigned I = 0, N = S->getNumOutputs(); I != N; ++I) {
420 Record.AddStmt(S->getOutputExpr(I));
421 Record.AddString(S->getOutputConstraint(I));
425 for (
unsigned I = 0, N = S->getNumInputs(); I != N; ++I) {
426 Record.AddStmt(S->getInputExpr(I));
427 Record.AddString(S->getInputConstraint(I));
443 Record.AddSourceLocation(S->getKeywordLoc());
444 Record.AddStmt(S->getOperand());
445 Record.AddStmt(S->getPromiseCall());
446 Record.push_back(S->isImplicit());
452 Record.AddSourceLocation(
E->getKeywordLoc());
455 Record.AddStmt(
E->getOpaqueValue());
459 VisitCoroutineSuspendExpr(
E);
460 Record.push_back(
E->isImplicit());
465 VisitCoroutineSuspendExpr(
E);
471 Record.AddSourceLocation(
E->getKeywordLoc());
484 for (
const auto &DetailRecord : Satisfaction) {
485 auto *
E = dyn_cast<Expr *>(DetailRecord);
486 Record.push_back(
E ==
nullptr);
490 auto *
Diag = cast<std::pair<SourceLocation, StringRef> *>(DetailRecord);
502 Record.AddString(
D->SubstitutedEntity);
503 Record.AddSourceLocation(
D->DiagLoc);
504 Record.AddString(
D->DiagMessage);
507void ASTStmtWriter::VisitConceptSpecializationExpr(
510 Record.AddDeclRef(
E->getSpecializationDecl());
512 Record.push_back(CR !=
nullptr);
514 Record.AddConceptReference(CR);
523 Record.push_back(
E->getLocalParameters().size());
524 Record.push_back(
E->getRequirements().size());
527 Record.AddDeclRef(
E->getBody());
531 if (
auto *TypeReq = dyn_cast<concepts::TypeRequirement>(R)) {
533 Record.push_back(TypeReq->Status);
537 Record.AddTypeSourceInfo(TypeReq->getType());
538 }
else if (
auto *ExprReq = dyn_cast<concepts::ExprRequirement>(R)) {
539 Record.push_back(ExprReq->getKind());
540 Record.push_back(ExprReq->Status);
541 if (ExprReq->isExprSubstitutionFailure()) {
543 Record, cast<concepts::Requirement::SubstitutionDiagnostic *>(
546 Record.AddStmt(cast<Expr *>(ExprReq->Value));
548 Record.AddSourceLocation(ExprReq->NoexceptLoc);
549 const auto &RetReq = ExprReq->getReturnTypeRequirement();
550 if (RetReq.isSubstitutionFailure()) {
553 }
else if (RetReq.isTypeConstraint()) {
555 Record.AddTemplateParameterList(
556 RetReq.getTypeConstraintTemplateParameterList());
557 if (ExprReq->Status >=
560 ExprReq->getReturnTypeRequirementSubstitutedConstraintExpr());
562 assert(RetReq.isEmpty());
567 auto *NestedReq = cast<concepts::NestedRequirement>(R);
569 Record.push_back(NestedReq->hasInvalidConstraint());
570 if (NestedReq->hasInvalidConstraint()) {
571 Record.AddString(NestedReq->getInvalidConstraintEntity());
574 Record.AddStmt(NestedReq->getConstraintExpr());
575 if (!NestedReq->isDependent())
580 Record.AddSourceLocation(
E->getLParenLoc());
581 Record.AddSourceLocation(
E->getRParenLoc());
591 Record.push_back(std::distance(S->capture_begin(), S->capture_end()));
594 Record.AddDeclRef(S->getCapturedDecl());
595 Record.push_back(S->getCapturedRegionKind());
597 Record.AddDeclRef(S->getCapturedRecordDecl());
600 for (
auto *I : S->capture_inits())
604 Record.AddStmt(S->getCapturedStmt());
607 for (
const auto &I : S->captures()) {
608 if (I.capturesThis() || I.capturesVariableArrayType())
609 Record.AddDeclRef(
nullptr);
611 Record.AddDeclRef(I.getCapturedVar());
612 Record.push_back(I.getCaptureKind());
613 Record.AddSourceLocation(I.getLocation());
621 Record.AddStmt(S->getOriginalStmt());
622 Record.AddDeclRef(S->getOutlinedFunctionDecl());
627void ASTStmtWriter::VisitExpr(
Expr *
E) {
630 CurrentPackingBits.updateBits();
648 switch (
E->getResultStorageKind()) {
652 Record.push_back(
E->Int64Result());
655 Record.AddAPValue(
E->APValueResult());
659 Record.AddStmt(
E->getSubExpr());
665 Record.AddSourceLocation(
E->getLocation());
672 Record.AddSourceLocation(
E->getLocation());
673 Record.AddSourceLocation(
E->getLParenLocation());
674 Record.AddSourceLocation(
E->getRParenLocation());
675 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
683 bool HasFunctionName =
E->getFunctionName() !=
nullptr;
684 Record.push_back(HasFunctionName);
686 llvm::to_underlying(
E->getIdentKind()));
687 Record.push_back(
E->isTransparent());
688 Record.AddSourceLocation(
E->getLocation());
690 Record.AddStmt(
E->getFunctionName());
697 CurrentPackingBits.updateBits();
699 CurrentPackingBits.addBit(
E->hadMultipleCandidates());
700 CurrentPackingBits.addBit(
E->refersToEnclosingVariableOrCapture());
701 CurrentPackingBits.addBits(
E->isNonOdrUse(), 2);
702 CurrentPackingBits.addBit(
E->isImmediateEscalating());
703 CurrentPackingBits.addBit(
E->getDecl() !=
E->getFoundDecl());
704 CurrentPackingBits.addBit(
E->hasQualifier());
705 CurrentPackingBits.addBit(
E->hasTemplateKWAndArgsInfo());
707 if (
E->hasTemplateKWAndArgsInfo()) {
708 unsigned NumTemplateArgs =
E->getNumTemplateArgs();
709 Record.push_back(NumTemplateArgs);
714 if ((!
E->hasTemplateKWAndArgsInfo()) && (!
E->hasQualifier()) &&
715 (
E->getDecl() ==
E->getFoundDecl()) &&
720 if (
E->hasQualifier())
721 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
723 if (
E->getDecl() !=
E->getFoundDecl())
724 Record.AddDeclRef(
E->getFoundDecl());
726 if (
E->hasTemplateKWAndArgsInfo())
730 Record.AddDeclRef(
E->getDecl());
731 Record.AddSourceLocation(
E->getLocation());
732 Record.AddDeclarationNameLoc(
E->DNLoc,
E->getDecl()->getDeclName());
738 Record.AddSourceLocation(
E->getLocation());
739 Record.AddAPInt(
E->getValue());
741 if (
E->getBitWidth() == 32) {
750 Record.AddSourceLocation(
E->getLocation());
751 Record.push_back(
E->getScale());
752 Record.AddAPInt(
E->getValue());
758 Record.push_back(
E->getRawSemantics());
759 Record.push_back(
E->isExact());
760 Record.AddAPFloat(
E->getValue());
761 Record.AddSourceLocation(
E->getLocation());
767 Record.AddStmt(
E->getSubExpr());
775 Record.push_back(
E->getNumConcatenated());
776 Record.push_back(
E->getLength());
777 Record.push_back(
E->getCharByteWidth());
778 Record.push_back(llvm::to_underlying(
E->getKind()));
779 Record.push_back(
E->isPascal());
782 for (
unsigned I = 0, N =
E->getNumConcatenated(); I != N; ++I)
783 Record.AddSourceLocation(
E->getStrTokenLoc(I));
786 StringRef StrData =
E->getBytes();
787 for (
unsigned I = 0, N =
E->getByteLength(); I != N; ++I)
788 Record.push_back(StrData[I]);
795 Record.push_back(
E->getValue());
796 Record.AddSourceLocation(
E->getLocation());
797 Record.push_back(llvm::to_underlying(
E->getKind()));
804void ASTStmtWriter::VisitParenExpr(
ParenExpr *
E) {
806 Record.push_back(
E->isProducedByFoldExpansion());
807 Record.AddSourceLocation(
E->getLParen());
808 Record.AddSourceLocation(
E->getRParen());
809 Record.AddStmt(
E->getSubExpr());
815 Record.push_back(
E->getNumExprs());
816 for (
auto *SubStmt :
E->exprs())
818 Record.AddSourceLocation(
E->getLParenLoc());
819 Record.AddSourceLocation(
E->getRParenLoc());
825 bool HasFPFeatures =
E->hasStoredFPFeatures();
828 CurrentPackingBits.addBit(HasFPFeatures);
829 Record.AddStmt(
E->getSubExpr());
830 CurrentPackingBits.addBits(
E->getOpcode(),
832 Record.AddSourceLocation(
E->getOperatorLoc());
833 CurrentPackingBits.addBit(
E->canOverflow());
836 Record.push_back(
E->getStoredFPFeatures().getAsOpaqueInt());
842 Record.push_back(
E->getNumComponents());
843 Record.push_back(
E->getNumExpressions());
844 Record.AddSourceLocation(
E->getOperatorLoc());
845 Record.AddSourceLocation(
E->getRParenLoc());
846 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
847 for (
unsigned I = 0, N =
E->getNumComponents(); I != N; ++I) {
870 for (
unsigned I = 0, N =
E->getNumExpressions(); I != N; ++I)
871 Record.AddStmt(
E->getIndexExpr(I));
877 Record.push_back(
E->getKind());
878 if (
E->isArgumentType())
879 Record.AddTypeSourceInfo(
E->getArgumentTypeInfo());
882 Record.AddStmt(
E->getArgumentExpr());
884 Record.AddSourceLocation(
E->getOperatorLoc());
885 Record.AddSourceLocation(
E->getRParenLoc());
893 Record.AddSourceLocation(
E->getRBracketLoc());
900 Record.AddStmt(
E->getRowIdx());
901 Record.AddStmt(
E->getColumnIdx());
902 Record.AddSourceLocation(
E->getRBracketLoc());
910 Record.AddStmt(
E->getLowerBound());
911 Record.AddStmt(
E->getLength());
912 if (
E->isOMPArraySection())
913 Record.AddStmt(
E->getStride());
914 Record.AddSourceLocation(
E->getColonLocFirst());
916 if (
E->isOMPArraySection())
917 Record.AddSourceLocation(
E->getColonLocSecond());
919 Record.AddSourceLocation(
E->getRBracketLoc());
925 Record.push_back(
E->getDimensions().size());
927 for (
Expr *
Dim :
E->getDimensions())
930 Record.AddSourceRange(SR);
931 Record.AddSourceLocation(
E->getLParenLoc());
932 Record.AddSourceLocation(
E->getRParenLoc());
938 Record.push_back(
E->numOfIterators());
939 Record.AddSourceLocation(
E->getIteratorKwLoc());
940 Record.AddSourceLocation(
E->getLParenLoc());
941 Record.AddSourceLocation(
E->getRParenLoc());
942 for (
unsigned I = 0, End =
E->numOfIterators(); I < End; ++I) {
943 Record.AddDeclRef(
E->getIteratorDecl(I));
944 Record.AddSourceLocation(
E->getAssignLoc(I));
949 Record.AddSourceLocation(
E->getColonLoc(I));
951 Record.AddSourceLocation(
E->getSecondColonLoc(I));
962void ASTStmtWriter::VisitCallExpr(
CallExpr *
E) {
965 Record.push_back(
E->getNumArgs());
966 CurrentPackingBits.updateBits();
967 CurrentPackingBits.addBit(
static_cast<bool>(
E->getADLCallKind()));
968 CurrentPackingBits.addBit(
E->hasStoredFPFeatures());
969 CurrentPackingBits.addBit(
E->isCoroElideSafe());
970 CurrentPackingBits.addBit(
E->usesMemberSyntax());
972 Record.AddSourceLocation(
E->getRParenLoc());
973 Record.AddStmt(
E->getCallee());
975 Arg != ArgEnd; ++Arg)
978 if (
E->hasStoredFPFeatures())
979 Record.push_back(
E->getFPFeatures().getAsOpaqueInt());
981 if (!
E->hasStoredFPFeatures() && !
static_cast<bool>(
E->getADLCallKind()) &&
982 !
E->usesMemberSyntax() &&
E->
getStmtClass() == Stmt::CallExprClass)
998void ASTStmtWriter::VisitMemberExpr(
MemberExpr *
E) {
1001 bool HasQualifier =
E->hasQualifier();
1002 bool HasFoundDecl =
E->hasFoundDecl();
1003 bool HasTemplateInfo =
E->hasTemplateKWAndArgsInfo();
1004 unsigned NumTemplateArgs =
E->getNumTemplateArgs();
1008 CurrentPackingBits.updateBits();
1009 CurrentPackingBits.addBit(HasQualifier);
1010 CurrentPackingBits.addBit(HasFoundDecl);
1011 CurrentPackingBits.addBit(HasTemplateInfo);
1012 Record.push_back(NumTemplateArgs);
1015 Record.AddDeclRef(
E->getMemberDecl());
1016 Record.AddDeclarationNameLoc(
E->MemberDNLoc,
1017 E->getMemberDecl()->getDeclName());
1018 Record.AddSourceLocation(
E->getMemberLoc());
1019 CurrentPackingBits.addBit(
E->isArrow());
1020 CurrentPackingBits.addBit(
E->hadMultipleCandidates());
1021 CurrentPackingBits.addBits(
E->isNonOdrUse(), 2);
1022 Record.AddSourceLocation(
E->getOperatorLoc());
1025 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
1029 Record.AddDeclRef(FoundDecl.getDecl());
1030 CurrentPackingBits.addBits(FoundDecl.
getAccess(), 2);
1033 if (HasTemplateInfo)
1043 Record.AddSourceLocation(
E->getIsaMemberLoc());
1044 Record.AddSourceLocation(
E->getOpLoc());
1045 Record.push_back(
E->isArrow());
1052 Record.AddStmt(
E->getSubExpr());
1053 Record.push_back(
E->shouldCopy());
1058 VisitExplicitCastExpr(
E);
1059 Record.AddSourceLocation(
E->getLParenLoc());
1060 Record.AddSourceLocation(
E->getBridgeKeywordLoc());
1061 Record.push_back(
E->getBridgeKind());
1065void ASTStmtWriter::VisitCastExpr(
CastExpr *
E) {
1068 Record.push_back(
E->path_size());
1069 CurrentPackingBits.updateBits();
1071 CurrentPackingBits.addBits(
E->getCastKind(), 7);
1072 CurrentPackingBits.addBit(
E->hasStoredFPFeatures());
1073 Record.AddStmt(
E->getSubExpr());
1076 PI =
E->path_begin(), PE =
E->path_end(); PI != PE; ++PI)
1077 Record.AddCXXBaseSpecifier(**PI);
1079 if (
E->hasStoredFPFeatures())
1080 Record.push_back(
E->getFPFeatures().getAsOpaqueInt());
1088 CurrentPackingBits.updateBits();
1089 CurrentPackingBits.addBits(
E->getOpcode(), 6);
1090 bool HasFPFeatures =
E->hasStoredFPFeatures();
1091 CurrentPackingBits.addBit(HasFPFeatures);
1092 CurrentPackingBits.addBit(
E->hasExcludedOverflowPattern());
1095 Record.AddSourceLocation(
E->getOperatorLoc());
1097 Record.push_back(
E->getStoredFPFeatures().getAsOpaqueInt());
1107 VisitBinaryOperator(
E);
1108 Record.AddTypeRef(
E->getComputationLHSType());
1109 Record.AddTypeRef(
E->getComputationResultType());
1123 Record.AddSourceLocation(
E->getQuestionLoc());
1124 Record.AddSourceLocation(
E->getColonLoc());
1131 Record.AddStmt(
E->getOpaqueValue());
1132 Record.AddStmt(
E->getCommon());
1134 Record.AddStmt(
E->getTrueExpr());
1135 Record.AddStmt(
E->getFalseExpr());
1136 Record.AddSourceLocation(
E->getQuestionLoc());
1137 Record.AddSourceLocation(
E->getColonLoc());
1143 CurrentPackingBits.addBit(
E->isPartOfExplicitCast());
1145 if (
E->path_size() == 0 && !
E->hasStoredFPFeatures())
1153 Record.AddTypeSourceInfo(
E->getTypeInfoAsWritten());
1157 VisitExplicitCastExpr(
E);
1158 Record.AddSourceLocation(
E->getLParenLoc());
1159 Record.AddSourceLocation(
E->getRParenLoc());
1165 Record.AddSourceLocation(
E->getLParenLoc());
1166 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1167 Record.AddStmt(
E->getInitializer());
1168 Record.push_back(
E->isFileScope());
1175 Record.AddIdentifierRef(&
E->getAccessor());
1176 Record.AddSourceLocation(
E->getAccessorLoc());
1184 Record.AddStmt(
E->getSyntacticForm());
1185 Record.AddSourceLocation(
E->getLBraceLoc());
1186 Record.AddSourceLocation(
E->getRBraceLoc());
1187 bool isArrayFiller = isa<Expr *>(
E->ArrayFillerOrUnionFieldInit);
1188 Record.push_back(isArrayFiller);
1190 Record.AddStmt(
E->getArrayFiller());
1192 Record.AddDeclRef(
E->getInitializedFieldInUnion());
1193 Record.push_back(
E->hadArrayRangeDesignator());
1194 Record.push_back(
E->getNumInits());
1195 if (isArrayFiller) {
1198 Expr *filler =
E->getArrayFiller();
1199 for (
unsigned I = 0, N =
E->getNumInits(); I != N; ++I)
1200 Record.AddStmt(
E->getInit(I) != filler ?
E->getInit(I) :
nullptr);
1202 for (
unsigned I = 0, N =
E->getNumInits(); I != N; ++I)
1203 Record.AddStmt(
E->getInit(I));
1210 Record.push_back(
E->getNumSubExprs());
1211 for (
unsigned I = 0, N =
E->getNumSubExprs(); I != N; ++I)
1212 Record.AddStmt(
E->getSubExpr(I));
1213 Record.AddSourceLocation(
E->getEqualOrColonLoc());
1214 Record.push_back(
E->usesGNUSyntax());
1216 if (
D.isFieldDesignator()) {
1219 Record.AddDeclRef(Field);
1222 Record.AddIdentifierRef(
D.getFieldName());
1224 Record.AddSourceLocation(
D.getDotLoc());
1225 Record.AddSourceLocation(
D.getFieldLoc());
1226 }
else if (
D.isArrayDesignator()) {
1228 Record.push_back(
D.getArrayIndex());
1229 Record.AddSourceLocation(
D.getLBracketLoc());
1230 Record.AddSourceLocation(
D.getRBracketLoc());
1232 assert(
D.isArrayRangeDesignator() &&
"Unknown designator");
1234 Record.push_back(
D.getArrayIndex());
1235 Record.AddSourceLocation(
D.getLBracketLoc());
1236 Record.AddSourceLocation(
D.getEllipsisLoc());
1237 Record.AddSourceLocation(
D.getRBracketLoc());
1246 Record.AddStmt(
E->getUpdater());
1250void ASTStmtWriter::VisitNoInitExpr(
NoInitExpr *
E) {
1257 Record.AddStmt(
E->SubExprs[0]);
1258 Record.AddStmt(
E->SubExprs[1]);
1272void ASTStmtWriter::VisitVAArgExpr(
VAArgExpr *
E) {
1274 Record.AddStmt(
E->getSubExpr());
1275 Record.AddTypeSourceInfo(
E->getWrittenTypeInfo());
1276 Record.AddSourceLocation(
E->getBuiltinLoc());
1277 Record.AddSourceLocation(
E->getRParenLoc());
1278 Record.push_back(
E->isMicrosoftABI());
1284 Record.AddDeclRef(cast_or_null<Decl>(
E->getParentContext()));
1287 Record.push_back(llvm::to_underlying(
E->getIdentKind()));
1291void ASTStmtWriter::VisitEmbedExpr(
EmbedExpr *
E) {
1295 Record.AddStmt(
E->getDataStringLiteral());
1296 Record.writeUInt32(
E->getStartingElementPos());
1297 Record.writeUInt32(
E->getDataElementCount());
1303 Record.AddSourceLocation(
E->getAmpAmpLoc());
1304 Record.AddSourceLocation(
E->getLabelLoc());
1305 Record.AddDeclRef(
E->getLabel());
1309void ASTStmtWriter::VisitStmtExpr(
StmtExpr *
E) {
1311 Record.AddStmt(
E->getSubStmt());
1312 Record.AddSourceLocation(
E->getLParenLoc());
1313 Record.AddSourceLocation(
E->getRParenLoc());
1314 Record.push_back(
E->getTemplateDepth());
1318void ASTStmtWriter::VisitChooseExpr(
ChooseExpr *
E) {
1323 Record.AddSourceLocation(
E->getBuiltinLoc());
1324 Record.AddSourceLocation(
E->getRParenLoc());
1325 Record.push_back(
E->isConditionDependent() ?
false :
E->isConditionTrue());
1331 Record.AddSourceLocation(
E->getTokenLocation());
1337 Record.push_back(
E->getNumSubExprs());
1338 for (
unsigned I = 0, N =
E->getNumSubExprs(); I != N; ++I)
1339 Record.AddStmt(
E->getExpr(I));
1340 Record.AddSourceLocation(
E->getBuiltinLoc());
1341 Record.AddSourceLocation(
E->getRParenLoc());
1347 bool HasFPFeatures =
E->hasStoredFPFeatures();
1348 CurrentPackingBits.addBit(HasFPFeatures);
1349 Record.AddSourceLocation(
E->getBuiltinLoc());
1350 Record.AddSourceLocation(
E->getRParenLoc());
1351 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1352 Record.AddStmt(
E->getSrcExpr());
1355 Record.push_back(
E->getStoredFPFeatures().getAsOpaqueInt());
1358void ASTStmtWriter::VisitBlockExpr(
BlockExpr *
E) {
1360 Record.AddDeclRef(
E->getBlockDecl());
1367 Record.push_back(
E->getNumAssocs());
1368 Record.push_back(
E->isExprPredicate());
1369 Record.push_back(
E->ResultIndex);
1370 Record.AddSourceLocation(
E->getGenericLoc());
1371 Record.AddSourceLocation(
E->getDefaultLoc());
1372 Record.AddSourceLocation(
E->getRParenLoc());
1374 Stmt **Stmts =
E->getTrailingObjects<
Stmt *>();
1378 for (
unsigned I = 0, N =
E->getNumAssocs() + 1; I < N; ++I)
1379 Record.AddStmt(Stmts[I]);
1382 for (
unsigned I = 0, N =
E->getNumAssocs(); I < N; ++I)
1383 Record.AddTypeSourceInfo(TSIs[I]);
1390 Record.push_back(
E->getNumSemanticExprs());
1394 unsigned result =
E->getResultExprIndex();
1396 Record.push_back(result);
1398 Record.AddStmt(
E->getSyntacticForm());
1400 i =
E->semantics_begin(), e =
E->semantics_end(); i != e; ++i) {
1406void ASTStmtWriter::VisitAtomicExpr(
AtomicExpr *
E) {
1409 for (
unsigned I = 0, N =
E->getNumSubExprs(); I != N; ++I)
1410 Record.AddStmt(
E->getSubExprs()[I]);
1411 Record.AddSourceLocation(
E->getBuiltinLoc());
1412 Record.AddSourceLocation(
E->getRParenLoc());
1422 Record.AddStmt(
E->getString());
1423 Record.AddSourceLocation(
E->getAtLoc());
1429 Record.AddStmt(
E->getSubExpr());
1430 Record.AddDeclRef(
E->getBoxingMethod());
1437 Record.push_back(
E->getNumElements());
1438 for (
unsigned i = 0; i <
E->getNumElements(); i++)
1439 Record.AddStmt(
E->getElement(i));
1440 Record.AddDeclRef(
E->getArrayWithObjectsMethod());
1447 Record.push_back(
E->getNumElements());
1448 Record.push_back(
E->HasPackExpansions);
1449 for (
unsigned i = 0; i <
E->getNumElements(); i++) {
1451 Record.AddStmt(Element.Key);
1452 Record.AddStmt(Element.Value);
1453 if (
E->HasPackExpansions) {
1454 Record.AddSourceLocation(Element.EllipsisLoc);
1455 unsigned NumExpansions = 0;
1456 if (Element.NumExpansions)
1457 NumExpansions = *Element.NumExpansions + 1;
1458 Record.push_back(NumExpansions);
1462 Record.AddDeclRef(
E->getDictWithObjectsMethod());
1469 Record.AddTypeSourceInfo(
E->getEncodedTypeSourceInfo());
1470 Record.AddSourceLocation(
E->getAtLoc());
1471 Record.AddSourceLocation(
E->getRParenLoc());
1477 Record.AddSelectorRef(
E->getSelector());
1478 Record.AddSourceLocation(
E->getAtLoc());
1479 Record.AddSourceLocation(
E->getRParenLoc());
1485 Record.AddDeclRef(
E->getProtocol());
1486 Record.AddSourceLocation(
E->getAtLoc());
1487 Record.AddSourceLocation(
E->ProtoLoc);
1488 Record.AddSourceLocation(
E->getRParenLoc());
1494 Record.AddDeclRef(
E->getDecl());
1495 Record.AddSourceLocation(
E->getLocation());
1496 Record.AddSourceLocation(
E->getOpLoc());
1498 Record.push_back(
E->isArrow());
1499 Record.push_back(
E->isFreeIvar());
1505 Record.push_back(
E->SetterAndMethodRefFlags.getInt());
1506 Record.push_back(
E->isImplicitProperty());
1507 if (
E->isImplicitProperty()) {
1508 Record.AddDeclRef(
E->getImplicitPropertyGetter());
1509 Record.AddDeclRef(
E->getImplicitPropertySetter());
1511 Record.AddDeclRef(
E->getExplicitProperty());
1513 Record.AddSourceLocation(
E->getLocation());
1514 Record.AddSourceLocation(
E->getReceiverLocation());
1515 if (
E->isObjectReceiver()) {
1518 }
else if (
E->isSuperReceiver()) {
1520 Record.AddTypeRef(
E->getSuperReceiverType());
1523 Record.AddDeclRef(
E->getClassReceiver());
1531 Record.AddSourceLocation(
E->getRBracket());
1532 Record.AddStmt(
E->getBaseExpr());
1533 Record.AddStmt(
E->getKeyExpr());
1534 Record.AddDeclRef(
E->getAtIndexMethodDecl());
1535 Record.AddDeclRef(
E->setAtIndexMethodDecl());
1542 Record.push_back(
E->getNumArgs());
1543 Record.push_back(
E->getNumStoredSelLocs());
1544 Record.push_back(
E->SelLocsKind);
1545 Record.push_back(
E->isDelegateInitCall());
1546 Record.push_back(
E->IsImplicit);
1547 Record.push_back((
unsigned)
E->getReceiverKind());
1548 switch (
E->getReceiverKind()) {
1550 Record.AddStmt(
E->getInstanceReceiver());
1554 Record.AddTypeSourceInfo(
E->getClassReceiverTypeInfo());
1559 Record.AddTypeRef(
E->getSuperType());
1560 Record.AddSourceLocation(
E->getSuperLoc());
1564 if (
E->getMethodDecl()) {
1566 Record.AddDeclRef(
E->getMethodDecl());
1569 Record.AddSelectorRef(
E->getSelector());
1572 Record.AddSourceLocation(
E->getLeftLoc());
1573 Record.AddSourceLocation(
E->getRightLoc());
1576 Arg != ArgEnd; ++Arg)
1580 for (
unsigned i = 0, e =
E->getNumStoredSelLocs(); i != e; ++i)
1581 Record.AddSourceLocation(Locs[i]);
1588 Record.AddStmt(S->getElement());
1589 Record.AddStmt(S->getCollection());
1590 Record.AddStmt(S->getBody());
1591 Record.AddSourceLocation(S->getForLoc());
1592 Record.AddSourceLocation(S->getRParenLoc());
1598 Record.AddStmt(S->getCatchBody());
1599 Record.AddDeclRef(S->getCatchParamDecl());
1600 Record.AddSourceLocation(S->getAtCatchLoc());
1601 Record.AddSourceLocation(S->getRParenLoc());
1607 Record.AddStmt(S->getFinallyBody());
1608 Record.AddSourceLocation(S->getAtFinallyLoc());
1614 Record.AddStmt(S->getSubStmt());
1615 Record.AddSourceLocation(S->getAtLoc());
1621 Record.push_back(S->getNumCatchStmts());
1622 Record.push_back(S->getFinallyStmt() !=
nullptr);
1623 Record.AddStmt(S->getTryBody());
1626 if (S->getFinallyStmt())
1627 Record.AddStmt(S->getFinallyStmt());
1628 Record.AddSourceLocation(S->getAtTryLoc());
1634 Record.AddStmt(S->getSynchExpr());
1635 Record.AddStmt(S->getSynchBody());
1636 Record.AddSourceLocation(S->getAtSynchronizedLoc());
1642 Record.AddStmt(S->getThrowExpr());
1643 Record.AddSourceLocation(S->getThrowLoc());
1649 Record.push_back(
E->getValue());
1650 Record.AddSourceLocation(
E->getLocation());
1657 Record.AddVersionTuple(
E->getVersion());
1665void ASTStmtWriter::VisitCXXCatchStmt(
CXXCatchStmt *S) {
1667 Record.AddSourceLocation(S->getCatchLoc());
1668 Record.AddDeclRef(S->getExceptionDecl());
1669 Record.AddStmt(S->getHandlerBlock());
1673void ASTStmtWriter::VisitCXXTryStmt(
CXXTryStmt *S) {
1675 Record.push_back(S->getNumHandlers());
1676 Record.AddSourceLocation(S->getTryLoc());
1677 Record.AddStmt(S->getTryBlock());
1678 for (
unsigned i = 0, e = S->getNumHandlers(); i != e; ++i)
1679 Record.AddStmt(S->getHandler(i));
1685 Record.AddSourceLocation(S->getForLoc());
1686 Record.AddSourceLocation(S->getCoawaitLoc());
1687 Record.AddSourceLocation(S->getColonLoc());
1688 Record.AddSourceLocation(S->getRParenLoc());
1689 Record.AddStmt(S->getInit());
1690 Record.AddStmt(S->getRangeStmt());
1691 Record.AddStmt(S->getBeginStmt());
1692 Record.AddStmt(S->getEndStmt());
1693 Record.AddStmt(S->getCond());
1694 Record.AddStmt(S->getInc());
1695 Record.AddStmt(S->getLoopVarStmt());
1696 Record.AddStmt(S->getBody());
1702 Record.AddSourceLocation(S->getKeywordLoc());
1703 Record.push_back(S->isIfExists());
1704 Record.AddNestedNameSpecifierLoc(S->getQualifierLoc());
1705 Record.AddDeclarationNameInfo(S->getNameInfo());
1706 Record.AddStmt(S->getSubStmt());
1712 Record.push_back(
E->getOperator());
1713 Record.AddSourceLocation(
E->BeginLoc);
1715 if (!
E->hasStoredFPFeatures() && !
static_cast<bool>(
E->getADLCallKind()))
1724 if (!
E->hasStoredFPFeatures() && !
static_cast<bool>(
E->getADLCallKind()))
1730void ASTStmtWriter::VisitCXXRewrittenBinaryOperator(
1733 Record.push_back(
E->isReversed());
1734 Record.AddStmt(
E->getSemanticForm());
1741 Record.push_back(
E->getNumArgs());
1742 Record.push_back(
E->isElidable());
1743 Record.push_back(
E->hadMultipleCandidates());
1744 Record.push_back(
E->isListInitialization());
1745 Record.push_back(
E->isStdInitListInitialization());
1746 Record.push_back(
E->requiresZeroInitialization());
1748 llvm::to_underlying(
E->getConstructionKind()));
1749 Record.push_back(
E->isImmediateEscalating());
1750 Record.AddSourceLocation(
E->getLocation());
1751 Record.AddDeclRef(
E->getConstructor());
1752 Record.AddSourceRange(
E->getParenOrBraceRange());
1754 for (
unsigned I = 0, N =
E->getNumArgs(); I != N; ++I)
1762 Record.AddDeclRef(
E->getConstructor());
1763 Record.AddSourceLocation(
E->getLocation());
1764 Record.push_back(
E->constructsVBase());
1765 Record.push_back(
E->inheritedFromVBase());
1770 VisitCXXConstructExpr(
E);
1771 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1775void ASTStmtWriter::VisitLambdaExpr(
LambdaExpr *
E) {
1778 Record.AddSourceRange(
E->IntroducerRange);
1780 Record.AddSourceLocation(
E->CaptureDefaultLoc);
1783 Record.AddSourceLocation(
E->ClosingBrace);
1787 CEnd =
E->capture_init_end();
1800 Record.AddStmt(
E->getSubExpr());
1805 VisitExplicitCastExpr(
E);
1807 CurrentPackingBits.addBit(
E->getAngleBrackets().isValid());
1808 if (
E->getAngleBrackets().isValid())
1809 Record.AddSourceRange(
E->getAngleBrackets());
1813 VisitCXXNamedCastExpr(
E);
1818 VisitCXXNamedCastExpr(
E);
1823 VisitCXXNamedCastExpr(
E);
1828 VisitCXXNamedCastExpr(
E);
1833 VisitCXXNamedCastExpr(
E);
1838 VisitExplicitCastExpr(
E);
1839 Record.AddSourceLocation(
E->getLParenLoc());
1840 Record.AddSourceLocation(
E->getRParenLoc());
1845 VisitExplicitCastExpr(
E);
1853 Record.AddSourceLocation(
E->UDSuffixLoc);
1859 Record.push_back(
E->getValue());
1860 Record.AddSourceLocation(
E->getLocation());
1866 Record.AddSourceLocation(
E->getLocation());
1873 if (
E->isTypeOperand()) {
1874 Record.AddTypeSourceInfo(
E->getTypeOperandSourceInfo());
1877 Record.AddStmt(
E->getExprOperand());
1884 Record.AddSourceLocation(
E->getLocation());
1885 Record.push_back(
E->isImplicit());
1886 Record.push_back(
E->isCapturedByCopyInLambdaWithExplicitObjectParameter());
1893 Record.AddSourceLocation(
E->getThrowLoc());
1894 Record.AddStmt(
E->getSubExpr());
1895 Record.push_back(
E->isThrownVariableInScope());
1901 Record.AddDeclRef(
E->getParam());
1902 Record.AddDeclRef(cast_or_null<Decl>(
E->getUsedContext()));
1903 Record.AddSourceLocation(
E->getUsedLocation());
1904 Record.push_back(
E->hasRewrittenInit());
1905 if (
E->hasRewrittenInit())
1906 Record.AddStmt(
E->getRewrittenExpr());
1912 Record.push_back(
E->hasRewrittenInit());
1913 Record.AddDeclRef(
E->getField());
1914 Record.AddDeclRef(cast_or_null<Decl>(
E->getUsedContext()));
1916 if (
E->hasRewrittenInit())
1917 Record.AddStmt(
E->getRewrittenExpr());
1923 Record.AddCXXTemporary(
E->getTemporary());
1924 Record.AddStmt(
E->getSubExpr());
1930 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1931 Record.AddSourceLocation(
E->getRParenLoc());
1935void ASTStmtWriter::VisitCXXNewExpr(
CXXNewExpr *
E) {
1938 Record.push_back(
E->isArray());
1939 Record.push_back(
E->hasInitializer());
1940 Record.push_back(
E->getNumPlacementArgs());
1941 Record.push_back(
E->isParenTypeId());
1943 Record.push_back(
E->isGlobalNew());
1947 Record.push_back(
E->doesUsualArrayDeleteWantSize());
1951 Record.AddDeclRef(
E->getOperatorNew());
1952 Record.AddDeclRef(
E->getOperatorDelete());
1953 Record.AddTypeSourceInfo(
E->getAllocatedTypeSourceInfo());
1954 if (
E->isParenTypeId())
1955 Record.AddSourceRange(
E->getTypeIdParens());
1957 Record.AddSourceRange(
E->getDirectInitRange());
1968 Record.push_back(
E->isGlobalDelete());
1969 Record.push_back(
E->isArrayForm());
1970 Record.push_back(
E->isArrayFormAsWritten());
1971 Record.push_back(
E->doesUsualArrayDeleteWantSize());
1972 Record.AddDeclRef(
E->getOperatorDelete());
1973 Record.AddStmt(
E->getArgument());
1983 Record.push_back(
E->isArrow());
1984 Record.AddSourceLocation(
E->getOperatorLoc());
1985 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
1986 Record.AddTypeSourceInfo(
E->getScopeTypeInfo());
1987 Record.AddSourceLocation(
E->getColonColonLoc());
1988 Record.AddSourceLocation(
E->getTildeLoc());
1991 Record.AddIdentifierRef(
E->getDestroyedTypeIdentifier());
1992 if (
E->getDestroyedTypeIdentifier())
1993 Record.AddSourceLocation(
E->getDestroyedTypeLoc());
1995 Record.AddTypeSourceInfo(
E->getDestroyedTypeInfo());
2002 Record.push_back(
E->getNumObjects());
2003 for (
auto &Obj :
E->getObjects()) {
2004 if (
auto *BD = Obj.dyn_cast<
BlockDecl *>()) {
2013 Record.push_back(
E->cleanupsHaveSideEffects());
2014 Record.AddStmt(
E->getSubExpr());
2018void ASTStmtWriter::VisitCXXDependentScopeMemberExpr(
2024 Record.push_back(
E->getNumTemplateArgs());
2025 CurrentPackingBits.updateBits();
2026 CurrentPackingBits.addBit(
E->hasTemplateKWAndArgsInfo());
2027 CurrentPackingBits.addBit(
E->hasFirstQualifierFoundInScope());
2029 if (
E->hasTemplateKWAndArgsInfo()) {
2036 CurrentPackingBits.addBit(
E->isArrow());
2038 Record.AddTypeRef(
E->getBaseType());
2039 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2040 CurrentPackingBits.addBit(!
E->isImplicitAccess());
2041 if (!
E->isImplicitAccess())
2044 Record.AddSourceLocation(
E->getOperatorLoc());
2046 if (
E->hasFirstQualifierFoundInScope())
2047 Record.AddDeclRef(
E->getFirstQualifierFoundInScope());
2049 Record.AddDeclarationNameInfo(
E->MemberNameInfo);
2059 CurrentPackingBits.addBit(
2071 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2072 Record.AddDeclarationNameInfo(
E->NameInfo);
2079 Record.push_back(
E->getNumArgs());
2081 ArgI =
E->arg_begin(), ArgE =
E->arg_end(); ArgI != ArgE; ++ArgI)
2083 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
2084 Record.AddSourceLocation(
E->getLParenLoc());
2085 Record.AddSourceLocation(
E->getRParenLoc());
2086 Record.push_back(
E->isListInitialization());
2093 Record.push_back(
E->getNumDecls());
2095 CurrentPackingBits.updateBits();
2096 CurrentPackingBits.addBit(
E->hasTemplateKWAndArgsInfo());
2097 if (
E->hasTemplateKWAndArgsInfo()) {
2099 *
E->getTrailingASTTemplateKWAndArgsInfo();
2105 OvE =
E->decls_end();
2106 OvI != OvE; ++OvI) {
2107 Record.AddDeclRef(OvI.getDecl());
2108 Record.push_back(OvI.getAccess());
2111 Record.AddDeclarationNameInfo(
E->getNameInfo());
2112 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2116 VisitOverloadExpr(
E);
2117 CurrentPackingBits.addBit(
E->isArrow());
2118 CurrentPackingBits.addBit(
E->hasUnresolvedUsing());
2119 CurrentPackingBits.addBit(!
E->isImplicitAccess());
2120 if (!
E->isImplicitAccess())
2123 Record.AddSourceLocation(
E->getOperatorLoc());
2125 Record.AddTypeRef(
E->getBaseType());
2130 VisitOverloadExpr(
E);
2131 CurrentPackingBits.addBit(
E->requiresADL());
2132 Record.AddDeclRef(
E->getNamingClass());
2140 Record.getASTContext().getTranslationUnitDecl()->lookup(Name))
2141 if (
Found->isFromASTFile())
2146 for (
auto *NS : ExternalNSs)
2147 for (
auto *
Found : NS->lookup(Name))
2161 Record.AddAPValue(
E->getAPValue());
2164 for (
unsigned I = 0, N =
E->getNumArgs(); I != N; ++I)
2165 Record.AddTypeSourceInfo(
E->getArg(I));
2171 Record.push_back(
E->getTrait());
2172 Record.push_back(
E->getValue());
2174 Record.AddTypeSourceInfo(
E->getQueriedTypeSourceInfo());
2175 Record.AddStmt(
E->getDimensionExpression());
2181 Record.push_back(
E->getTrait());
2182 Record.push_back(
E->getValue());
2184 Record.AddStmt(
E->getQueriedExpression());
2190 Record.push_back(
E->getValue());
2192 Record.AddStmt(
E->getOperand());
2198 Record.AddSourceLocation(
E->getEllipsisLoc());
2199 Record.push_back(
E->NumExpansions);
2200 Record.AddStmt(
E->getPattern());
2206 Record.push_back(
E->isPartiallySubstituted() ?
E->getPartialArguments().size()
2208 Record.AddSourceLocation(
E->OperatorLoc);
2209 Record.AddSourceLocation(
E->PackLoc);
2210 Record.AddSourceLocation(
E->RParenLoc);
2212 if (
E->isPartiallySubstituted()) {
2213 for (
const auto &TA :
E->getPartialArguments())
2214 Record.AddTemplateArgument(TA);
2216 Record.push_back(
E->getPackLength());
2225 Record.AddSourceLocation(
E->getEllipsisLoc());
2226 Record.AddSourceLocation(
E->getRSquareLoc());
2227 Record.AddStmt(
E->getPackIdExpression());
2228 Record.AddStmt(
E->getIndexExpr());
2229 for (
Expr *Sub :
E->getExpressions())
2234void ASTStmtWriter::VisitSubstNonTypeTemplateParmExpr(
2237 Record.AddDeclRef(
E->getAssociatedDecl());
2238 CurrentPackingBits.addBit(
E->isReferenceParameter());
2239 CurrentPackingBits.addBits(
E->getIndex(), 12);
2240 Record.writeUnsignedOrNone(
E->getPackIndex());
2241 CurrentPackingBits.addBit(
E->getFinal());
2243 Record.AddSourceLocation(
E->getNameLoc());
2244 Record.AddStmt(
E->getReplacement());
2248void ASTStmtWriter::VisitSubstNonTypeTemplateParmPackExpr(
2251 Record.AddDeclRef(
E->getAssociatedDecl());
2252 CurrentPackingBits.addBit(
E->getFinal());
2253 Record.push_back(
E->getIndex());
2254 Record.AddTemplateArgument(
E->getArgumentPack());
2255 Record.AddSourceLocation(
E->getParameterPackLocation());
2261 Record.push_back(
E->getNumExpansions());
2262 Record.AddDeclRef(
E->getParameterPack());
2263 Record.AddSourceLocation(
E->getParameterPackLocation());
2272 Record.push_back(
static_cast<bool>(
E->getLifetimeExtendedTemporaryDecl()));
2273 if (
E->getLifetimeExtendedTemporaryDecl())
2274 Record.AddDeclRef(
E->getLifetimeExtendedTemporaryDecl());
2276 Record.AddStmt(
E->getSubExpr());
2282 Record.AddSourceLocation(
E->LParenLoc);
2283 Record.AddSourceLocation(
E->EllipsisLoc);
2284 Record.AddSourceLocation(
E->RParenLoc);
2285 Record.push_back(
E->NumExpansions.toInternalRepresentation());
2286 Record.AddStmt(
E->SubExprs[0]);
2287 Record.AddStmt(
E->SubExprs[1]);
2288 Record.AddStmt(
E->SubExprs[2]);
2296 Record.push_back(InitExprs.size());
2297 Record.push_back(
E->getUserSpecifiedInitExprs().size());
2298 Record.AddSourceLocation(
E->getInitLoc());
2301 for (
Expr *InitExpr :
E->getInitExprs())
2302 Record.AddStmt(InitExpr);
2303 Expr *ArrayFiller =
E->getArrayFiller();
2304 FieldDecl *UnionField =
E->getInitializedFieldInUnion();
2305 bool HasArrayFillerOrUnionDecl = ArrayFiller || UnionField;
2306 Record.push_back(HasArrayFillerOrUnionDecl);
2307 if (HasArrayFillerOrUnionDecl) {
2308 Record.push_back(
static_cast<bool>(ArrayFiller));
2310 Record.AddStmt(ArrayFiller);
2312 Record.AddDeclRef(UnionField);
2319 Record.AddStmt(
E->getSourceExpr());
2320 Record.AddSourceLocation(
E->getLocation());
2321 Record.push_back(
E->isUnique());
2331 Record.AddStmt(
E->getConfig());
2338void ASTStmtWriter::VisitAsTypeExpr(
AsTypeExpr *
E) {
2340 Record.AddSourceLocation(
E->getBuiltinLoc());
2341 Record.AddSourceLocation(
E->getRParenLoc());
2342 Record.AddStmt(
E->getSrcExpr());
2351 Record.push_back(
E->isArrow());
2352 Record.AddStmt(
E->getBaseExpr());
2353 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2354 Record.AddSourceLocation(
E->getMemberLoc());
2355 Record.AddDeclRef(
E->getPropertyDecl());
2363 Record.AddSourceLocation(
E->getRBracketLoc());
2370 Record.AddDeclRef(
E->getGuidDecl());
2371 if (
E->isTypeOperand()) {
2372 Record.AddTypeSourceInfo(
E->getTypeOperandSourceInfo());
2375 Record.AddStmt(
E->getExprOperand());
2382 Record.AddSourceLocation(S->getExceptLoc());
2383 Record.AddStmt(S->getFilterExpr());
2384 Record.AddStmt(S->getBlock());
2390 Record.AddSourceLocation(S->getFinallyLoc());
2391 Record.AddStmt(S->getBlock());
2395void ASTStmtWriter::VisitSEHTryStmt(
SEHTryStmt *S) {
2397 Record.push_back(S->getIsCXXTry());
2398 Record.AddSourceLocation(S->getTryLoc());
2399 Record.AddStmt(S->getTryBlock());
2400 Record.AddStmt(S->getHandler());
2404void ASTStmtWriter::VisitSEHLeaveStmt(
SEHLeaveStmt *S) {
2406 Record.AddSourceLocation(S->getLeaveLoc());
2416 for (
Stmt *SubStmt : S->SubStmts)
2422 Record.writeOMPChildren(
E->Data);
2429 Record.writeUInt32(
D->getLoopsNumber());
2430 VisitOMPExecutableDirective(
D);
2434 VisitOMPLoopBasedDirective(
D);
2439 Record.push_back(
D->getNumClauses());
2440 VisitOMPExecutableDirective(
D);
2446 VisitOMPExecutableDirective(
D);
2447 Record.writeBool(
D->hasCancel());
2452 VisitOMPLoopDirective(
D);
2456void ASTStmtWriter::VisitOMPLoopTransformationDirective(
2458 VisitOMPLoopBasedDirective(
D);
2459 Record.writeUInt32(
D->getNumGeneratedLoops());
2463 VisitOMPLoopTransformationDirective(
D);
2468 VisitOMPLoopTransformationDirective(
D);
2473 VisitOMPLoopTransformationDirective(
D);
2478 VisitOMPLoopTransformationDirective(
D);
2483 VisitOMPLoopTransformationDirective(
D);
2488 VisitOMPLoopDirective(
D);
2489 Record.writeBool(
D->hasCancel());
2494 VisitOMPLoopDirective(
D);
2500 VisitOMPExecutableDirective(
D);
2501 Record.writeBool(
D->hasCancel());
2507 VisitOMPExecutableDirective(
D);
2508 Record.writeBool(
D->hasCancel());
2514 VisitOMPExecutableDirective(
D);
2520 VisitOMPExecutableDirective(
D);
2526 VisitOMPExecutableDirective(
D);
2532 VisitOMPExecutableDirective(
D);
2533 Record.AddDeclarationNameInfo(
D->getDirectiveName());
2538 VisitOMPLoopDirective(
D);
2539 Record.writeBool(
D->hasCancel());
2543void ASTStmtWriter::VisitOMPParallelForSimdDirective(
2545 VisitOMPLoopDirective(
D);
2549void ASTStmtWriter::VisitOMPParallelMasterDirective(
2552 VisitOMPExecutableDirective(
D);
2556void ASTStmtWriter::VisitOMPParallelMaskedDirective(
2559 VisitOMPExecutableDirective(
D);
2563void ASTStmtWriter::VisitOMPParallelSectionsDirective(
2566 VisitOMPExecutableDirective(
D);
2567 Record.writeBool(
D->hasCancel());
2573 VisitOMPExecutableDirective(
D);
2574 Record.writeBool(
D->hasCancel());
2580 VisitOMPExecutableDirective(
D);
2581 Record.writeBool(
D->isXLHSInRHSPart());
2582 Record.writeBool(
D->isPostfixUpdate());
2583 Record.writeBool(
D->isFailOnly());
2589 VisitOMPExecutableDirective(
D);
2595 VisitOMPExecutableDirective(
D);
2599void ASTStmtWriter::VisitOMPTargetEnterDataDirective(
2602 VisitOMPExecutableDirective(
D);
2606void ASTStmtWriter::VisitOMPTargetExitDataDirective(
2609 VisitOMPExecutableDirective(
D);
2613void ASTStmtWriter::VisitOMPTargetParallelDirective(
2616 VisitOMPExecutableDirective(
D);
2617 Record.writeBool(
D->hasCancel());
2621void ASTStmtWriter::VisitOMPTargetParallelForDirective(
2623 VisitOMPLoopDirective(
D);
2624 Record.writeBool(
D->hasCancel());
2630 VisitOMPExecutableDirective(
D);
2636 VisitOMPExecutableDirective(
D);
2642 Record.push_back(
D->getNumClauses());
2643 VisitOMPExecutableDirective(
D);
2649 VisitOMPExecutableDirective(
D);
2655 Record.push_back(
D->getNumClauses());
2656 VisitOMPExecutableDirective(
D);
2662 VisitOMPExecutableDirective(
D);
2668 VisitOMPExecutableDirective(
D);
2674 VisitOMPExecutableDirective(
D);
2680 VisitOMPExecutableDirective(
D);
2686 VisitOMPExecutableDirective(
D);
2692 VisitOMPExecutableDirective(
D);
2696void ASTStmtWriter::VisitOMPCancellationPointDirective(
2699 VisitOMPExecutableDirective(
D);
2700 Record.writeEnum(
D->getCancelRegion());
2706 VisitOMPExecutableDirective(
D);
2707 Record.writeEnum(
D->getCancelRegion());
2712 VisitOMPLoopDirective(
D);
2713 Record.writeBool(
D->hasCancel());
2718 VisitOMPLoopDirective(
D);
2722void ASTStmtWriter::VisitOMPMasterTaskLoopDirective(
2724 VisitOMPLoopDirective(
D);
2725 Record.writeBool(
D->hasCancel());
2729void ASTStmtWriter::VisitOMPMaskedTaskLoopDirective(
2731 VisitOMPLoopDirective(
D);
2732 Record.writeBool(
D->hasCancel());
2736void ASTStmtWriter::VisitOMPMasterTaskLoopSimdDirective(
2738 VisitOMPLoopDirective(
D);
2742void ASTStmtWriter::VisitOMPMaskedTaskLoopSimdDirective(
2744 VisitOMPLoopDirective(
D);
2748void ASTStmtWriter::VisitOMPParallelMasterTaskLoopDirective(
2750 VisitOMPLoopDirective(
D);
2751 Record.writeBool(
D->hasCancel());
2755void ASTStmtWriter::VisitOMPParallelMaskedTaskLoopDirective(
2757 VisitOMPLoopDirective(
D);
2758 Record.writeBool(
D->hasCancel());
2762void ASTStmtWriter::VisitOMPParallelMasterTaskLoopSimdDirective(
2764 VisitOMPLoopDirective(
D);
2768void ASTStmtWriter::VisitOMPParallelMaskedTaskLoopSimdDirective(
2770 VisitOMPLoopDirective(
D);
2775 VisitOMPLoopDirective(
D);
2781 VisitOMPExecutableDirective(
D);
2785void ASTStmtWriter::VisitOMPDistributeParallelForDirective(
2787 VisitOMPLoopDirective(
D);
2788 Record.writeBool(
D->hasCancel());
2792void ASTStmtWriter::VisitOMPDistributeParallelForSimdDirective(
2794 VisitOMPLoopDirective(
D);
2798void ASTStmtWriter::VisitOMPDistributeSimdDirective(
2800 VisitOMPLoopDirective(
D);
2804void ASTStmtWriter::VisitOMPTargetParallelForSimdDirective(
2806 VisitOMPLoopDirective(
D);
2811 VisitOMPLoopDirective(
D);
2815void ASTStmtWriter::VisitOMPTeamsDistributeDirective(
2817 VisitOMPLoopDirective(
D);
2821void ASTStmtWriter::VisitOMPTeamsDistributeSimdDirective(
2823 VisitOMPLoopDirective(
D);
2827void ASTStmtWriter::VisitOMPTeamsDistributeParallelForSimdDirective(
2829 VisitOMPLoopDirective(
D);
2833void ASTStmtWriter::VisitOMPTeamsDistributeParallelForDirective(
2835 VisitOMPLoopDirective(
D);
2836 Record.writeBool(
D->hasCancel());
2842 VisitOMPExecutableDirective(
D);
2846void ASTStmtWriter::VisitOMPTargetTeamsDistributeDirective(
2848 VisitOMPLoopDirective(
D);
2852void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForDirective(
2854 VisitOMPLoopDirective(
D);
2855 Record.writeBool(
D->hasCancel());
2859void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
2861 VisitOMPLoopDirective(
D);
2866void ASTStmtWriter::VisitOMPTargetTeamsDistributeSimdDirective(
2868 VisitOMPLoopDirective(
D);
2874 VisitOMPExecutableDirective(
D);
2880 VisitOMPExecutableDirective(
D);
2881 Record.AddSourceLocation(
D->getTargetCallLoc());
2887 VisitOMPExecutableDirective(
D);
2892 VisitOMPLoopDirective(
D);
2896void ASTStmtWriter::VisitOMPTeamsGenericLoopDirective(
2898 VisitOMPLoopDirective(
D);
2902void ASTStmtWriter::VisitOMPTargetTeamsGenericLoopDirective(
2904 VisitOMPLoopDirective(
D);
2905 Record.writeBool(
D->canBeParallelFor());
2909void ASTStmtWriter::VisitOMPParallelGenericLoopDirective(
2911 VisitOMPLoopDirective(
D);
2915void ASTStmtWriter::VisitOMPTargetParallelGenericLoopDirective(
2917 VisitOMPLoopDirective(
D);
2925 Record.push_back(S->clauses().size());
2926 Record.writeEnum(S->Kind);
2927 Record.AddSourceRange(S->Range);
2928 Record.AddSourceLocation(S->DirectiveLoc);
2929 Record.writeOpenACCClauseList(S->clauses());
2932void ASTStmtWriter::VisitOpenACCAssociatedStmtConstruct(
2934 VisitOpenACCConstructStmt(S);
2935 Record.AddStmt(S->getAssociatedStmt());
2940 VisitOpenACCAssociatedStmtConstruct(S);
2946 VisitOpenACCAssociatedStmtConstruct(S);
2947 Record.writeEnum(S->getParentComputeConstructKind());
2953 VisitOpenACCAssociatedStmtConstruct(S);
2959 VisitOpenACCAssociatedStmtConstruct(S);
2963void ASTStmtWriter::VisitOpenACCEnterDataConstruct(
2966 VisitOpenACCConstructStmt(S);
2972 VisitOpenACCConstructStmt(S);
2978 VisitOpenACCConstructStmt(S);
2984 VisitOpenACCConstructStmt(S);
2990 VisitOpenACCConstructStmt(S);
2996 VisitOpenACCConstructStmt(S);
3002 VisitOpenACCAssociatedStmtConstruct(S);
3008 Record.push_back(S->getExprs().size());
3009 VisitOpenACCConstructStmt(S);
3010 Record.AddSourceLocation(S->LParenLoc);
3011 Record.AddSourceLocation(S->RParenLoc);
3012 Record.AddSourceLocation(S->QueuesLoc);
3014 for(
Expr *
E : S->getExprs())
3022 VisitOpenACCConstructStmt(S);
3023 Record.writeEnum(S->getAtomicKind());
3024 Record.AddStmt(S->getAssociatedStmt());
3031 Record.push_back(S->getVarList().size());
3032 VisitOpenACCConstructStmt(S);
3033 Record.AddSourceRange(S->ParensLoc);
3034 Record.AddSourceLocation(S->ReadOnlyLoc);
3036 for (
Expr *
E : S->getVarList())
3047 Record.AddStmt(S->getOpaqueArgLValue());
3048 Record.AddStmt(S->getCastedTemporary());
3049 Record.AddStmt(S->getWritebackCast());
3050 Record.writeBool(S->isInOut());
3059 assert(!SwitchCaseIDs.contains(S) &&
"SwitchCase recorded twice");
3060 unsigned NextID = SwitchCaseIDs.size();
3061 SwitchCaseIDs[S] = NextID;
3066 assert(SwitchCaseIDs.contains(S) &&
"SwitchCase hasn't been seen yet");
3067 return SwitchCaseIDs[S];
3071 SwitchCaseIDs.clear();
3086 llvm::DenseMap<Stmt *, uint64_t>::iterator I = SubStmtEntries.find(S);
3087 if (I != SubStmtEntries.end()) {
3088 Record.push_back(I->second);
3094 assert(!ParentStmts.count(S) &&
"There is a Stmt cycle!");
3096 struct ParentStmtInserterRAII {
3098 llvm::DenseSet<Stmt *> &ParentStmts;
3100 ParentStmtInserterRAII(
Stmt *S, llvm::DenseSet<Stmt *> &ParentStmts)
3101 : S(S), ParentStmts(ParentStmts) {
3102 ParentStmts.insert(S);
3104 ~ParentStmtInserterRAII() {
3105 ParentStmts.erase(S);
3109 ParentStmtInserterRAII ParentStmtInserter(S, ParentStmts);
3115 SubStmtEntries[S] = Offset;
3120void ASTRecordWriter::FlushStmts() {
3123 assert(Writer->SubStmtEntries.empty() &&
"unexpected entries in sub-stmt map");
3124 assert(Writer->ParentStmts.empty() &&
"unexpected entries in parent stmt map");
3126 for (
unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
3127 Writer->WriteSubStmt(getASTContext(), StmtsToEmit[I]);
3129 assert(N == StmtsToEmit.size() &&
"record modified while being written!");
3136 Writer->SubStmtEntries.clear();
3137 Writer->ParentStmts.clear();
3140 StmtsToEmit.clear();
3143void ASTRecordWriter::FlushSubStmts() {
3147 for (
unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
3148 Writer->WriteSubStmt(getASTContext(), StmtsToEmit[N - I - 1]);
3149 assert(N == StmtsToEmit.size() &&
"record modified while being written!");
3152 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, init-capture pack, or binding pack that has been...
ValueDecl *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...
Base class for BreakStmt and ContinueStmt.
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 the '#pragma omp stripe' loop transformation 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.
SYCLKernelCallStmt represents the transformation that is applied to the body of a function declared w...
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
CXXFoldExprBitfields CXXFoldExprBits
PackIndexingExprBitfields PackIndexingExprBits
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.
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_SYCLKERNELCALL
A SYCLKernelCallStmt record.
@ STMT_OMP_TARGET_ENTER_DATA_DIRECTIVE
@ EXPR_CHARACTER_LITERAL
A CharacterLiteral record.
@ EXPR_OBJC_ENCODE
An ObjCEncodeExpr record.
@ STMT_OMP_PARALLEL_SECTIONS_DIRECTIVE
@ STMT_OMP_PARALLEL_FOR_DIRECTIVE
@ EXPR_CSTYLE_CAST
A CStyleCastExpr record.
@ STMT_OMP_PARALLEL_DIRECTIVE
@ EXPR_OBJC_BOXED_EXPRESSION
@ EXPR_OBJC_BOOL_LITERAL
An ObjCBoolLiteralExpr record.
@ EXPR_CXX_BIND_TEMPORARY
@ STMT_OMP_ATOMIC_DIRECTIVE
@ STMT_OPENACC_ATOMIC_CONSTRUCT
@ 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_OPENACC_CACHE_CONSTRUCT
@ STMT_OMP_TARGET_TEAMS_DISTRIBUTE_DIRECTIVE
@ EXPR_ARRAY_INIT_LOOP
An ArrayInitLoopExpr record.
@ STMT_OMP_PARALLEL_MASTER_TASKLOOP_DIRECTIVE
@ STMT_OMP_PARALLEL_MASKED_TASKLOOP_SIMD_DIRECTIVE
@ STMT_CONTINUE
A ContinueStmt record.
@ EXPR_PREDEFINED
A PredefinedExpr record.
@ EXPR_OPENACC_ASTERISK_SIZE
@ STMT_OMP_DEPOBJ_DIRECTIVE
@ EXPR_CXX_BOOL_LITERAL
A CXXBoolLiteralExpr record.
@ EXPR_PAREN_LIST
A ParenListExpr record.
@ EXPR_CXX_PAREN_LIST_INIT
A CXXParenListInitExpr record.
@ STMT_OMP_DISPATCH_DIRECTIVE
@ STMT_OMP_MASTER_TASKLOOP_SIMD_DIRECTIVE
@ STMT_OPENACC_DATA_CONSTRUCT
@ STMT_OMP_TASKLOOP_DIRECTIVE
@ STMT_COMPOUND
A CompoundStmt record.
@ STMT_OMP_CANONICAL_LOOP
@ STMT_FOR
A ForStmt record.
@ STMT_ATTRIBUTED
An AttributedStmt record.
@ STMT_OMP_PARALLEL_MASTER_DIRECTIVE
@ STMT_OPENACC_WAIT_CONSTRUCT
@ STMT_OMP_TARGET_TEAMS_GENERIC_LOOP_DIRECTIVE
@ STMT_OMP_TEAMS_DIRECTIVE
@ STMT_OMP_TARGET_PARALLEL_DIRECTIVE
@ EXPR_CXX_REWRITTEN_BINARY_OPERATOR
A CXXRewrittenBinaryOperator record.
@ STMT_GOTO
A GotoStmt record.
@ EXPR_NO_INIT
An NoInitExpr record.
@ EXPR_OBJC_ARRAY_LITERAL
@ STMT_OMP_ERROR_DIRECTIVE
@ EXPR_OBJC_PROTOCOL_EXPR
An ObjCProtocolExpr record.
@ STMT_OMP_GENERIC_LOOP_DIRECTIVE
@ EXPR_ARRAY_INIT_INDEX
An ArrayInitIndexExpr record.
@ STMT_OMP_TASK_DIRECTIVE
@ STMT_OPENACC_INIT_CONSTRUCT
@ EXPR_CXX_CONSTRUCT
A CXXConstructExpr record.
@ STMT_OMP_PARALLEL_MASKED_DIRECTIVE
@ STMT_OMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_DIRECTIVE
@ STMT_OPENACC_UPDATE_CONSTRUCT
@ STMT_OMP_PARALLEL_MASTER_TASKLOOP_SIMD_DIRECTIVE
@ EXPR_OBJC_DICTIONARY_LITERAL
@ STMT_OMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE
@ EXPR_CXX_DYNAMIC_CAST
A CXXDynamicCastExpr record.
@ STMT_CXX_TRY
A CXXTryStmt record.
@ EXPR_GENERIC_SELECTION
A GenericSelectionExpr record.
@ STMT_OMP_TARGET_SIMD_DIRECTIVE
@ EXPR_OBJC_INDIRECT_COPY_RESTORE
An ObjCIndirectCopyRestoreExpr record.
@ EXPR_CXX_INHERITED_CTOR_INIT
A CXXInheritedCtorInitExpr record.
@ EXPR_CALL
A CallExpr record.
@ EXPR_GNU_NULL
A GNUNullExpr record.
@ EXPR_BINARY_CONDITIONAL_OPERATOR
@ EXPR_OBJC_PROPERTY_REF_EXPR
An ObjCPropertyRefExpr record.
@ STMT_OMP_TARGET_PARALLEL_FOR_DIRECTIVE
@ STMT_OMP_FOR_SIMD_DIRECTIVE
@ STMT_OMP_MASKED_TASKLOOP_DIRECTIVE
@ EXPR_CXX_CONST_CAST
A CXXConstCastExpr record.
@ STMT_OMP_SCAN_DIRECTIVE
@ STMT_REF_PTR
A reference to a previously [de]serialized Stmt record.
@ EXPR_OBJC_MESSAGE_EXPR
An ObjCMessageExpr record.
@ EXPR_CXX_DEPENDENT_SCOPE_DECL_REF
@ STMT_OMP_TEAMS_DISTRIBUTE_DIRECTIVE
@ STMT_CASE
A CaseStmt record.
@ EXPR_CONSTANT
A constant expression context.
@ EXPR_FUNCTION_PARM_PACK
@ STMT_STOP
A marker record that indicates that we are at the end of an expression.
@ EXPR_CXX_NULL_PTR_LITERAL
@ STMT_OMP_TARGET_UPDATE_DIRECTIVE
@ STMT_MSASM
A MS-style AsmStmt record.
@ STMT_OMP_DISTRIBUTE_DIRECTIVE
@ EXPR_CONDITIONAL_OPERATOR
A ConditionOperator record.
@ EXPR_BINARY_OPERATOR
A BinaryOperator record.
@ EXPR_CXX_STD_INITIALIZER_LIST
A CXXStdInitializerListExpr record.
@ STMT_OMP_TASKGROUP_DIRECTIVE
@ STMT_OMP_REVERSE_DIRECTIVE
@ EXPR_SHUFFLE_VECTOR
A ShuffleVectorExpr record.
@ STMT_OBJC_FINALLY
An ObjCAtFinallyStmt record.
@ EXPR_OBJC_SELECTOR_EXPR
An ObjCSelectorExpr record.
@ EXPR_FLOATING_LITERAL
A FloatingLiteral record.
@ STMT_OMP_MASTER_DIRECTIVE
@ EXPR_CXX_DEPENDENT_SCOPE_MEMBER
@ STMT_NULL_PTR
A NULL expression.
@ STMP_OMP_STRIPE_DIRECTIVE
@ STMT_DEFAULT
A DefaultStmt record.
@ EXPR_CHOOSE
A ChooseExpr record.
@ STMT_OMP_UNROLL_DIRECTIVE
@ STMT_NULL
A NullStmt record.
@ STMT_OMP_SIMD_DIRECTIVE
@ EXPR_DECL_REF
A DeclRefExpr record.
@ STMT_OPENACC_LOOP_CONSTRUCT
@ EXPR_SUBST_NON_TYPE_TEMPLATE_PARM
@ EXPR_INIT_LIST
An InitListExpr record.
@ EXPR_IMPLICIT_VALUE_INIT
An ImplicitValueInitExpr record.
@ STMT_OBJC_AUTORELEASE_POOL
An ObjCAutoreleasePoolStmt record.
@ STMT_OPENACC_SET_CONSTRUCT
@ EXPR_RECOVERY
A RecoveryExpr record.
@ EXPR_PAREN
A ParenExpr record.
@ STMT_OMP_TARGET_PARALLEL_GENERIC_LOOP_DIRECTIVE
@ STMT_LABEL
A LabelStmt record.
@ EXPR_CXX_FUNCTIONAL_CAST
A CXXFunctionalCastExpr record.
@ EXPR_USER_DEFINED_LITERAL
A UserDefinedLiteral record.
@ EXPR_INTEGER_LITERAL
An IntegerLiteral record.
@ EXPR_SOURCE_LOC
A SourceLocExpr record.
@ EXPR_MATERIALIZE_TEMPORARY
@ EXPR_CXX_MEMBER_CALL
A CXXMemberCallExpr record.
@ STMT_OMP_INTEROP_DIRECTIVE
@ STMT_SWITCH
A SwitchStmt record.
@ STMT_DECL
A DeclStmt record.
@ EXPR_CXX_UNRESOLVED_MEMBER
@ 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.
bool isAlignedAllocation(AlignedAllocationMode Mode)
bool isTypeAwareAllocation(TypeAwareAllocationMode Mode)
@ 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 ...
AlignedAllocationMode PassAlignment
TypeAwareAllocationMode PassTypeIdentity
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 *.