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());
614 Record.AddStmt(S->getOriginalStmt());
615 Record.AddDeclRef(S->getOutlinedFunctionDecl());
620void ASTStmtWriter::VisitExpr(
Expr *
E) {
623 CurrentPackingBits.updateBits();
641 switch (
E->getResultStorageKind()) {
645 Record.push_back(
E->Int64Result());
648 Record.AddAPValue(
E->APValueResult());
652 Record.AddStmt(
E->getSubExpr());
658 Record.AddSourceLocation(
E->getLocation());
665 Record.AddSourceLocation(
E->getLocation());
666 Record.AddSourceLocation(
E->getLParenLocation());
667 Record.AddSourceLocation(
E->getRParenLocation());
668 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
676 bool HasFunctionName =
E->getFunctionName() !=
nullptr;
677 Record.push_back(HasFunctionName);
679 llvm::to_underlying(
E->getIdentKind()));
680 Record.push_back(
E->isTransparent());
681 Record.AddSourceLocation(
E->getLocation());
683 Record.AddStmt(
E->getFunctionName());
690 CurrentPackingBits.updateBits();
692 CurrentPackingBits.addBit(
E->hadMultipleCandidates());
693 CurrentPackingBits.addBit(
E->refersToEnclosingVariableOrCapture());
694 CurrentPackingBits.addBits(
E->isNonOdrUse(), 2);
695 CurrentPackingBits.addBit(
E->isImmediateEscalating());
696 CurrentPackingBits.addBit(
E->getDecl() !=
E->getFoundDecl());
697 CurrentPackingBits.addBit(
E->hasQualifier());
698 CurrentPackingBits.addBit(
E->hasTemplateKWAndArgsInfo());
700 if (
E->hasTemplateKWAndArgsInfo()) {
701 unsigned NumTemplateArgs =
E->getNumTemplateArgs();
702 Record.push_back(NumTemplateArgs);
707 if ((!
E->hasTemplateKWAndArgsInfo()) && (!
E->hasQualifier()) &&
708 (
E->getDecl() ==
E->getFoundDecl()) &&
713 if (
E->hasQualifier())
714 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
716 if (
E->getDecl() !=
E->getFoundDecl())
717 Record.AddDeclRef(
E->getFoundDecl());
719 if (
E->hasTemplateKWAndArgsInfo())
723 Record.AddDeclRef(
E->getDecl());
724 Record.AddSourceLocation(
E->getLocation());
725 Record.AddDeclarationNameLoc(
E->DNLoc,
E->getDecl()->getDeclName());
731 Record.AddSourceLocation(
E->getLocation());
732 Record.AddAPInt(
E->getValue());
734 if (
E->getValue().getBitWidth() == 32) {
743 Record.AddSourceLocation(
E->getLocation());
744 Record.push_back(
E->getScale());
745 Record.AddAPInt(
E->getValue());
751 Record.push_back(
E->getRawSemantics());
752 Record.push_back(
E->isExact());
753 Record.AddAPFloat(
E->getValue());
754 Record.AddSourceLocation(
E->getLocation());
760 Record.AddStmt(
E->getSubExpr());
768 Record.push_back(
E->getNumConcatenated());
769 Record.push_back(
E->getLength());
770 Record.push_back(
E->getCharByteWidth());
771 Record.push_back(llvm::to_underlying(
E->getKind()));
772 Record.push_back(
E->isPascal());
775 for (
unsigned I = 0, N =
E->getNumConcatenated(); I != N; ++I)
776 Record.AddSourceLocation(
E->getStrTokenLoc(I));
779 StringRef StrData =
E->getBytes();
780 for (
unsigned I = 0, N =
E->getByteLength(); I != N; ++I)
781 Record.push_back(StrData[I]);
788 Record.push_back(
E->getValue());
789 Record.AddSourceLocation(
E->getLocation());
790 Record.push_back(llvm::to_underlying(
E->getKind()));
797void ASTStmtWriter::VisitParenExpr(
ParenExpr *
E) {
799 Record.push_back(
E->isProducedByFoldExpansion());
800 Record.AddSourceLocation(
E->getLParen());
801 Record.AddSourceLocation(
E->getRParen());
802 Record.AddStmt(
E->getSubExpr());
808 Record.push_back(
E->getNumExprs());
809 for (
auto *SubStmt :
E->exprs())
811 Record.AddSourceLocation(
E->getLParenLoc());
812 Record.AddSourceLocation(
E->getRParenLoc());
818 bool HasFPFeatures =
E->hasStoredFPFeatures();
821 CurrentPackingBits.addBit(HasFPFeatures);
822 Record.AddStmt(
E->getSubExpr());
823 CurrentPackingBits.addBits(
E->getOpcode(),
825 Record.AddSourceLocation(
E->getOperatorLoc());
826 CurrentPackingBits.addBit(
E->canOverflow());
829 Record.push_back(
E->getStoredFPFeatures().getAsOpaqueInt());
835 Record.push_back(
E->getNumComponents());
836 Record.push_back(
E->getNumExpressions());
837 Record.AddSourceLocation(
E->getOperatorLoc());
838 Record.AddSourceLocation(
E->getRParenLoc());
839 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
840 for (
unsigned I = 0, N =
E->getNumComponents(); I != N; ++I) {
863 for (
unsigned I = 0, N =
E->getNumExpressions(); I != N; ++I)
864 Record.AddStmt(
E->getIndexExpr(I));
870 Record.push_back(
E->getKind());
871 if (
E->isArgumentType())
872 Record.AddTypeSourceInfo(
E->getArgumentTypeInfo());
875 Record.AddStmt(
E->getArgumentExpr());
877 Record.AddSourceLocation(
E->getOperatorLoc());
878 Record.AddSourceLocation(
E->getRParenLoc());
886 Record.AddSourceLocation(
E->getRBracketLoc());
893 Record.AddStmt(
E->getRowIdx());
894 Record.AddStmt(
E->getColumnIdx());
895 Record.AddSourceLocation(
E->getRBracketLoc());
903 Record.AddStmt(
E->getLowerBound());
904 Record.AddStmt(
E->getLength());
905 if (
E->isOMPArraySection())
906 Record.AddStmt(
E->getStride());
907 Record.AddSourceLocation(
E->getColonLocFirst());
909 if (
E->isOMPArraySection())
910 Record.AddSourceLocation(
E->getColonLocSecond());
912 Record.AddSourceLocation(
E->getRBracketLoc());
918 Record.push_back(
E->getDimensions().size());
920 for (
Expr *
Dim :
E->getDimensions())
923 Record.AddSourceRange(SR);
924 Record.AddSourceLocation(
E->getLParenLoc());
925 Record.AddSourceLocation(
E->getRParenLoc());
931 Record.push_back(
E->numOfIterators());
932 Record.AddSourceLocation(
E->getIteratorKwLoc());
933 Record.AddSourceLocation(
E->getLParenLoc());
934 Record.AddSourceLocation(
E->getRParenLoc());
935 for (
unsigned I = 0, End =
E->numOfIterators(); I < End; ++I) {
936 Record.AddDeclRef(
E->getIteratorDecl(I));
937 Record.AddSourceLocation(
E->getAssignLoc(I));
942 Record.AddSourceLocation(
E->getColonLoc(I));
944 Record.AddSourceLocation(
E->getSecondColonLoc(I));
955void ASTStmtWriter::VisitCallExpr(
CallExpr *
E) {
958 Record.push_back(
E->getNumArgs());
959 CurrentPackingBits.updateBits();
960 CurrentPackingBits.addBit(
static_cast<bool>(
E->getADLCallKind()));
961 CurrentPackingBits.addBit(
E->hasStoredFPFeatures());
963 Record.AddSourceLocation(
E->getRParenLoc());
964 Record.AddStmt(
E->getCallee());
966 Arg != ArgEnd; ++Arg)
969 if (
E->hasStoredFPFeatures())
970 Record.push_back(
E->getFPFeatures().getAsOpaqueInt());
972 if (!
E->hasStoredFPFeatures() && !
static_cast<bool>(
E->getADLCallKind()) &&
989void ASTStmtWriter::VisitMemberExpr(
MemberExpr *
E) {
992 bool HasQualifier =
E->hasQualifier();
993 bool HasFoundDecl =
E->hasFoundDecl();
994 bool HasTemplateInfo =
E->hasTemplateKWAndArgsInfo();
995 unsigned NumTemplateArgs =
E->getNumTemplateArgs();
999 CurrentPackingBits.updateBits();
1000 CurrentPackingBits.addBit(HasQualifier);
1001 CurrentPackingBits.addBit(HasFoundDecl);
1002 CurrentPackingBits.addBit(HasTemplateInfo);
1003 Record.push_back(NumTemplateArgs);
1006 Record.AddDeclRef(
E->getMemberDecl());
1007 Record.AddDeclarationNameLoc(
E->MemberDNLoc,
1008 E->getMemberDecl()->getDeclName());
1009 Record.AddSourceLocation(
E->getMemberLoc());
1010 CurrentPackingBits.addBit(
E->isArrow());
1011 CurrentPackingBits.addBit(
E->hadMultipleCandidates());
1012 CurrentPackingBits.addBits(
E->isNonOdrUse(), 2);
1013 Record.AddSourceLocation(
E->getOperatorLoc());
1016 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
1020 Record.AddDeclRef(FoundDecl.getDecl());
1021 CurrentPackingBits.addBits(FoundDecl.
getAccess(), 2);
1024 if (HasTemplateInfo)
1034 Record.AddSourceLocation(
E->getIsaMemberLoc());
1035 Record.AddSourceLocation(
E->getOpLoc());
1036 Record.push_back(
E->isArrow());
1043 Record.AddStmt(
E->getSubExpr());
1044 Record.push_back(
E->shouldCopy());
1049 VisitExplicitCastExpr(
E);
1050 Record.AddSourceLocation(
E->getLParenLoc());
1051 Record.AddSourceLocation(
E->getBridgeKeywordLoc());
1052 Record.push_back(
E->getBridgeKind());
1056void ASTStmtWriter::VisitCastExpr(
CastExpr *
E) {
1059 Record.push_back(
E->path_size());
1060 CurrentPackingBits.updateBits();
1062 CurrentPackingBits.addBits(
E->getCastKind(), 7);
1063 CurrentPackingBits.addBit(
E->hasStoredFPFeatures());
1064 Record.AddStmt(
E->getSubExpr());
1067 PI =
E->path_begin(), PE =
E->path_end(); PI != PE; ++PI)
1068 Record.AddCXXBaseSpecifier(**PI);
1070 if (
E->hasStoredFPFeatures())
1071 Record.push_back(
E->getFPFeatures().getAsOpaqueInt());
1079 CurrentPackingBits.updateBits();
1080 CurrentPackingBits.addBits(
E->getOpcode(), 6);
1081 bool HasFPFeatures =
E->hasStoredFPFeatures();
1082 CurrentPackingBits.addBit(HasFPFeatures);
1083 CurrentPackingBits.addBit(
E->hasExcludedOverflowPattern());
1086 Record.AddSourceLocation(
E->getOperatorLoc());
1088 Record.push_back(
E->getStoredFPFeatures().getAsOpaqueInt());
1098 VisitBinaryOperator(
E);
1099 Record.AddTypeRef(
E->getComputationLHSType());
1100 Record.AddTypeRef(
E->getComputationResultType());
1114 Record.AddSourceLocation(
E->getQuestionLoc());
1115 Record.AddSourceLocation(
E->getColonLoc());
1122 Record.AddStmt(
E->getOpaqueValue());
1123 Record.AddStmt(
E->getCommon());
1125 Record.AddStmt(
E->getTrueExpr());
1126 Record.AddStmt(
E->getFalseExpr());
1127 Record.AddSourceLocation(
E->getQuestionLoc());
1128 Record.AddSourceLocation(
E->getColonLoc());
1134 CurrentPackingBits.addBit(
E->isPartOfExplicitCast());
1136 if (
E->path_size() == 0 && !
E->hasStoredFPFeatures())
1144 Record.AddTypeSourceInfo(
E->getTypeInfoAsWritten());
1148 VisitExplicitCastExpr(
E);
1149 Record.AddSourceLocation(
E->getLParenLoc());
1150 Record.AddSourceLocation(
E->getRParenLoc());
1156 Record.AddSourceLocation(
E->getLParenLoc());
1157 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1158 Record.AddStmt(
E->getInitializer());
1159 Record.push_back(
E->isFileScope());
1166 Record.AddIdentifierRef(&
E->getAccessor());
1167 Record.AddSourceLocation(
E->getAccessorLoc());
1175 Record.AddStmt(
E->getSyntacticForm());
1176 Record.AddSourceLocation(
E->getLBraceLoc());
1177 Record.AddSourceLocation(
E->getRBraceLoc());
1178 bool isArrayFiller = isa<Expr *>(
E->ArrayFillerOrUnionFieldInit);
1179 Record.push_back(isArrayFiller);
1181 Record.AddStmt(
E->getArrayFiller());
1183 Record.AddDeclRef(
E->getInitializedFieldInUnion());
1184 Record.push_back(
E->hadArrayRangeDesignator());
1185 Record.push_back(
E->getNumInits());
1186 if (isArrayFiller) {
1189 Expr *filler =
E->getArrayFiller();
1190 for (
unsigned I = 0, N =
E->getNumInits(); I != N; ++I)
1191 Record.AddStmt(
E->getInit(I) != filler ?
E->getInit(I) :
nullptr);
1193 for (
unsigned I = 0, N =
E->getNumInits(); I != N; ++I)
1194 Record.AddStmt(
E->getInit(I));
1201 Record.push_back(
E->getNumSubExprs());
1202 for (
unsigned I = 0, N =
E->getNumSubExprs(); I != N; ++I)
1203 Record.AddStmt(
E->getSubExpr(I));
1204 Record.AddSourceLocation(
E->getEqualOrColonLoc());
1205 Record.push_back(
E->usesGNUSyntax());
1207 if (
D.isFieldDesignator()) {
1210 Record.AddDeclRef(Field);
1213 Record.AddIdentifierRef(
D.getFieldName());
1215 Record.AddSourceLocation(
D.getDotLoc());
1216 Record.AddSourceLocation(
D.getFieldLoc());
1217 }
else if (
D.isArrayDesignator()) {
1219 Record.push_back(
D.getArrayIndex());
1220 Record.AddSourceLocation(
D.getLBracketLoc());
1221 Record.AddSourceLocation(
D.getRBracketLoc());
1223 assert(
D.isArrayRangeDesignator() &&
"Unknown designator");
1225 Record.push_back(
D.getArrayIndex());
1226 Record.AddSourceLocation(
D.getLBracketLoc());
1227 Record.AddSourceLocation(
D.getEllipsisLoc());
1228 Record.AddSourceLocation(
D.getRBracketLoc());
1237 Record.AddStmt(
E->getUpdater());
1241void ASTStmtWriter::VisitNoInitExpr(
NoInitExpr *
E) {
1248 Record.AddStmt(
E->SubExprs[0]);
1249 Record.AddStmt(
E->SubExprs[1]);
1263void ASTStmtWriter::VisitVAArgExpr(
VAArgExpr *
E) {
1265 Record.AddStmt(
E->getSubExpr());
1266 Record.AddTypeSourceInfo(
E->getWrittenTypeInfo());
1267 Record.AddSourceLocation(
E->getBuiltinLoc());
1268 Record.AddSourceLocation(
E->getRParenLoc());
1269 Record.push_back(
E->isMicrosoftABI());
1275 Record.AddDeclRef(cast_or_null<Decl>(
E->getParentContext()));
1278 Record.push_back(llvm::to_underlying(
E->getIdentKind()));
1282void ASTStmtWriter::VisitEmbedExpr(
EmbedExpr *
E) {
1286 Record.AddStmt(
E->getDataStringLiteral());
1287 Record.writeUInt32(
E->getStartingElementPos());
1288 Record.writeUInt32(
E->getDataElementCount());
1294 Record.AddSourceLocation(
E->getAmpAmpLoc());
1295 Record.AddSourceLocation(
E->getLabelLoc());
1296 Record.AddDeclRef(
E->getLabel());
1300void ASTStmtWriter::VisitStmtExpr(
StmtExpr *
E) {
1302 Record.AddStmt(
E->getSubStmt());
1303 Record.AddSourceLocation(
E->getLParenLoc());
1304 Record.AddSourceLocation(
E->getRParenLoc());
1305 Record.push_back(
E->getTemplateDepth());
1309void ASTStmtWriter::VisitChooseExpr(
ChooseExpr *
E) {
1314 Record.AddSourceLocation(
E->getBuiltinLoc());
1315 Record.AddSourceLocation(
E->getRParenLoc());
1316 Record.push_back(
E->isConditionDependent() ?
false :
E->isConditionTrue());
1322 Record.AddSourceLocation(
E->getTokenLocation());
1328 Record.push_back(
E->getNumSubExprs());
1329 for (
unsigned I = 0, N =
E->getNumSubExprs(); I != N; ++I)
1330 Record.AddStmt(
E->getExpr(I));
1331 Record.AddSourceLocation(
E->getBuiltinLoc());
1332 Record.AddSourceLocation(
E->getRParenLoc());
1338 Record.AddSourceLocation(
E->getBuiltinLoc());
1339 Record.AddSourceLocation(
E->getRParenLoc());
1340 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1341 Record.AddStmt(
E->getSrcExpr());
1345void ASTStmtWriter::VisitBlockExpr(
BlockExpr *
E) {
1347 Record.AddDeclRef(
E->getBlockDecl());
1354 Record.push_back(
E->getNumAssocs());
1355 Record.push_back(
E->isExprPredicate());
1356 Record.push_back(
E->ResultIndex);
1357 Record.AddSourceLocation(
E->getGenericLoc());
1358 Record.AddSourceLocation(
E->getDefaultLoc());
1359 Record.AddSourceLocation(
E->getRParenLoc());
1361 Stmt **Stmts =
E->getTrailingObjects<
Stmt *>();
1365 for (
unsigned I = 0, N =
E->getNumAssocs() + 1; I < N; ++I)
1366 Record.AddStmt(Stmts[I]);
1369 for (
unsigned I = 0, N =
E->getNumAssocs(); I < N; ++I)
1370 Record.AddTypeSourceInfo(TSIs[I]);
1377 Record.push_back(
E->getNumSemanticExprs());
1381 unsigned result =
E->getResultExprIndex();
1383 Record.push_back(result);
1385 Record.AddStmt(
E->getSyntacticForm());
1387 i =
E->semantics_begin(), e =
E->semantics_end(); i != e; ++i) {
1393void ASTStmtWriter::VisitAtomicExpr(
AtomicExpr *
E) {
1396 for (
unsigned I = 0, N =
E->getNumSubExprs(); I != N; ++I)
1397 Record.AddStmt(
E->getSubExprs()[I]);
1398 Record.AddSourceLocation(
E->getBuiltinLoc());
1399 Record.AddSourceLocation(
E->getRParenLoc());
1409 Record.AddStmt(
E->getString());
1410 Record.AddSourceLocation(
E->getAtLoc());
1416 Record.AddStmt(
E->getSubExpr());
1417 Record.AddDeclRef(
E->getBoxingMethod());
1424 Record.push_back(
E->getNumElements());
1425 for (
unsigned i = 0; i <
E->getNumElements(); i++)
1426 Record.AddStmt(
E->getElement(i));
1427 Record.AddDeclRef(
E->getArrayWithObjectsMethod());
1434 Record.push_back(
E->getNumElements());
1435 Record.push_back(
E->HasPackExpansions);
1436 for (
unsigned i = 0; i <
E->getNumElements(); i++) {
1438 Record.AddStmt(Element.Key);
1439 Record.AddStmt(Element.Value);
1440 if (
E->HasPackExpansions) {
1441 Record.AddSourceLocation(Element.EllipsisLoc);
1442 unsigned NumExpansions = 0;
1443 if (Element.NumExpansions)
1444 NumExpansions = *Element.NumExpansions + 1;
1445 Record.push_back(NumExpansions);
1449 Record.AddDeclRef(
E->getDictWithObjectsMethod());
1456 Record.AddTypeSourceInfo(
E->getEncodedTypeSourceInfo());
1457 Record.AddSourceLocation(
E->getAtLoc());
1458 Record.AddSourceLocation(
E->getRParenLoc());
1464 Record.AddSelectorRef(
E->getSelector());
1465 Record.AddSourceLocation(
E->getAtLoc());
1466 Record.AddSourceLocation(
E->getRParenLoc());
1472 Record.AddDeclRef(
E->getProtocol());
1473 Record.AddSourceLocation(
E->getAtLoc());
1474 Record.AddSourceLocation(
E->ProtoLoc);
1475 Record.AddSourceLocation(
E->getRParenLoc());
1481 Record.AddDeclRef(
E->getDecl());
1482 Record.AddSourceLocation(
E->getLocation());
1483 Record.AddSourceLocation(
E->getOpLoc());
1485 Record.push_back(
E->isArrow());
1486 Record.push_back(
E->isFreeIvar());
1492 Record.push_back(
E->SetterAndMethodRefFlags.getInt());
1493 Record.push_back(
E->isImplicitProperty());
1494 if (
E->isImplicitProperty()) {
1495 Record.AddDeclRef(
E->getImplicitPropertyGetter());
1496 Record.AddDeclRef(
E->getImplicitPropertySetter());
1498 Record.AddDeclRef(
E->getExplicitProperty());
1500 Record.AddSourceLocation(
E->getLocation());
1501 Record.AddSourceLocation(
E->getReceiverLocation());
1502 if (
E->isObjectReceiver()) {
1505 }
else if (
E->isSuperReceiver()) {
1507 Record.AddTypeRef(
E->getSuperReceiverType());
1510 Record.AddDeclRef(
E->getClassReceiver());
1518 Record.AddSourceLocation(
E->getRBracket());
1519 Record.AddStmt(
E->getBaseExpr());
1520 Record.AddStmt(
E->getKeyExpr());
1521 Record.AddDeclRef(
E->getAtIndexMethodDecl());
1522 Record.AddDeclRef(
E->setAtIndexMethodDecl());
1529 Record.push_back(
E->getNumArgs());
1530 Record.push_back(
E->getNumStoredSelLocs());
1531 Record.push_back(
E->SelLocsKind);
1532 Record.push_back(
E->isDelegateInitCall());
1533 Record.push_back(
E->IsImplicit);
1534 Record.push_back((
unsigned)
E->getReceiverKind());
1535 switch (
E->getReceiverKind()) {
1537 Record.AddStmt(
E->getInstanceReceiver());
1541 Record.AddTypeSourceInfo(
E->getClassReceiverTypeInfo());
1546 Record.AddTypeRef(
E->getSuperType());
1547 Record.AddSourceLocation(
E->getSuperLoc());
1551 if (
E->getMethodDecl()) {
1553 Record.AddDeclRef(
E->getMethodDecl());
1556 Record.AddSelectorRef(
E->getSelector());
1559 Record.AddSourceLocation(
E->getLeftLoc());
1560 Record.AddSourceLocation(
E->getRightLoc());
1563 Arg != ArgEnd; ++Arg)
1567 for (
unsigned i = 0, e =
E->getNumStoredSelLocs(); i != e; ++i)
1568 Record.AddSourceLocation(Locs[i]);
1575 Record.AddStmt(S->getElement());
1576 Record.AddStmt(S->getCollection());
1577 Record.AddStmt(S->getBody());
1578 Record.AddSourceLocation(S->getForLoc());
1579 Record.AddSourceLocation(S->getRParenLoc());
1585 Record.AddStmt(S->getCatchBody());
1586 Record.AddDeclRef(S->getCatchParamDecl());
1587 Record.AddSourceLocation(S->getAtCatchLoc());
1588 Record.AddSourceLocation(S->getRParenLoc());
1594 Record.AddStmt(S->getFinallyBody());
1595 Record.AddSourceLocation(S->getAtFinallyLoc());
1601 Record.AddStmt(S->getSubStmt());
1602 Record.AddSourceLocation(S->getAtLoc());
1608 Record.push_back(S->getNumCatchStmts());
1609 Record.push_back(S->getFinallyStmt() !=
nullptr);
1610 Record.AddStmt(S->getTryBody());
1613 if (S->getFinallyStmt())
1614 Record.AddStmt(S->getFinallyStmt());
1615 Record.AddSourceLocation(S->getAtTryLoc());
1621 Record.AddStmt(S->getSynchExpr());
1622 Record.AddStmt(S->getSynchBody());
1623 Record.AddSourceLocation(S->getAtSynchronizedLoc());
1629 Record.AddStmt(S->getThrowExpr());
1630 Record.AddSourceLocation(S->getThrowLoc());
1636 Record.push_back(
E->getValue());
1637 Record.AddSourceLocation(
E->getLocation());
1644 Record.AddVersionTuple(
E->getVersion());
1652void ASTStmtWriter::VisitCXXCatchStmt(
CXXCatchStmt *S) {
1654 Record.AddSourceLocation(S->getCatchLoc());
1655 Record.AddDeclRef(S->getExceptionDecl());
1656 Record.AddStmt(S->getHandlerBlock());
1660void ASTStmtWriter::VisitCXXTryStmt(
CXXTryStmt *S) {
1662 Record.push_back(S->getNumHandlers());
1663 Record.AddSourceLocation(S->getTryLoc());
1664 Record.AddStmt(S->getTryBlock());
1665 for (
unsigned i = 0, e = S->getNumHandlers(); i != e; ++i)
1666 Record.AddStmt(S->getHandler(i));
1672 Record.AddSourceLocation(S->getForLoc());
1673 Record.AddSourceLocation(S->getCoawaitLoc());
1674 Record.AddSourceLocation(S->getColonLoc());
1675 Record.AddSourceLocation(S->getRParenLoc());
1676 Record.AddStmt(S->getInit());
1677 Record.AddStmt(S->getRangeStmt());
1678 Record.AddStmt(S->getBeginStmt());
1679 Record.AddStmt(S->getEndStmt());
1680 Record.AddStmt(S->getCond());
1681 Record.AddStmt(S->getInc());
1682 Record.AddStmt(S->getLoopVarStmt());
1683 Record.AddStmt(S->getBody());
1689 Record.AddSourceLocation(S->getKeywordLoc());
1690 Record.push_back(S->isIfExists());
1691 Record.AddNestedNameSpecifierLoc(S->getQualifierLoc());
1692 Record.AddDeclarationNameInfo(S->getNameInfo());
1693 Record.AddStmt(S->getSubStmt());
1699 Record.push_back(
E->getOperator());
1700 Record.AddSourceRange(
E->Range);
1702 if (!
E->hasStoredFPFeatures() && !
static_cast<bool>(
E->getADLCallKind()))
1711 if (!
E->hasStoredFPFeatures() && !
static_cast<bool>(
E->getADLCallKind()))
1717void ASTStmtWriter::VisitCXXRewrittenBinaryOperator(
1720 Record.push_back(
E->isReversed());
1721 Record.AddStmt(
E->getSemanticForm());
1728 Record.push_back(
E->getNumArgs());
1729 Record.push_back(
E->isElidable());
1730 Record.push_back(
E->hadMultipleCandidates());
1731 Record.push_back(
E->isListInitialization());
1732 Record.push_back(
E->isStdInitListInitialization());
1733 Record.push_back(
E->requiresZeroInitialization());
1735 llvm::to_underlying(
E->getConstructionKind()));
1736 Record.push_back(
E->isImmediateEscalating());
1737 Record.AddSourceLocation(
E->getLocation());
1738 Record.AddDeclRef(
E->getConstructor());
1739 Record.AddSourceRange(
E->getParenOrBraceRange());
1741 for (
unsigned I = 0, N =
E->getNumArgs(); I != N; ++I)
1749 Record.AddDeclRef(
E->getConstructor());
1750 Record.AddSourceLocation(
E->getLocation());
1751 Record.push_back(
E->constructsVBase());
1752 Record.push_back(
E->inheritedFromVBase());
1757 VisitCXXConstructExpr(
E);
1758 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1762void ASTStmtWriter::VisitLambdaExpr(
LambdaExpr *
E) {
1765 Record.AddSourceRange(
E->IntroducerRange);
1767 Record.AddSourceLocation(
E->CaptureDefaultLoc);
1770 Record.AddSourceLocation(
E->ClosingBrace);
1774 CEnd =
E->capture_init_end();
1787 Record.AddStmt(
E->getSubExpr());
1792 VisitExplicitCastExpr(
E);
1794 CurrentPackingBits.addBit(
E->getAngleBrackets().isValid());
1795 if (
E->getAngleBrackets().isValid())
1796 Record.AddSourceRange(
E->getAngleBrackets());
1800 VisitCXXNamedCastExpr(
E);
1805 VisitCXXNamedCastExpr(
E);
1810 VisitCXXNamedCastExpr(
E);
1815 VisitCXXNamedCastExpr(
E);
1820 VisitCXXNamedCastExpr(
E);
1825 VisitExplicitCastExpr(
E);
1826 Record.AddSourceLocation(
E->getLParenLoc());
1827 Record.AddSourceLocation(
E->getRParenLoc());
1832 VisitExplicitCastExpr(
E);
1840 Record.AddSourceLocation(
E->UDSuffixLoc);
1846 Record.push_back(
E->getValue());
1847 Record.AddSourceLocation(
E->getLocation());
1853 Record.AddSourceLocation(
E->getLocation());
1860 if (
E->isTypeOperand()) {
1861 Record.AddTypeSourceInfo(
E->getTypeOperandSourceInfo());
1864 Record.AddStmt(
E->getExprOperand());
1871 Record.AddSourceLocation(
E->getLocation());
1872 Record.push_back(
E->isImplicit());
1873 Record.push_back(
E->isCapturedByCopyInLambdaWithExplicitObjectParameter());
1880 Record.AddSourceLocation(
E->getThrowLoc());
1881 Record.AddStmt(
E->getSubExpr());
1882 Record.push_back(
E->isThrownVariableInScope());
1888 Record.AddDeclRef(
E->getParam());
1889 Record.AddDeclRef(cast_or_null<Decl>(
E->getUsedContext()));
1890 Record.AddSourceLocation(
E->getUsedLocation());
1891 Record.push_back(
E->hasRewrittenInit());
1892 if (
E->hasRewrittenInit())
1893 Record.AddStmt(
E->getRewrittenExpr());
1899 Record.push_back(
E->hasRewrittenInit());
1900 Record.AddDeclRef(
E->getField());
1901 Record.AddDeclRef(cast_or_null<Decl>(
E->getUsedContext()));
1903 if (
E->hasRewrittenInit())
1904 Record.AddStmt(
E->getRewrittenExpr());
1910 Record.AddCXXTemporary(
E->getTemporary());
1911 Record.AddStmt(
E->getSubExpr());
1917 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
1918 Record.AddSourceLocation(
E->getRParenLoc());
1922void ASTStmtWriter::VisitCXXNewExpr(
CXXNewExpr *
E) {
1925 Record.push_back(
E->isArray());
1926 Record.push_back(
E->hasInitializer());
1927 Record.push_back(
E->getNumPlacementArgs());
1928 Record.push_back(
E->isParenTypeId());
1930 Record.push_back(
E->isGlobalNew());
1931 Record.push_back(
E->passAlignment());
1932 Record.push_back(
E->doesUsualArrayDeleteWantSize());
1936 Record.AddDeclRef(
E->getOperatorNew());
1937 Record.AddDeclRef(
E->getOperatorDelete());
1938 Record.AddTypeSourceInfo(
E->getAllocatedTypeSourceInfo());
1939 if (
E->isParenTypeId())
1940 Record.AddSourceRange(
E->getTypeIdParens());
1942 Record.AddSourceRange(
E->getDirectInitRange());
1953 Record.push_back(
E->isGlobalDelete());
1954 Record.push_back(
E->isArrayForm());
1955 Record.push_back(
E->isArrayFormAsWritten());
1956 Record.push_back(
E->doesUsualArrayDeleteWantSize());
1957 Record.AddDeclRef(
E->getOperatorDelete());
1958 Record.AddStmt(
E->getArgument());
1968 Record.push_back(
E->isArrow());
1969 Record.AddSourceLocation(
E->getOperatorLoc());
1970 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
1971 Record.AddTypeSourceInfo(
E->getScopeTypeInfo());
1972 Record.AddSourceLocation(
E->getColonColonLoc());
1973 Record.AddSourceLocation(
E->getTildeLoc());
1976 Record.AddIdentifierRef(
E->getDestroyedTypeIdentifier());
1977 if (
E->getDestroyedTypeIdentifier())
1978 Record.AddSourceLocation(
E->getDestroyedTypeLoc());
1980 Record.AddTypeSourceInfo(
E->getDestroyedTypeInfo());
1987 Record.push_back(
E->getNumObjects());
1988 for (
auto &Obj :
E->getObjects()) {
1989 if (
auto *BD = Obj.dyn_cast<
BlockDecl *>()) {
1998 Record.push_back(
E->cleanupsHaveSideEffects());
1999 Record.AddStmt(
E->getSubExpr());
2003void ASTStmtWriter::VisitCXXDependentScopeMemberExpr(
2009 Record.push_back(
E->getNumTemplateArgs());
2010 CurrentPackingBits.updateBits();
2011 CurrentPackingBits.addBit(
E->hasTemplateKWAndArgsInfo());
2012 CurrentPackingBits.addBit(
E->hasFirstQualifierFoundInScope());
2014 if (
E->hasTemplateKWAndArgsInfo()) {
2021 CurrentPackingBits.addBit(
E->isArrow());
2023 Record.AddTypeRef(
E->getBaseType());
2024 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2025 CurrentPackingBits.addBit(!
E->isImplicitAccess());
2026 if (!
E->isImplicitAccess())
2029 Record.AddSourceLocation(
E->getOperatorLoc());
2031 if (
E->hasFirstQualifierFoundInScope())
2032 Record.AddDeclRef(
E->getFirstQualifierFoundInScope());
2034 Record.AddDeclarationNameInfo(
E->MemberNameInfo);
2044 CurrentPackingBits.addBit(
2056 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2057 Record.AddDeclarationNameInfo(
E->NameInfo);
2064 Record.push_back(
E->getNumArgs());
2066 ArgI =
E->arg_begin(), ArgE =
E->arg_end(); ArgI != ArgE; ++ArgI)
2068 Record.AddTypeSourceInfo(
E->getTypeSourceInfo());
2069 Record.AddSourceLocation(
E->getLParenLoc());
2070 Record.AddSourceLocation(
E->getRParenLoc());
2071 Record.push_back(
E->isListInitialization());
2078 Record.push_back(
E->getNumDecls());
2080 CurrentPackingBits.updateBits();
2081 CurrentPackingBits.addBit(
E->hasTemplateKWAndArgsInfo());
2082 if (
E->hasTemplateKWAndArgsInfo()) {
2084 *
E->getTrailingASTTemplateKWAndArgsInfo();
2090 OvE =
E->decls_end();
2091 OvI != OvE; ++OvI) {
2092 Record.AddDeclRef(OvI.getDecl());
2093 Record.push_back(OvI.getAccess());
2096 Record.AddDeclarationNameInfo(
E->getNameInfo());
2097 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2101 VisitOverloadExpr(
E);
2102 CurrentPackingBits.addBit(
E->isArrow());
2103 CurrentPackingBits.addBit(
E->hasUnresolvedUsing());
2104 CurrentPackingBits.addBit(!
E->isImplicitAccess());
2105 if (!
E->isImplicitAccess())
2108 Record.AddSourceLocation(
E->getOperatorLoc());
2110 Record.AddTypeRef(
E->getBaseType());
2115 VisitOverloadExpr(
E);
2116 CurrentPackingBits.addBit(
E->requiresADL());
2117 Record.AddDeclRef(
E->getNamingClass());
2125 Record.getASTContext().getTranslationUnitDecl()->lookup(Name))
2126 if (
Found->isFromASTFile())
2131 for (
auto *NS : ExternalNSs)
2132 for (
auto *
Found : NS->lookup(Name))
2143 for (
unsigned I = 0, N =
E->getNumArgs(); I != N; ++I)
2144 Record.AddTypeSourceInfo(
E->getArg(I));
2150 Record.push_back(
E->getTrait());
2151 Record.push_back(
E->getValue());
2153 Record.AddTypeSourceInfo(
E->getQueriedTypeSourceInfo());
2154 Record.AddStmt(
E->getDimensionExpression());
2160 Record.push_back(
E->getTrait());
2161 Record.push_back(
E->getValue());
2163 Record.AddStmt(
E->getQueriedExpression());
2169 Record.push_back(
E->getValue());
2171 Record.AddStmt(
E->getOperand());
2177 Record.AddSourceLocation(
E->getEllipsisLoc());
2178 Record.push_back(
E->NumExpansions);
2179 Record.AddStmt(
E->getPattern());
2185 Record.push_back(
E->isPartiallySubstituted() ?
E->getPartialArguments().size()
2187 Record.AddSourceLocation(
E->OperatorLoc);
2188 Record.AddSourceLocation(
E->PackLoc);
2189 Record.AddSourceLocation(
E->RParenLoc);
2191 if (
E->isPartiallySubstituted()) {
2192 for (
const auto &TA :
E->getPartialArguments())
2193 Record.AddTemplateArgument(TA);
2195 Record.push_back(
E->getPackLength());
2202 Record.push_back(
E->TransformedExpressions);
2203 Record.push_back(
E->FullySubstituted);
2204 Record.AddSourceLocation(
E->getEllipsisLoc());
2205 Record.AddSourceLocation(
E->getRSquareLoc());
2206 Record.AddStmt(
E->getPackIdExpression());
2207 Record.AddStmt(
E->getIndexExpr());
2208 for (
Expr *Sub :
E->getExpressions())
2213void ASTStmtWriter::VisitSubstNonTypeTemplateParmExpr(
2216 Record.AddDeclRef(
E->getAssociatedDecl());
2217 CurrentPackingBits.addBit(
E->isReferenceParameter());
2218 CurrentPackingBits.addBits(
E->getIndex(), 12);
2219 CurrentPackingBits.addBit((
bool)
E->getPackIndex());
2220 if (
auto PackIndex =
E->getPackIndex())
2221 Record.push_back(*PackIndex + 1);
2223 Record.AddSourceLocation(
E->getNameLoc());
2224 Record.AddStmt(
E->getReplacement());
2228void ASTStmtWriter::VisitSubstNonTypeTemplateParmPackExpr(
2231 Record.AddDeclRef(
E->getAssociatedDecl());
2232 Record.push_back(
E->getIndex());
2233 Record.AddTemplateArgument(
E->getArgumentPack());
2234 Record.AddSourceLocation(
E->getParameterPackLocation());
2240 Record.push_back(
E->getNumExpansions());
2241 Record.AddDeclRef(
E->getParameterPack());
2242 Record.AddSourceLocation(
E->getParameterPackLocation());
2251 Record.push_back(
static_cast<bool>(
E->getLifetimeExtendedTemporaryDecl()));
2252 if (
E->getLifetimeExtendedTemporaryDecl())
2253 Record.AddDeclRef(
E->getLifetimeExtendedTemporaryDecl());
2255 Record.AddStmt(
E->getSubExpr());
2261 Record.AddSourceLocation(
E->LParenLoc);
2262 Record.AddSourceLocation(
E->EllipsisLoc);
2263 Record.AddSourceLocation(
E->RParenLoc);
2264 Record.push_back(
E->NumExpansions);
2265 Record.AddStmt(
E->SubExprs[0]);
2266 Record.AddStmt(
E->SubExprs[1]);
2267 Record.AddStmt(
E->SubExprs[2]);
2275 Record.push_back(InitExprs.size());
2276 Record.push_back(
E->getUserSpecifiedInitExprs().size());
2277 Record.AddSourceLocation(
E->getInitLoc());
2280 for (
Expr *InitExpr :
E->getInitExprs())
2281 Record.AddStmt(InitExpr);
2282 Expr *ArrayFiller =
E->getArrayFiller();
2283 FieldDecl *UnionField =
E->getInitializedFieldInUnion();
2284 bool HasArrayFillerOrUnionDecl = ArrayFiller || UnionField;
2285 Record.push_back(HasArrayFillerOrUnionDecl);
2286 if (HasArrayFillerOrUnionDecl) {
2287 Record.push_back(
static_cast<bool>(ArrayFiller));
2289 Record.AddStmt(ArrayFiller);
2291 Record.AddDeclRef(UnionField);
2298 Record.AddStmt(
E->getSourceExpr());
2299 Record.AddSourceLocation(
E->getLocation());
2300 Record.push_back(
E->isUnique());
2304void ASTStmtWriter::VisitTypoExpr(
TypoExpr *
E) {
2307 llvm_unreachable(
"Cannot write TypoExpr nodes");
2316 Record.AddStmt(
E->getConfig());
2323void ASTStmtWriter::VisitAsTypeExpr(
AsTypeExpr *
E) {
2325 Record.AddSourceLocation(
E->getBuiltinLoc());
2326 Record.AddSourceLocation(
E->getRParenLoc());
2327 Record.AddStmt(
E->getSrcExpr());
2336 Record.push_back(
E->isArrow());
2337 Record.AddStmt(
E->getBaseExpr());
2338 Record.AddNestedNameSpecifierLoc(
E->getQualifierLoc());
2339 Record.AddSourceLocation(
E->getMemberLoc());
2340 Record.AddDeclRef(
E->getPropertyDecl());
2348 Record.AddSourceLocation(
E->getRBracketLoc());
2355 Record.AddDeclRef(
E->getGuidDecl());
2356 if (
E->isTypeOperand()) {
2357 Record.AddTypeSourceInfo(
E->getTypeOperandSourceInfo());
2360 Record.AddStmt(
E->getExprOperand());
2367 Record.AddSourceLocation(S->getExceptLoc());
2368 Record.AddStmt(S->getFilterExpr());
2369 Record.AddStmt(S->getBlock());
2375 Record.AddSourceLocation(S->getFinallyLoc());
2376 Record.AddStmt(S->getBlock());
2380void ASTStmtWriter::VisitSEHTryStmt(
SEHTryStmt *S) {
2382 Record.push_back(S->getIsCXXTry());
2383 Record.AddSourceLocation(S->getTryLoc());
2384 Record.AddStmt(S->getTryBlock());
2385 Record.AddStmt(S->getHandler());
2389void ASTStmtWriter::VisitSEHLeaveStmt(
SEHLeaveStmt *S) {
2391 Record.AddSourceLocation(S->getLeaveLoc());
2401 for (
Stmt *SubStmt : S->SubStmts)
2407 Record.writeOMPChildren(
E->Data);
2414 Record.writeUInt32(
D->getLoopsNumber());
2415 VisitOMPExecutableDirective(
D);
2419 VisitOMPLoopBasedDirective(
D);
2424 Record.push_back(
D->getNumClauses());
2425 VisitOMPExecutableDirective(
D);
2431 VisitOMPExecutableDirective(
D);
2432 Record.writeBool(
D->hasCancel());
2437 VisitOMPLoopDirective(
D);
2441void ASTStmtWriter::VisitOMPLoopTransformationDirective(
2443 VisitOMPLoopBasedDirective(
D);
2444 Record.writeUInt32(
D->getNumGeneratedLoops());
2448 VisitOMPLoopTransformationDirective(
D);
2453 VisitOMPLoopTransformationDirective(
D);
2458 VisitOMPLoopTransformationDirective(
D);
2463 VisitOMPLoopTransformationDirective(
D);
2468 VisitOMPLoopDirective(
D);
2469 Record.writeBool(
D->hasCancel());
2474 VisitOMPLoopDirective(
D);
2480 VisitOMPExecutableDirective(
D);
2481 Record.writeBool(
D->hasCancel());
2487 VisitOMPExecutableDirective(
D);
2488 Record.writeBool(
D->hasCancel());
2494 VisitOMPExecutableDirective(
D);
2500 VisitOMPExecutableDirective(
D);
2506 VisitOMPExecutableDirective(
D);
2512 VisitOMPExecutableDirective(
D);
2513 Record.AddDeclarationNameInfo(
D->getDirectiveName());
2518 VisitOMPLoopDirective(
D);
2519 Record.writeBool(
D->hasCancel());
2523void ASTStmtWriter::VisitOMPParallelForSimdDirective(
2525 VisitOMPLoopDirective(
D);
2529void ASTStmtWriter::VisitOMPParallelMasterDirective(
2532 VisitOMPExecutableDirective(
D);
2536void ASTStmtWriter::VisitOMPParallelMaskedDirective(
2539 VisitOMPExecutableDirective(
D);
2543void ASTStmtWriter::VisitOMPParallelSectionsDirective(
2546 VisitOMPExecutableDirective(
D);
2547 Record.writeBool(
D->hasCancel());
2553 VisitOMPExecutableDirective(
D);
2554 Record.writeBool(
D->hasCancel());
2560 VisitOMPExecutableDirective(
D);
2561 Record.writeBool(
D->isXLHSInRHSPart());
2562 Record.writeBool(
D->isPostfixUpdate());
2563 Record.writeBool(
D->isFailOnly());
2569 VisitOMPExecutableDirective(
D);
2575 VisitOMPExecutableDirective(
D);
2579void ASTStmtWriter::VisitOMPTargetEnterDataDirective(
2582 VisitOMPExecutableDirective(
D);
2586void ASTStmtWriter::VisitOMPTargetExitDataDirective(
2589 VisitOMPExecutableDirective(
D);
2593void ASTStmtWriter::VisitOMPTargetParallelDirective(
2596 VisitOMPExecutableDirective(
D);
2597 Record.writeBool(
D->hasCancel());
2601void ASTStmtWriter::VisitOMPTargetParallelForDirective(
2603 VisitOMPLoopDirective(
D);
2604 Record.writeBool(
D->hasCancel());
2610 VisitOMPExecutableDirective(
D);
2616 VisitOMPExecutableDirective(
D);
2622 Record.push_back(
D->getNumClauses());
2623 VisitOMPExecutableDirective(
D);
2629 VisitOMPExecutableDirective(
D);
2635 Record.push_back(
D->getNumClauses());
2636 VisitOMPExecutableDirective(
D);
2642 VisitOMPExecutableDirective(
D);
2648 VisitOMPExecutableDirective(
D);
2654 VisitOMPExecutableDirective(
D);
2660 VisitOMPExecutableDirective(
D);
2666 VisitOMPExecutableDirective(
D);
2672 VisitOMPExecutableDirective(
D);
2676void ASTStmtWriter::VisitOMPCancellationPointDirective(
2679 VisitOMPExecutableDirective(
D);
2680 Record.writeEnum(
D->getCancelRegion());
2686 VisitOMPExecutableDirective(
D);
2687 Record.writeEnum(
D->getCancelRegion());
2692 VisitOMPLoopDirective(
D);
2693 Record.writeBool(
D->hasCancel());
2698 VisitOMPLoopDirective(
D);
2702void ASTStmtWriter::VisitOMPMasterTaskLoopDirective(
2704 VisitOMPLoopDirective(
D);
2705 Record.writeBool(
D->hasCancel());
2709void ASTStmtWriter::VisitOMPMaskedTaskLoopDirective(
2711 VisitOMPLoopDirective(
D);
2712 Record.writeBool(
D->hasCancel());
2716void ASTStmtWriter::VisitOMPMasterTaskLoopSimdDirective(
2718 VisitOMPLoopDirective(
D);
2722void ASTStmtWriter::VisitOMPMaskedTaskLoopSimdDirective(
2724 VisitOMPLoopDirective(
D);
2728void ASTStmtWriter::VisitOMPParallelMasterTaskLoopDirective(
2730 VisitOMPLoopDirective(
D);
2731 Record.writeBool(
D->hasCancel());
2735void ASTStmtWriter::VisitOMPParallelMaskedTaskLoopDirective(
2737 VisitOMPLoopDirective(
D);
2738 Record.writeBool(
D->hasCancel());
2742void ASTStmtWriter::VisitOMPParallelMasterTaskLoopSimdDirective(
2744 VisitOMPLoopDirective(
D);
2748void ASTStmtWriter::VisitOMPParallelMaskedTaskLoopSimdDirective(
2750 VisitOMPLoopDirective(
D);
2755 VisitOMPLoopDirective(
D);
2761 VisitOMPExecutableDirective(
D);
2765void ASTStmtWriter::VisitOMPDistributeParallelForDirective(
2767 VisitOMPLoopDirective(
D);
2768 Record.writeBool(
D->hasCancel());
2772void ASTStmtWriter::VisitOMPDistributeParallelForSimdDirective(
2774 VisitOMPLoopDirective(
D);
2778void ASTStmtWriter::VisitOMPDistributeSimdDirective(
2780 VisitOMPLoopDirective(
D);
2784void ASTStmtWriter::VisitOMPTargetParallelForSimdDirective(
2786 VisitOMPLoopDirective(
D);
2791 VisitOMPLoopDirective(
D);
2795void ASTStmtWriter::VisitOMPTeamsDistributeDirective(
2797 VisitOMPLoopDirective(
D);
2801void ASTStmtWriter::VisitOMPTeamsDistributeSimdDirective(
2803 VisitOMPLoopDirective(
D);
2807void ASTStmtWriter::VisitOMPTeamsDistributeParallelForSimdDirective(
2809 VisitOMPLoopDirective(
D);
2813void ASTStmtWriter::VisitOMPTeamsDistributeParallelForDirective(
2815 VisitOMPLoopDirective(
D);
2816 Record.writeBool(
D->hasCancel());
2822 VisitOMPExecutableDirective(
D);
2826void ASTStmtWriter::VisitOMPTargetTeamsDistributeDirective(
2828 VisitOMPLoopDirective(
D);
2832void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForDirective(
2834 VisitOMPLoopDirective(
D);
2835 Record.writeBool(
D->hasCancel());
2839void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
2841 VisitOMPLoopDirective(
D);
2846void ASTStmtWriter::VisitOMPTargetTeamsDistributeSimdDirective(
2848 VisitOMPLoopDirective(
D);
2854 VisitOMPExecutableDirective(
D);
2860 VisitOMPExecutableDirective(
D);
2861 Record.AddSourceLocation(
D->getTargetCallLoc());
2867 VisitOMPExecutableDirective(
D);
2872 VisitOMPLoopDirective(
D);
2876void ASTStmtWriter::VisitOMPTeamsGenericLoopDirective(
2878 VisitOMPLoopDirective(
D);
2882void ASTStmtWriter::VisitOMPTargetTeamsGenericLoopDirective(
2884 VisitOMPLoopDirective(
D);
2885 Record.writeBool(
D->canBeParallelFor());
2889void ASTStmtWriter::VisitOMPParallelGenericLoopDirective(
2891 VisitOMPLoopDirective(
D);
2895void ASTStmtWriter::VisitOMPTargetParallelGenericLoopDirective(
2897 VisitOMPLoopDirective(
D);
2905 Record.push_back(S->clauses().size());
2906 Record.writeEnum(S->Kind);
2907 Record.AddSourceRange(S->Range);
2908 Record.AddSourceLocation(S->DirectiveLoc);
2909 Record.writeOpenACCClauseList(S->clauses());
2912void ASTStmtWriter::VisitOpenACCAssociatedStmtConstruct(
2914 VisitOpenACCConstructStmt(S);
2915 Record.AddStmt(S->getAssociatedStmt());
2920 VisitOpenACCAssociatedStmtConstruct(S);
2926 VisitOpenACCAssociatedStmtConstruct(S);
2927 Record.writeEnum(S->getParentComputeConstructKind());
2933 VisitOpenACCAssociatedStmtConstruct(S);
2939 VisitOpenACCAssociatedStmtConstruct(S);
2943void ASTStmtWriter::VisitOpenACCEnterDataConstruct(
2946 VisitOpenACCConstructStmt(S);
2952 VisitOpenACCConstructStmt(S);
2958 VisitOpenACCConstructStmt(S);
2964 VisitOpenACCConstructStmt(S);
2970 VisitOpenACCConstructStmt(S);
2976 VisitOpenACCConstructStmt(S);
2982 VisitOpenACCAssociatedStmtConstruct(S);
2988 Record.push_back(S->getExprs().size());
2989 VisitOpenACCConstructStmt(S);
2990 Record.AddSourceLocation(S->LParenLoc);
2991 Record.AddSourceLocation(S->RParenLoc);
2992 Record.AddSourceLocation(S->QueuesLoc);
2994 for(
Expr *
E : S->getExprs())
3006 Record.AddStmt(S->getOpaqueArgLValue());
3007 Record.AddStmt(S->getCastedTemporary());
3008 Record.AddStmt(S->getWritebackCast());
3009 Record.writeBool(S->isInOut());
3018 assert(!SwitchCaseIDs.contains(S) &&
"SwitchCase recorded twice");
3019 unsigned NextID = SwitchCaseIDs.size();
3020 SwitchCaseIDs[S] = NextID;
3025 assert(SwitchCaseIDs.contains(S) &&
"SwitchCase hasn't been seen yet");
3026 return SwitchCaseIDs[S];
3030 SwitchCaseIDs.clear();
3045 llvm::DenseMap<Stmt *, uint64_t>::iterator I = SubStmtEntries.find(S);
3046 if (I != SubStmtEntries.end()) {
3047 Record.push_back(I->second);
3053 assert(!ParentStmts.count(S) &&
"There is a Stmt cycle!");
3055 struct ParentStmtInserterRAII {
3057 llvm::DenseSet<Stmt *> &ParentStmts;
3059 ParentStmtInserterRAII(
Stmt *S, llvm::DenseSet<Stmt *> &ParentStmts)
3060 : S(S), ParentStmts(ParentStmts) {
3061 ParentStmts.insert(S);
3063 ~ParentStmtInserterRAII() {
3064 ParentStmts.erase(S);
3068 ParentStmtInserterRAII ParentStmtInserter(S, ParentStmts);
3074 SubStmtEntries[S] = Offset;
3079void ASTRecordWriter::FlushStmts() {
3082 assert(Writer->SubStmtEntries.empty() &&
"unexpected entries in sub-stmt map");
3083 assert(Writer->ParentStmts.empty() &&
"unexpected entries in parent stmt map");
3085 for (
unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
3086 Writer->WriteSubStmt(getASTContext(), StmtsToEmit[I]);
3088 assert(N == StmtsToEmit.size() &&
"record modified while being written!");
3095 Writer->SubStmtEntries.clear();
3096 Writer->ParentStmts.clear();
3099 StmtsToEmit.clear();
3102void ASTRecordWriter::FlushSubStmts() {
3106 for (
unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
3107 Writer->WriteSubStmt(getASTContext(), StmtsToEmit[N - I - 1]);
3108 assert(N == StmtsToEmit.size() &&
"record modified while being written!");
3111 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.
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
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_SYCLKERNELCALL
A SYCLKernelCallStmt record.
@ STMT_OMP_TARGET_ENTER_DATA_DIRECTIVE
@ EXPR_CHARACTER_LITERAL
A CharacterLiteral record.
@ EXPR_OBJC_ENCODE
An ObjCEncodeExpr record.
@ STMT_OMP_PARALLEL_SECTIONS_DIRECTIVE
@ STMT_OMP_PARALLEL_FOR_DIRECTIVE
@ EXPR_CSTYLE_CAST
A CStyleCastExpr record.
@ STMT_OMP_PARALLEL_DIRECTIVE
@ EXPR_OBJC_BOXED_EXPRESSION
@ EXPR_OBJC_BOOL_LITERAL
An ObjCBoolLiteralExpr record.
@ EXPR_CXX_BIND_TEMPORARY
@ STMT_OMP_ATOMIC_DIRECTIVE
@ STMT_OMP_ORDERED_DIRECTIVE
@ EXPR_EXT_VECTOR_ELEMENT
An ExtVectorElementExpr record.
@ STMT_OMP_TEAMS_GENERIC_LOOP_DIRECTIVE
@ STMT_OMP_CRITICAL_DIRECTIVE
@ EXPR_ATOMIC
An AtomicExpr record.
@ STMT_OPENACC_ENTER_DATA_CONSTRUCT
@ STMT_OMP_CANCEL_DIRECTIVE
@ EXPR_OFFSETOF
An OffsetOfExpr record.
@ STMT_RETURN
A ReturnStmt record.
@ STMT_OBJC_FOR_COLLECTION
An ObjCForCollectionStmt record.
@ STMT_OMP_TARGET_TEAMS_DISTRIBUTE_DIRECTIVE
@ EXPR_ARRAY_INIT_LOOP
An ArrayInitLoopExpr record.
@ STMT_OMP_PARALLEL_MASTER_TASKLOOP_DIRECTIVE
@ STMT_OMP_PARALLEL_MASKED_TASKLOOP_SIMD_DIRECTIVE
@ STMT_CONTINUE
A ContinueStmt record.
@ EXPR_PREDEFINED
A PredefinedExpr record.
@ EXPR_OPENACC_ASTERISK_SIZE
@ STMT_OMP_DEPOBJ_DIRECTIVE
@ EXPR_CXX_BOOL_LITERAL
A CXXBoolLiteralExpr record.
@ EXPR_PAREN_LIST
A ParenListExpr record.
@ EXPR_CXX_PAREN_LIST_INIT
A CXXParenListInitExpr record.
@ STMT_OMP_DISPATCH_DIRECTIVE
@ STMT_OMP_MASTER_TASKLOOP_SIMD_DIRECTIVE
@ STMT_OPENACC_DATA_CONSTRUCT
@ STMT_OMP_TASKLOOP_DIRECTIVE
@ STMT_COMPOUND
A CompoundStmt record.
@ STMT_OMP_CANONICAL_LOOP
@ STMT_FOR
A ForStmt record.
@ STMT_ATTRIBUTED
An AttributedStmt record.
@ STMT_OMP_PARALLEL_MASTER_DIRECTIVE
@ STMT_OPENACC_WAIT_CONSTRUCT
@ STMT_OMP_TARGET_TEAMS_GENERIC_LOOP_DIRECTIVE
@ STMT_OMP_TEAMS_DIRECTIVE
@ STMT_OMP_TARGET_PARALLEL_DIRECTIVE
@ EXPR_CXX_REWRITTEN_BINARY_OPERATOR
A CXXRewrittenBinaryOperator record.
@ STMT_GOTO
A GotoStmt record.
@ EXPR_NO_INIT
An NoInitExpr record.
@ EXPR_OBJC_ARRAY_LITERAL
@ STMT_OMP_ERROR_DIRECTIVE
@ EXPR_OBJC_PROTOCOL_EXPR
An ObjCProtocolExpr record.
@ STMT_OMP_GENERIC_LOOP_DIRECTIVE
@ EXPR_ARRAY_INIT_INDEX
An ArrayInitIndexExpr record.
@ STMT_OMP_TASK_DIRECTIVE
@ STMT_OPENACC_INIT_CONSTRUCT
@ EXPR_CXX_CONSTRUCT
A CXXConstructExpr record.
@ STMT_OMP_PARALLEL_MASKED_DIRECTIVE
@ STMT_OMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_DIRECTIVE
@ STMT_OPENACC_UPDATE_CONSTRUCT
@ STMT_OMP_PARALLEL_MASTER_TASKLOOP_SIMD_DIRECTIVE
@ EXPR_OBJC_DICTIONARY_LITERAL
@ STMT_OMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE
@ EXPR_CXX_DYNAMIC_CAST
A CXXDynamicCastExpr record.
@ STMT_CXX_TRY
A CXXTryStmt record.
@ EXPR_GENERIC_SELECTION
A GenericSelectionExpr record.
@ STMT_OMP_TARGET_SIMD_DIRECTIVE
@ EXPR_OBJC_INDIRECT_COPY_RESTORE
An ObjCIndirectCopyRestoreExpr record.
@ EXPR_CXX_INHERITED_CTOR_INIT
A CXXInheritedCtorInitExpr record.
@ EXPR_CALL
A CallExpr record.
@ EXPR_GNU_NULL
A GNUNullExpr record.
@ EXPR_BINARY_CONDITIONAL_OPERATOR
@ EXPR_OBJC_PROPERTY_REF_EXPR
An ObjCPropertyRefExpr record.
@ STMT_OMP_TARGET_PARALLEL_FOR_DIRECTIVE
@ STMT_OMP_FOR_SIMD_DIRECTIVE
@ STMT_OMP_MASKED_TASKLOOP_DIRECTIVE
@ EXPR_CXX_CONST_CAST
A CXXConstCastExpr record.
@ STMT_OMP_SCAN_DIRECTIVE
@ STMT_REF_PTR
A reference to a previously [de]serialized Stmt record.
@ EXPR_OBJC_MESSAGE_EXPR
An ObjCMessageExpr record.
@ EXPR_CXX_DEPENDENT_SCOPE_DECL_REF
@ STMT_OMP_TEAMS_DISTRIBUTE_DIRECTIVE
@ STMT_CASE
A CaseStmt record.
@ EXPR_CONSTANT
A constant expression context.
@ EXPR_FUNCTION_PARM_PACK
@ STMT_STOP
A marker record that indicates that we are at the end of an expression.
@ EXPR_CXX_NULL_PTR_LITERAL
@ STMT_OMP_TARGET_UPDATE_DIRECTIVE
@ STMT_MSASM
A MS-style AsmStmt record.
@ STMT_OMP_DISTRIBUTE_DIRECTIVE
@ EXPR_CONDITIONAL_OPERATOR
A ConditionOperator record.
@ EXPR_BINARY_OPERATOR
A BinaryOperator record.
@ EXPR_CXX_STD_INITIALIZER_LIST
A CXXStdInitializerListExpr record.
@ STMT_OMP_TASKGROUP_DIRECTIVE
@ STMT_OMP_REVERSE_DIRECTIVE
@ EXPR_SHUFFLE_VECTOR
A ShuffleVectorExpr record.
@ STMT_OBJC_FINALLY
An ObjCAtFinallyStmt record.
@ EXPR_OBJC_SELECTOR_EXPR
An ObjCSelectorExpr record.
@ EXPR_FLOATING_LITERAL
A FloatingLiteral record.
@ STMT_OMP_MASTER_DIRECTIVE
@ EXPR_CXX_DEPENDENT_SCOPE_MEMBER
@ STMT_NULL_PTR
A NULL expression.
@ STMT_DEFAULT
A DefaultStmt record.
@ EXPR_CHOOSE
A ChooseExpr record.
@ STMT_OMP_UNROLL_DIRECTIVE
@ STMT_NULL
A NullStmt record.
@ STMT_OMP_SIMD_DIRECTIVE
@ EXPR_DECL_REF
A DeclRefExpr record.
@ STMT_OPENACC_LOOP_CONSTRUCT
@ EXPR_SUBST_NON_TYPE_TEMPLATE_PARM
@ EXPR_INIT_LIST
An InitListExpr record.
@ EXPR_IMPLICIT_VALUE_INIT
An ImplicitValueInitExpr record.
@ STMT_OBJC_AUTORELEASE_POOL
An ObjCAutoreleasePoolStmt record.
@ STMT_OPENACC_SET_CONSTRUCT
@ EXPR_RECOVERY
A RecoveryExpr record.
@ EXPR_PAREN
A ParenExpr record.
@ STMT_OMP_TARGET_PARALLEL_GENERIC_LOOP_DIRECTIVE
@ STMT_LABEL
A LabelStmt record.
@ EXPR_CXX_FUNCTIONAL_CAST
A CXXFunctionalCastExpr record.
@ EXPR_USER_DEFINED_LITERAL
A UserDefinedLiteral record.
@ EXPR_INTEGER_LITERAL
An IntegerLiteral record.
@ EXPR_SOURCE_LOC
A SourceLocExpr record.
@ EXPR_MATERIALIZE_TEMPORARY
@ EXPR_CXX_MEMBER_CALL
A CXXMemberCallExpr record.
@ STMT_OMP_INTEROP_DIRECTIVE
@ STMT_SWITCH
A SwitchStmt record.
@ STMT_DECL
A DeclStmt record.
@ EXPR_CXX_UNRESOLVED_MEMBER
@ 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 *.