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!");
64 void addBits(uint32_t
Value, uint32_t BitsWidth) {
65 assert(CurrentIndex &&
"Writing Bits without recording first!");
73 RecordRef[*CurrentIndex] = (uint32_t)PackingBits;
74 CurrentIndex = std::nullopt;
81 CurrentIndex = RecordRef.
size();
88 std::optional<unsigned> CurrentIndex;
91 PakedBitsWriter CurrentPackingBits;
96 : Writer(Writer), Record(Context, Writer, Record),
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"
123 Record.AddSourceLocation(ArgInfo.
LAngleLoc);
124 Record.AddSourceLocation(ArgInfo.
RAngleLoc);
126 Record.AddTemplateArgumentLoc(Args[i]);
132void ASTStmtWriter::VisitNullStmt(
NullStmt *S) {
145 for (
auto *CS : S->
body())
158void ASTStmtWriter::VisitSwitchCase(
SwitchCase *S) {
160 Record.push_back(Writer.getSwitchCaseID(S));
165void ASTStmtWriter::VisitCaseStmt(
CaseStmt *S) {
168 Record.AddStmt(S->
getLHS());
171 Record.AddStmt(S->
getRHS());
177void ASTStmtWriter::VisitDefaultStmt(
DefaultStmt *S) {
183void ASTStmtWriter::VisitLabelStmt(
LabelStmt *S) {
186 Record.AddDeclRef(S->
getDecl());
194 Record.push_back(S->
getAttrs().size());
195 Record.AddAttributes(S->
getAttrs());
201void ASTStmtWriter::VisitIfStmt(
IfStmt *S) {
204 bool HasElse = S->
getElse() !=
nullptr;
206 bool HasInit = S->
getInit() !=
nullptr;
208 CurrentPackingBits.updateBits();
210 CurrentPackingBits.addBit(HasElse);
211 CurrentPackingBits.addBit(HasVar);
212 CurrentPackingBits.addBit(HasInit);
223 Record.AddSourceLocation(S->
getIfLoc());
232void ASTStmtWriter::VisitSwitchStmt(
SwitchStmt *S) {
235 bool HasInit = S->
getInit() !=
nullptr;
237 Record.push_back(HasInit);
238 Record.push_back(HasVar);
254 Record.push_back(Writer.RecordSwitchCaseID(SC));
258void ASTStmtWriter::VisitWhileStmt(
WhileStmt *S) {
262 Record.push_back(HasVar);
275void ASTStmtWriter::VisitDoStmt(
DoStmt *S) {
279 Record.AddSourceLocation(S->
getDoLoc());
285void ASTStmtWriter::VisitForStmt(
ForStmt *S) {
290 Record.AddStmt(S->
getInc());
292 Record.AddSourceLocation(S->
getForLoc());
298void ASTStmtWriter::VisitGotoStmt(
GotoStmt *S) {
316 Record.AddSourceLocation(S->
getKwLoc());
325 VisitLoopControlStmt(S);
329void ASTStmtWriter::VisitBreakStmt(
BreakStmt *S) {
330 VisitLoopControlStmt(S);
334void ASTStmtWriter::VisitDeferStmt(
DeferStmt *S) {
341void ASTStmtWriter::VisitReturnStmt(
ReturnStmt *S) {
345 Record.push_back(HasNRVOCandidate);
348 if (HasNRVOCandidate)
355void ASTStmtWriter::VisitDeclStmt(
DeclStmt *S) {
358 Record.AddSourceLocation(S->
getEndLoc());
361 Record.AddDeclRef(*D);
365void ASTStmtWriter::VisitAsmStmt(
AsmStmt *S) {
370 Record.AddSourceLocation(S->
getAsmLoc());
375void ASTStmtWriter::VisitGCCAsmStmt(
GCCAsmStmt *S) {
389 for (
unsigned I = 0, N = S->
getNumInputs(); I != N; ++I) {
400 for (
unsigned I = 0, N = S->
getNumLabels(); I != N; ++I) {
408void ASTStmtWriter::VisitMSAsmStmt(
MSAsmStmt *S) {
411 Record.AddSourceLocation(S->
getEndLoc());
418 Writer.AddToken(S->
getAsmToks()[I], Record.getRecordData());
433 for (
unsigned I = 0, N = S->
getNumInputs(); I != N; ++I) {
444 for (Stmt *S : CoroStmt->
children())
466void ASTStmtWriter::VisitCoawaitExpr(
CoawaitExpr *E) {
467 VisitCoroutineSuspendExpr(E);
472void ASTStmtWriter::VisitCoyieldExpr(
CoyieldExpr *E) {
473 VisitCoroutineSuspendExpr(E);
485 assert(
false &&
"null reflection can't be constructed from parsing a "
486 "reflection operand");
489 Record.AddTypeSourceInfo(
511 for (
const auto &DetailRecord : Satisfaction) {
512 if (
auto *
Diag = dyn_cast<const ConstraintSubstitutionDiagnostic *>(
519 if (
auto *E = dyn_cast<const Expr *>(DetailRecord)) {
525 Record.AddConceptReference(CR);
540void ASTStmtWriter::VisitConceptSpecializationExpr(
545 Record.push_back(CR !=
nullptr);
547 Record.AddConceptReference(CR);
560 Record.AddDeclRef(E->
getBody());
562 Record.AddDeclRef(
P);
564 if (
auto *TypeReq = dyn_cast<concepts::TypeRequirement>(R)) {
566 Record.push_back(TypeReq->Status);
570 Record.AddTypeSourceInfo(TypeReq->getType());
571 }
else if (
auto *ExprReq = dyn_cast<concepts::ExprRequirement>(R)) {
572 Record.push_back(ExprReq->getKind());
573 Record.push_back(ExprReq->Status);
574 if (ExprReq->isExprSubstitutionFailure()) {
581 Record.AddSourceLocation(ExprReq->NoexceptLoc);
582 const auto &RetReq = ExprReq->getReturnTypeRequirement();
583 if (RetReq.isSubstitutionFailure()) {
586 }
else if (RetReq.isTypeConstraint()) {
588 Record.AddTemplateParameterList(
589 RetReq.getTypeConstraintTemplateParameterList());
590 if (ExprReq->Status >=
593 ExprReq->getReturnTypeRequirementSubstitutedConstraintExpr());
595 assert(RetReq.isEmpty());
602 Record.push_back(NestedReq->hasInvalidConstraint());
603 if (NestedReq->hasInvalidConstraint()) {
604 Record.AddString(NestedReq->getInvalidConstraintEntity());
607 Record.AddStmt(NestedReq->getConstraintExpr());
608 if (!NestedReq->isDependent())
615 Record.AddSourceLocation(E->
getEndLoc());
640 for (
const auto &I : S->
captures()) {
641 if (I.capturesThis() || I.capturesVariableArrayType())
642 Record.AddDeclRef(
nullptr);
644 Record.AddDeclRef(I.getCapturedVar());
645 Record.push_back(I.getCaptureKind());
646 Record.AddSourceLocation(I.getLocation());
661void ASTStmtWriter::VisitExpr(
Expr *E) {
664 CurrentPackingBits.updateBits();
669 Record.AddTypeRef(E->
getType());
686 Record.push_back(E->Int64Result());
689 Record.AddAPValue(E->APValueResult());
714void ASTStmtWriter::VisitUnresolvedSYCLKernelCallStmt(
728 Record.push_back(HasFunctionName);
738void ASTStmtWriter::VisitDeclRefExpr(
DeclRefExpr *E) {
741 CurrentPackingBits.updateBits();
753 Record.push_back(NumTemplateArgs);
761 AbbrevToUse = Writer.getDeclRefExprAbbrev();
772 E->getTrailingObjects<TemplateArgumentLoc>());
774 Record.AddDeclRef(E->
getDecl());
786 AbbrevToUse = Writer.getIntegerLiteralAbbrev();
803 Record.push_back(E->
isExact());
822 Record.push_back(llvm::to_underlying(E->
getKind()));
832 Record.push_back(StrData[I]);
841 Record.push_back(llvm::to_underlying(E->
getKind()));
843 AbbrevToUse = Writer.getCharacterLiteralAbbrev();
848void ASTStmtWriter::VisitParenExpr(
ParenExpr *E) {
851 Record.AddSourceLocation(E->
getLParen());
852 Record.AddSourceLocation(E->
getRParen());
860 for (
auto *SubStmt : E->
exprs())
861 Record.AddStmt(SubStmt);
872 CurrentPackingBits.addBit(HasFPFeatures);
874 CurrentPackingBits.addBits(E->
getOpcode(),
893 Record.push_back(ON.
getKind());
910 Record.AddCXXBaseSpecifier(*ON.
getBase());
921 Record.push_back(E->
getKind());
935 Record.AddStmt(E->
getLHS());
936 Record.AddStmt(E->
getRHS());
941void ASTStmtWriter::VisitMatrixSingleSubscriptExpr(
961 Record.writeEnum(E->ASType);
983 Record.AddSourceRange(SR);
999 Record.AddStmt(
Range.Begin);
1000 Record.AddStmt(
Range.End);
1001 Record.AddStmt(
Range.Step);
1006 OMPIteratorHelperData &HD = E->
getHelper(I);
1008 Record.AddStmt(HD.
Upper);
1009 Record.AddStmt(HD.
Update);
1015void ASTStmtWriter::VisitCallExpr(
CallExpr *E) {
1019 CurrentPackingBits.updateBits();
1020 CurrentPackingBits.addBit(
static_cast<bool>(E->
getADLCallKind()));
1028 Arg != ArgEnd; ++Arg)
1029 Record.AddStmt(*Arg);
1037 AbbrevToUse = Writer.getCallExprAbbrev();
1042void ASTStmtWriter::VisitRecoveryExpr(
RecoveryExpr *E) {
1044 Record.push_back(std::distance(E->
children().begin(), E->
children().end()));
1046 Record.AddSourceLocation(E->
getEndLoc());
1048 Record.AddStmt(Child);
1052void ASTStmtWriter::VisitMemberExpr(
MemberExpr *E) {
1056 bool HasFoundDecl = E->hasFoundDecl();
1057 bool HasTemplateInfo = E->hasTemplateKWAndArgsInfo();
1062 CurrentPackingBits.updateBits();
1063 CurrentPackingBits.addBit(HasQualifier);
1064 CurrentPackingBits.addBit(HasFoundDecl);
1065 CurrentPackingBits.addBit(HasTemplateInfo);
1066 Record.push_back(NumTemplateArgs);
1070 Record.AddDeclarationNameLoc(E->MemberDNLoc,
1073 CurrentPackingBits.addBit(E->
isArrow());
1083 Record.AddDeclRef(FoundDecl.
getDecl());
1084 CurrentPackingBits.addBits(FoundDecl.
getAccess(), 2);
1087 if (HasTemplateInfo)
1089 E->getTrailingObjects<TemplateArgumentLoc>());
1094void ASTStmtWriter::VisitObjCIsaExpr(
ObjCIsaExpr *E) {
1098 Record.AddSourceLocation(E->
getOpLoc());
1099 Record.push_back(E->
isArrow());
1112 VisitExplicitCastExpr(E);
1119void ASTStmtWriter::VisitCastExpr(
CastExpr *E) {
1123 CurrentPackingBits.updateBits();
1131 Record.AddCXXBaseSpecifier(**PI);
1142 CurrentPackingBits.updateBits();
1143 CurrentPackingBits.addBits(E->
getOpcode(), 6);
1145 CurrentPackingBits.addBit(HasFPFeatures);
1147 Record.AddStmt(E->
getLHS());
1148 Record.AddStmt(E->
getRHS());
1155 AbbrevToUse = Writer.getBinaryOperatorAbbrev();
1159 if (Writer.isGeneratingReducedBMI() &&
1168 DeclarationName Name =
1169 Record.getASTContext().DeclarationNames.getCXXOperatorName(Op);
1171 auto PreserveAssociatedCandidates = [&](Expr *
Operand) {
1172 const auto *RT =
Operand->getType()->getAs<RecordType>();
1177 DeclContext *DC = RT->getDecl()->getDeclContext();
1180 if (
auto *NS = dyn_cast_or_null<NamespaceDecl>(DC))
1181 for (NamedDecl *D : NS->noload_lookup(Name))
1182 Writer.GetDeclRef(D);
1186 PreserveAssociatedCandidates(E->
getLHS());
1188 PreserveAssociatedCandidates(E->
getRHS());
1191 Record.getASTContext().getTranslationUnitDecl()->noload_lookup(Name))
1192 Writer.GetDeclRef(D);
1199 VisitBinaryOperator(E);
1205 AbbrevToUse = Writer.getCompoundAssignOperatorAbbrev();
1213 Record.AddStmt(E->
getLHS());
1214 Record.AddStmt(E->
getRHS());
1238 AbbrevToUse = Writer.getExprImplicitCastAbbrev();
1249 VisitExplicitCastExpr(E);
1280void ASTStmtWriter::VisitInitListExpr(
InitListExpr *E) {
1287 bool isArrayFiller =
isa<Expr *>(E->ArrayFillerOrUnionFieldInit);
1288 Record.push_back(isArrayFiller);
1295 if (isArrayFiller) {
1299 for (
unsigned I = 0, N = E->
getNumInits(); I != N; ++I)
1300 Record.AddStmt(E->
getInit(I) != filler ? E->
getInit(I) :
nullptr);
1302 for (
unsigned I = 0, N = E->
getNumInits(); I != N; ++I)
1303 Record.AddStmt(E->
getInit(I));
1316 for (
const DesignatedInitExpr::Designator &D : E->
designators()) {
1317 if (D.isFieldDesignator()) {
1318 if (FieldDecl *Field = D.getFieldDecl()) {
1320 Record.AddDeclRef(Field);
1323 Record.AddIdentifierRef(D.getFieldName());
1325 Record.AddSourceLocation(D.getDotLoc());
1326 Record.AddSourceLocation(D.getFieldLoc());
1327 }
else if (D.isArrayDesignator()) {
1329 Record.push_back(D.getArrayIndex());
1330 Record.AddSourceLocation(D.getLBracketLoc());
1331 Record.AddSourceLocation(D.getRBracketLoc());
1333 assert(D.isArrayRangeDesignator() &&
"Unknown designator");
1335 Record.push_back(D.getArrayIndex());
1336 Record.AddSourceLocation(D.getLBracketLoc());
1337 Record.AddSourceLocation(D.getEllipsisLoc());
1338 Record.AddSourceLocation(D.getRBracketLoc());
1351void ASTStmtWriter::VisitNoInitExpr(
NoInitExpr *E) {
1358 Record.AddStmt(E->SubExprs[0]);
1359 Record.AddStmt(E->SubExprs[1]);
1373void ASTStmtWriter::VisitVAArgExpr(
VAArgExpr *E) {
1387 Record.AddSourceLocation(E->
getEndLoc());
1388 Record.push_back(llvm::to_underlying(E->
getIdentKind()));
1392void ASTStmtWriter::VisitEmbedExpr(
EmbedExpr *E) {
1409void ASTStmtWriter::VisitStmtExpr(
StmtExpr *E) {
1418void ASTStmtWriter::VisitChooseExpr(
ChooseExpr *E) {
1421 Record.AddStmt(E->
getLHS());
1422 Record.AddStmt(E->
getRHS());
1429void ASTStmtWriter::VisitGNUNullExpr(
GNUNullExpr *E) {
1439 Record.AddStmt(E->
getExpr(I));
1448 CurrentPackingBits.addBit(HasFPFeatures);
1458void ASTStmtWriter::VisitBlockExpr(
BlockExpr *E) {
1469 Record.push_back(E->ResultIndex);
1478 Stmt **Stmts = E->getTrailingObjects<Stmt *>();
1479 for (
unsigned I = 0, N = E->numTrailingObjects(
1480 ASTConstraintSatisfaction::OverloadToken<Stmt *>());
1482 Record.AddStmt(Stmts[I]);
1484 TypeSourceInfo **TSIs = E->getTrailingObjects<TypeSourceInfo *>();
1487 N = E->numTrailingObjects(
1488 ASTConstraintSatisfaction::OverloadToken<TypeSourceInfo *>());
1490 Record.AddTypeSourceInfo(TSIs[I]);
1503 Record.push_back(result);
1513void ASTStmtWriter::VisitAtomicExpr(
AtomicExpr *E) {
1515 Record.push_back(E->
getOp());
1533 VisitObjCObjectLiteral(E);
1535 Record.AddSourceLocation(E->
getAtLoc());
1540 VisitObjCObjectLiteral(E);
1548 VisitObjCObjectLiteral(E);
1558 VisitObjCObjectLiteral(E);
1560 Record.push_back(E->HasPackExpansions);
1563 Record.AddStmt(Element.
Key);
1564 Record.AddStmt(Element.
Value);
1565 if (E->HasPackExpansions) {
1567 unsigned NumExpansions = 0;
1570 Record.push_back(NumExpansions);
1582 Record.AddSourceLocation(E->
getAtLoc());
1590 Record.AddSourceLocation(E->
getAtLoc());
1599 Record.AddSourceLocation(E->
getAtLoc());
1600 Record.AddSourceLocation(E->ProtoLoc);
1607 Record.AddDeclRef(E->
getDecl());
1609 Record.AddSourceLocation(E->
getOpLoc());
1611 Record.push_back(E->
isArrow());
1618 Record.push_back(E->SetterAndMethodRefFlags.getInt());
1629 Record.push_back(0);
1632 Record.push_back(1);
1635 Record.push_back(2);
1656 Record.push_back(E->getNumStoredSelLocs());
1657 Record.push_back(E->SelLocsKind);
1659 Record.push_back(E->IsImplicit);
1678 Record.push_back(1);
1681 Record.push_back(0);
1689 Arg != ArgEnd; ++Arg)
1690 Record.AddStmt(*Arg);
1692 SourceLocation *Locs = E->getStoredSelLocs();
1693 for (
unsigned i = 0, e = E->getNumStoredSelLocs(); i != e; ++i)
1694 Record.AddSourceLocation(Locs[i]);
1704 Record.AddSourceLocation(S->
getForLoc());
1728 Record.AddSourceLocation(S->
getAtLoc());
1778void ASTStmtWriter::VisitCXXCatchStmt(
CXXCatchStmt *S) {
1786void ASTStmtWriter::VisitCXXTryStmt(
CXXTryStmt *S) {
1789 Record.AddSourceLocation(S->
getTryLoc());
1798 Record.AddSourceLocation(S->
getForLoc());
1807 Record.AddStmt(S->
getInc());
1815 Record.push_back(
static_cast<unsigned>(S->
getKind()));
1819 Record.AddDeclRef(S->
getDecl());
1820 for (Stmt *SubStmt : S->
children())
1821 Record.AddStmt(SubStmt);
1825void ASTStmtWriter::VisitCXXExpansionStmtInstantiation(
1858 Record.AddSourceLocation(E->BeginLoc);
1862 AbbrevToUse = Writer.getCXXOperatorCallExprAbbrev();
1872 AbbrevToUse = Writer.getCXXMemberCallExprAbbrev();
1877void ASTStmtWriter::VisitCXXRewrittenBinaryOperator(
1901 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I)
1902 Record.AddStmt(E->
getArg(I));
1917 VisitCXXConstructExpr(E);
1922void ASTStmtWriter::VisitLambdaExpr(
LambdaExpr *E) {
1925 Record.AddSourceRange(E->IntroducerRange);
1927 Record.AddSourceLocation(E->CaptureDefaultLoc);
1930 Record.AddSourceLocation(E->ClosingBrace);
1952 VisitExplicitCastExpr(E);
1960 VisitCXXNamedCastExpr(E);
1965 VisitCXXNamedCastExpr(E);
1970 VisitCXXNamedCastExpr(E);
1975 VisitCXXNamedCastExpr(E);
1980 VisitCXXNamedCastExpr(E);
1985 VisitExplicitCastExpr(E);
1992 VisitExplicitCastExpr(E);
1994 Record.AddSourceLocation(E->
getEndLoc());
2000 Record.AddSourceLocation(E->UDSuffixLoc);
2029void ASTStmtWriter::VisitCXXThisExpr(
CXXThisExpr *E) {
2038void ASTStmtWriter::VisitCXXThrowExpr(
CXXThrowExpr *E) {
2082void ASTStmtWriter::VisitCXXNewExpr(
CXXNewExpr *E) {
2085 Record.push_back(E->
isArray());
2106 DeclarationName Name =
2107 Record.getASTContext().DeclarationNames.getCXXOperatorName(Kind);
2108 for (NamedDecl *
Found :
2109 Record.getASTContext().getTranslationUnitDecl()->noload_lookup(Name))
2110 if (!
Found->isImplicit())
2111 Writer.GetDeclRef(
Found);
2114 PreserveGlobalCandidates(E->
isArray() ? OO_Array_New : OO_New);
2115 PreserveGlobalCandidates(E->
isArray() ? OO_Array_Delete : OO_Delete);
2148 Record.push_back(E->
isArrow());
2169 if (
auto *BD = dyn_cast<BlockDecl *>(Obj)) {
2171 Record.AddDeclRef(BD);
2172 }
else if (
auto *CLE = dyn_cast<CompoundLiteralExpr *>(Obj)) {
2174 Record.AddStmt(CLE);
2192void ASTStmtWriter::VisitCXXDependentScopeMemberExpr(
2199 CurrentPackingBits.updateBits();
2200 CurrentPackingBits.addBit(E->hasTemplateKWAndArgsInfo());
2201 CurrentPackingBits.addBit(E->hasFirstQualifierFoundInScope());
2203 if (E->hasTemplateKWAndArgsInfo()) {
2204 const ASTTemplateKWAndArgsInfo &ArgInfo =
2205 *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>();
2207 E->getTrailingObjects<TemplateArgumentLoc>());
2210 CurrentPackingBits.addBit(E->
isArrow());
2220 if (E->hasFirstQualifierFoundInScope())
2223 Record.AddDeclarationNameInfo(E->MemberNameInfo);
2233 CurrentPackingBits.addBit(
2237 const ASTTemplateKWAndArgsInfo &ArgInfo =
2238 *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>();
2242 E->getTrailingObjects<TemplateArgumentLoc>());
2246 Record.AddDeclarationNameInfo(E->NameInfo);
2256 Record.AddStmt(*ArgI);
2264void ASTStmtWriter::VisitOverloadExpr(
OverloadExpr *E) {
2269 CurrentPackingBits.updateBits();
2272 const ASTTemplateKWAndArgsInfo &ArgInfo =
2280 OvI != OvE; ++OvI) {
2281 Record.AddDeclRef(OvI.getDecl());
2282 Record.push_back(OvI.getAccess());
2290 VisitOverloadExpr(E);
2291 CurrentPackingBits.addBit(E->
isArrow());
2304 VisitOverloadExpr(E);
2309 if (Writer.isWritingStdCXXNamedModules() && Writer.getChain()) {
2312 DeclarationName Name = E->
getName();
2314 Record.getASTContext().getTranslationUnitDecl()->lookup(Name))
2315 if (
Found->isFromASTFile())
2316 Writer.GetDeclRef(
Found);
2318 llvm::SmallVector<NamespaceDecl *> ExternalNSs;
2319 Writer.getChain()->ReadKnownNamespaces(ExternalNSs);
2320 for (
auto *NS : ExternalNSs)
2321 for (
auto *
Found : NS->lookup(Name))
2322 Writer.GetDeclRef(
Found);
2341 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I)
2342 Record.AddTypeSourceInfo(E->
getArg(I));
2376 Record.push_back(E->NumExpansions);
2385 Record.AddSourceLocation(E->OperatorLoc);
2386 Record.AddSourceLocation(E->PackLoc);
2387 Record.AddSourceLocation(E->RParenLoc);
2388 Record.AddDeclRef(E->Pack);
2391 Record.AddTemplateArgument(TA);
2407 Record.AddStmt(Sub);
2411void ASTStmtWriter::VisitSubstNonTypeTemplateParmExpr(
2415 CurrentPackingBits.addBit(E->
getFinal());
2416 CurrentPackingBits.addBits(E->
getIndex(), 12);
2425void ASTStmtWriter::VisitSubstNonTypeTemplateParmPackExpr(
2429 CurrentPackingBits.addBit(E->
getFinal());
2443 Record.AddDeclRef(*I);
2457void ASTStmtWriter::VisitCXXFoldExpr(
CXXFoldExpr *E) {
2459 Record.AddSourceLocation(E->LParenLoc);
2460 Record.AddSourceLocation(E->EllipsisLoc);
2461 Record.AddSourceLocation(E->RParenLoc);
2463 Record.AddStmt(E->SubExprs[0]);
2464 Record.AddStmt(E->SubExprs[1]);
2465 Record.AddStmt(E->SubExprs[2]);
2473 Record.push_back(InitExprs.size());
2477 Record.AddSourceLocation(E->
getEndLoc());
2479 Record.AddStmt(InitExpr);
2482 bool HasArrayFillerOrUnionDecl = ArrayFiller || UnionField;
2483 Record.push_back(HasArrayFillerOrUnionDecl);
2484 if (HasArrayFillerOrUnionDecl) {
2485 Record.push_back(
static_cast<bool>(ArrayFiller));
2487 Record.AddStmt(ArrayFiller);
2489 Record.AddDeclRef(UnionField);
2515void ASTStmtWriter::VisitAsTypeExpr(
AsTypeExpr *E) {
2528 Record.push_back(E->
isArrow());
2539 Record.AddStmt(E->
getIdx());
2572void ASTStmtWriter::VisitSEHTryStmt(
SEHTryStmt *S) {
2575 Record.AddSourceLocation(S->
getTryLoc());
2581void ASTStmtWriter::VisitSEHLeaveStmt(
SEHLeaveStmt *S) {
2591void ASTStmtWriter::VisitOMPCanonicalLoop(OMPCanonicalLoop *S) {
2593 for (Stmt *SubStmt : S->SubStmts)
2594 Record.AddStmt(SubStmt);
2598void ASTStmtWriter::VisitOMPExecutableDirective(OMPExecutableDirective *E) {
2599 Record.writeOMPChildren(E->Data);
2600 Record.AddSourceLocation(E->getBeginLoc());
2601 Record.AddSourceLocation(E->getEndLoc());
2604void ASTStmtWriter::VisitOMPLoopBasedDirective(OMPLoopBasedDirective *D) {
2606 Record.writeUInt32(D->getLoopsNumber());
2607 VisitOMPExecutableDirective(D);
2610void ASTStmtWriter::VisitOMPLoopDirective(OMPLoopDirective *D) {
2611 VisitOMPLoopBasedDirective(D);
2614void ASTStmtWriter::VisitOMPMetaDirective(OMPMetaDirective *D) {
2616 Record.push_back(D->getNumClauses());
2617 VisitOMPExecutableDirective(D);
2621void ASTStmtWriter::VisitOMPParallelDirective(OMPParallelDirective *D) {
2623 VisitOMPExecutableDirective(D);
2624 Record.writeBool(D->hasCancel());
2628void ASTStmtWriter::VisitOMPSimdDirective(OMPSimdDirective *D) {
2629 VisitOMPLoopDirective(D);
2633void ASTStmtWriter::VisitOMPCanonicalLoopNestTransformationDirective(
2634 OMPCanonicalLoopNestTransformationDirective *D) {
2635 VisitOMPLoopBasedDirective(D);
2639void ASTStmtWriter::VisitOMPTileDirective(OMPTileDirective *D) {
2640 VisitOMPCanonicalLoopNestTransformationDirective(D);
2644void ASTStmtWriter::VisitOMPStripeDirective(OMPStripeDirective *D) {
2645 VisitOMPCanonicalLoopNestTransformationDirective(D);
2649void ASTStmtWriter::VisitOMPUnrollDirective(OMPUnrollDirective *D) {
2650 VisitOMPCanonicalLoopNestTransformationDirective(D);
2654void ASTStmtWriter::VisitOMPReverseDirective(OMPReverseDirective *D) {
2655 VisitOMPCanonicalLoopNestTransformationDirective(D);
2659void ASTStmtWriter::VisitOMPInterchangeDirective(OMPInterchangeDirective *D) {
2660 VisitOMPCanonicalLoopNestTransformationDirective(D);
2664void ASTStmtWriter::VisitOMPFlattenDirective(OMPFlattenDirective *D) {
2665 VisitOMPCanonicalLoopNestTransformationDirective(D);
2669void ASTStmtWriter::VisitOMPSplitDirective(OMPSplitDirective *D) {
2670 VisitOMPCanonicalLoopNestTransformationDirective(D);
2674void ASTStmtWriter::VisitOMPCanonicalLoopSequenceTransformationDirective(
2675 OMPCanonicalLoopSequenceTransformationDirective *D) {
2677 VisitOMPExecutableDirective(D);
2681void ASTStmtWriter::VisitOMPFuseDirective(OMPFuseDirective *D) {
2682 VisitOMPCanonicalLoopSequenceTransformationDirective(D);
2686void ASTStmtWriter::VisitOMPForDirective(OMPForDirective *D) {
2687 VisitOMPLoopDirective(D);
2692void ASTStmtWriter::VisitOMPForSimdDirective(OMPForSimdDirective *D) {
2693 VisitOMPLoopDirective(D);
2697void ASTStmtWriter::VisitOMPSectionsDirective(OMPSectionsDirective *D) {
2699 VisitOMPExecutableDirective(D);
2704void ASTStmtWriter::VisitOMPSectionDirective(OMPSectionDirective *D) {
2706 VisitOMPExecutableDirective(D);
2711void ASTStmtWriter::VisitOMPScopeDirective(OMPScopeDirective *D) {
2713 VisitOMPExecutableDirective(D);
2717void ASTStmtWriter::VisitOMPSingleDirective(OMPSingleDirective *D) {
2719 VisitOMPExecutableDirective(D);
2723void ASTStmtWriter::VisitOMPMasterDirective(OMPMasterDirective *D) {
2725 VisitOMPExecutableDirective(D);
2729void ASTStmtWriter::VisitOMPCriticalDirective(OMPCriticalDirective *D) {
2731 VisitOMPExecutableDirective(D);
2736void ASTStmtWriter::VisitOMPParallelForDirective(OMPParallelForDirective *D) {
2737 VisitOMPLoopDirective(D);
2742void ASTStmtWriter::VisitOMPParallelForSimdDirective(
2743 OMPParallelForSimdDirective *D) {
2744 VisitOMPLoopDirective(D);
2748void ASTStmtWriter::VisitOMPParallelMasterDirective(
2749 OMPParallelMasterDirective *D) {
2751 VisitOMPExecutableDirective(D);
2755void ASTStmtWriter::VisitOMPParallelMaskedDirective(
2756 OMPParallelMaskedDirective *D) {
2758 VisitOMPExecutableDirective(D);
2762void ASTStmtWriter::VisitOMPParallelSectionsDirective(
2763 OMPParallelSectionsDirective *D) {
2765 VisitOMPExecutableDirective(D);
2770void ASTStmtWriter::VisitOMPTaskDirective(OMPTaskDirective *D) {
2772 VisitOMPExecutableDirective(D);
2777void ASTStmtWriter::VisitOMPAtomicDirective(OMPAtomicDirective *D) {
2779 VisitOMPExecutableDirective(D);
2786void ASTStmtWriter::VisitOMPTargetDirective(OMPTargetDirective *D) {
2788 VisitOMPExecutableDirective(D);
2792void ASTStmtWriter::VisitOMPTargetDataDirective(OMPTargetDataDirective *D) {
2794 VisitOMPExecutableDirective(D);
2798void ASTStmtWriter::VisitOMPTargetEnterDataDirective(
2799 OMPTargetEnterDataDirective *D) {
2801 VisitOMPExecutableDirective(D);
2805void ASTStmtWriter::VisitOMPTargetExitDataDirective(
2806 OMPTargetExitDataDirective *D) {
2808 VisitOMPExecutableDirective(D);
2812void ASTStmtWriter::VisitOMPTargetParallelDirective(
2813 OMPTargetParallelDirective *D) {
2815 VisitOMPExecutableDirective(D);
2820void ASTStmtWriter::VisitOMPTargetParallelForDirective(
2821 OMPTargetParallelForDirective *D) {
2822 VisitOMPLoopDirective(D);
2827void ASTStmtWriter::VisitOMPTaskyieldDirective(OMPTaskyieldDirective *D) {
2829 VisitOMPExecutableDirective(D);
2833void ASTStmtWriter::VisitOMPBarrierDirective(OMPBarrierDirective *D) {
2835 VisitOMPExecutableDirective(D);
2839void ASTStmtWriter::VisitOMPTaskwaitDirective(OMPTaskwaitDirective *D) {
2841 Record.push_back(D->getNumClauses());
2842 VisitOMPExecutableDirective(D);
2846void ASTStmtWriter::VisitOMPAssumeDirective(OMPAssumeDirective *D) {
2848 VisitOMPExecutableDirective(D);
2852void ASTStmtWriter::VisitOMPErrorDirective(OMPErrorDirective *D) {
2854 Record.push_back(D->getNumClauses());
2855 VisitOMPExecutableDirective(D);
2859void ASTStmtWriter::VisitOMPTaskgroupDirective(OMPTaskgroupDirective *D) {
2861 VisitOMPExecutableDirective(D);
2865void ASTStmtWriter::VisitOMPFlushDirective(OMPFlushDirective *D) {
2867 VisitOMPExecutableDirective(D);
2871void ASTStmtWriter::VisitOMPDepobjDirective(OMPDepobjDirective *D) {
2873 VisitOMPExecutableDirective(D);
2877void ASTStmtWriter::VisitOMPScanDirective(OMPScanDirective *D) {
2879 VisitOMPExecutableDirective(D);
2883void ASTStmtWriter::VisitOMPOrderedStandaloneDirective(
2884 OMPOrderedStandaloneDirective *D) {
2886 VisitOMPExecutableDirective(D);
2890void ASTStmtWriter::VisitOMPOrderedBlockAssocDirective(
2891 OMPOrderedBlockAssocDirective *D) {
2893 VisitOMPExecutableDirective(D);
2897void ASTStmtWriter::VisitOMPTeamsDirective(OMPTeamsDirective *D) {
2899 VisitOMPExecutableDirective(D);
2903void ASTStmtWriter::VisitOMPCancellationPointDirective(
2904 OMPCancellationPointDirective *D) {
2906 VisitOMPExecutableDirective(D);
2911void ASTStmtWriter::VisitOMPCancelDirective(OMPCancelDirective *D) {
2913 VisitOMPExecutableDirective(D);
2918void ASTStmtWriter::VisitOMPTaskLoopDirective(OMPTaskLoopDirective *D) {
2919 VisitOMPLoopDirective(D);
2924void ASTStmtWriter::VisitOMPTaskLoopSimdDirective(OMPTaskLoopSimdDirective *D) {
2925 VisitOMPLoopDirective(D);
2929void ASTStmtWriter::VisitOMPMasterTaskLoopDirective(
2930 OMPMasterTaskLoopDirective *D) {
2931 VisitOMPLoopDirective(D);
2936void ASTStmtWriter::VisitOMPMaskedTaskLoopDirective(
2937 OMPMaskedTaskLoopDirective *D) {
2938 VisitOMPLoopDirective(D);
2943void ASTStmtWriter::VisitOMPMasterTaskLoopSimdDirective(
2944 OMPMasterTaskLoopSimdDirective *D) {
2945 VisitOMPLoopDirective(D);
2949void ASTStmtWriter::VisitOMPMaskedTaskLoopSimdDirective(
2950 OMPMaskedTaskLoopSimdDirective *D) {
2951 VisitOMPLoopDirective(D);
2955void ASTStmtWriter::VisitOMPParallelMasterTaskLoopDirective(
2956 OMPParallelMasterTaskLoopDirective *D) {
2957 VisitOMPLoopDirective(D);
2962void ASTStmtWriter::VisitOMPParallelMaskedTaskLoopDirective(
2963 OMPParallelMaskedTaskLoopDirective *D) {
2964 VisitOMPLoopDirective(D);
2969void ASTStmtWriter::VisitOMPParallelMasterTaskLoopSimdDirective(
2970 OMPParallelMasterTaskLoopSimdDirective *D) {
2971 VisitOMPLoopDirective(D);
2975void ASTStmtWriter::VisitOMPParallelMaskedTaskLoopSimdDirective(
2976 OMPParallelMaskedTaskLoopSimdDirective *D) {
2977 VisitOMPLoopDirective(D);
2981void ASTStmtWriter::VisitOMPDistributeDirective(OMPDistributeDirective *D) {
2982 VisitOMPLoopDirective(D);
2986void ASTStmtWriter::VisitOMPTargetUpdateDirective(OMPTargetUpdateDirective *D) {
2988 VisitOMPExecutableDirective(D);
2992void ASTStmtWriter::VisitOMPDistributeParallelForDirective(
2993 OMPDistributeParallelForDirective *D) {
2994 VisitOMPLoopDirective(D);
2999void ASTStmtWriter::VisitOMPDistributeParallelForSimdDirective(
3000 OMPDistributeParallelForSimdDirective *D) {
3001 VisitOMPLoopDirective(D);
3005void ASTStmtWriter::VisitOMPDistributeSimdDirective(
3006 OMPDistributeSimdDirective *D) {
3007 VisitOMPLoopDirective(D);
3011void ASTStmtWriter::VisitOMPTargetParallelForSimdDirective(
3012 OMPTargetParallelForSimdDirective *D) {
3013 VisitOMPLoopDirective(D);
3017void ASTStmtWriter::VisitOMPTargetSimdDirective(OMPTargetSimdDirective *D) {
3018 VisitOMPLoopDirective(D);
3022void ASTStmtWriter::VisitOMPTeamsDistributeDirective(
3023 OMPTeamsDistributeDirective *D) {
3024 VisitOMPLoopDirective(D);
3028void ASTStmtWriter::VisitOMPTeamsDistributeSimdDirective(
3029 OMPTeamsDistributeSimdDirective *D) {
3030 VisitOMPLoopDirective(D);
3034void ASTStmtWriter::VisitOMPTeamsDistributeParallelForSimdDirective(
3035 OMPTeamsDistributeParallelForSimdDirective *D) {
3036 VisitOMPLoopDirective(D);
3040void ASTStmtWriter::VisitOMPTeamsDistributeParallelForDirective(
3041 OMPTeamsDistributeParallelForDirective *D) {
3042 VisitOMPLoopDirective(D);
3047void ASTStmtWriter::VisitOMPTargetTeamsDirective(OMPTargetTeamsDirective *D) {
3049 VisitOMPExecutableDirective(D);
3053void ASTStmtWriter::VisitOMPTargetTeamsDistributeDirective(
3054 OMPTargetTeamsDistributeDirective *D) {
3055 VisitOMPLoopDirective(D);
3059void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForDirective(
3060 OMPTargetTeamsDistributeParallelForDirective *D) {
3061 VisitOMPLoopDirective(D);
3066void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
3067 OMPTargetTeamsDistributeParallelForSimdDirective *D) {
3068 VisitOMPLoopDirective(D);
3069 Code = serialization::
3070 STMT_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE;
3073void ASTStmtWriter::VisitOMPTargetTeamsDistributeSimdDirective(
3074 OMPTargetTeamsDistributeSimdDirective *D) {
3075 VisitOMPLoopDirective(D);
3079void ASTStmtWriter::VisitOMPInteropDirective(OMPInteropDirective *D) {
3081 VisitOMPExecutableDirective(D);
3085void ASTStmtWriter::VisitOMPDispatchDirective(OMPDispatchDirective *D) {
3087 VisitOMPExecutableDirective(D);
3092void ASTStmtWriter::VisitOMPMaskedDirective(OMPMaskedDirective *D) {
3094 VisitOMPExecutableDirective(D);
3098void ASTStmtWriter::VisitOMPGenericLoopDirective(OMPGenericLoopDirective *D) {
3099 VisitOMPLoopDirective(D);
3103void ASTStmtWriter::VisitOMPTeamsGenericLoopDirective(
3104 OMPTeamsGenericLoopDirective *D) {
3105 VisitOMPLoopDirective(D);
3109void ASTStmtWriter::VisitOMPTargetTeamsGenericLoopDirective(
3110 OMPTargetTeamsGenericLoopDirective *D) {
3111 VisitOMPLoopDirective(D);
3116void ASTStmtWriter::VisitOMPParallelGenericLoopDirective(
3117 OMPParallelGenericLoopDirective *D) {
3118 VisitOMPLoopDirective(D);
3122void ASTStmtWriter::VisitOMPTargetParallelGenericLoopDirective(
3123 OMPTargetParallelGenericLoopDirective *D) {
3124 VisitOMPLoopDirective(D);
3132 Record.push_back(S->
clauses().size());
3133 Record.writeEnum(S->Kind);
3134 Record.AddSourceRange(S->Range);
3135 Record.AddSourceLocation(S->DirectiveLoc);
3136 Record.writeOpenACCClauseList(S->
clauses());
3139void ASTStmtWriter::VisitOpenACCAssociatedStmtConstruct(
3141 VisitOpenACCConstructStmt(S);
3147 VisitOpenACCAssociatedStmtConstruct(S);
3151void ASTStmtWriter::VisitOpenACCLoopConstruct(OpenACCLoopConstruct *S) {
3153 VisitOpenACCAssociatedStmtConstruct(S);
3158void ASTStmtWriter::VisitOpenACCCombinedConstruct(OpenACCCombinedConstruct *S) {
3160 VisitOpenACCAssociatedStmtConstruct(S);
3164void ASTStmtWriter::VisitOpenACCDataConstruct(OpenACCDataConstruct *S) {
3166 VisitOpenACCAssociatedStmtConstruct(S);
3170void ASTStmtWriter::VisitOpenACCEnterDataConstruct(
3171 OpenACCEnterDataConstruct *S) {
3173 VisitOpenACCConstructStmt(S);
3177void ASTStmtWriter::VisitOpenACCExitDataConstruct(OpenACCExitDataConstruct *S) {
3179 VisitOpenACCConstructStmt(S);
3183void ASTStmtWriter::VisitOpenACCInitConstruct(OpenACCInitConstruct *S) {
3185 VisitOpenACCConstructStmt(S);
3189void ASTStmtWriter::VisitOpenACCShutdownConstruct(OpenACCShutdownConstruct *S) {
3191 VisitOpenACCConstructStmt(S);
3195void ASTStmtWriter::VisitOpenACCSetConstruct(OpenACCSetConstruct *S) {
3197 VisitOpenACCConstructStmt(S);
3201void ASTStmtWriter::VisitOpenACCUpdateConstruct(OpenACCUpdateConstruct *S) {
3203 VisitOpenACCConstructStmt(S);
3207void ASTStmtWriter::VisitOpenACCHostDataConstruct(OpenACCHostDataConstruct *S) {
3209 VisitOpenACCAssociatedStmtConstruct(S);
3213void ASTStmtWriter::VisitOpenACCWaitConstruct(OpenACCWaitConstruct *S) {
3215 Record.push_back(S->getExprs().size());
3216 VisitOpenACCConstructStmt(S);
3217 Record.AddSourceLocation(S->LParenLoc);
3218 Record.AddSourceLocation(S->RParenLoc);
3219 Record.AddSourceLocation(S->QueuesLoc);
3221 for(Expr *E : S->getExprs())
3227void ASTStmtWriter::VisitOpenACCAtomicConstruct(OpenACCAtomicConstruct *S) {
3229 VisitOpenACCConstructStmt(S);
3236void ASTStmtWriter::VisitOpenACCCacheConstruct(OpenACCCacheConstruct *S) {
3239 VisitOpenACCConstructStmt(S);
3240 Record.AddSourceRange(S->ParensLoc);
3241 Record.AddSourceLocation(S->ReadOnlyLoc);
3257 Record.writeBool(S->
isInOut());
3266 assert(!SwitchCaseIDs.contains(S) &&
"SwitchCase recorded twice");
3267 unsigned NextID = SwitchCaseIDs.size();
3268 SwitchCaseIDs[S] = NextID;
3273 assert(SwitchCaseIDs.contains(S) &&
"SwitchCase hasn't been seen yet");
3274 return SwitchCaseIDs[S];
3278 SwitchCaseIDs.clear();
3293 llvm::DenseMap<Stmt *, uint64_t>::iterator I = SubStmtEntries.find(S);
3294 if (I != SubStmtEntries.end()) {
3295 Record.push_back(I->second);
3301 assert(!ParentStmts.count(S) &&
"There is a Stmt cycle!");
3303 struct ParentStmtInserterRAII {
3305 llvm::DenseSet<Stmt *> &ParentStmts;
3307 ParentStmtInserterRAII(Stmt *S, llvm::DenseSet<Stmt *> &ParentStmts)
3308 : S(S), ParentStmts(ParentStmts) {
3309 ParentStmts.insert(S);
3311 ~ParentStmtInserterRAII() {
3312 ParentStmts.erase(S);
3316 ParentStmtInserterRAII ParentStmtInserter(S, ParentStmts);
3322 SubStmtEntries[S] = Offset;
3327void ASTRecordWriter::FlushStmts() {
3330 assert(Writer->SubStmtEntries.empty() &&
"unexpected entries in sub-stmt map");
3331 assert(Writer->ParentStmts.empty() &&
"unexpected entries in parent stmt map");
3333 for (
unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
3334 Writer->WriteSubStmt(getASTContext(), StmtsToEmit[I]);
3336 assert(N == StmtsToEmit.size() &&
"record modified while being written!");
3343 Writer->SubStmtEntries.clear();
3344 Writer->ParentStmts.clear();
3347 StmtsToEmit.clear();
3350void ASTRecordWriter::FlushSubStmts() {
3354 for (
unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
3355 Writer->WriteSubStmt(getASTContext(), StmtsToEmit[N - I - 1]);
3356 assert(N == StmtsToEmit.size() &&
"record modified while being written!");
3359 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
C Language Family Type Representation.
bool isFailOnly() const
Return true if 'v' is updated only when the condition is evaluated false (compare capture only).
bool isPostfixUpdate() const
Return true if 'v' expression must be updated to original value of 'x', false if 'v' must be updated ...
bool isXLHSInRHSPart() const
Return true if helper update expression has form 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' and...
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
DeclarationNameInfo getDirectiveName() const
Return name of the directive.
SourceLocation getTargetCallLoc() const
Return location of target-call.
bool hasCancel() const
Return true if current directive has inner cancel directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
bool canBeParallelFor() const
Return true if current loop directive's associated loop can be a parallel for.
bool hasCancel() const
Return true if current directive has inner cancel directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
const Stmt * getAssociatedStmt() const
OpenACCAtomicKind getAtomicKind() const
ArrayRef< Expr * > getVarList() const
OpenACCDirectiveKind getParentComputeConstructKind() const
unsigned getBitWidth() const
llvm::APInt getValue() const
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
An object for streaming information to a record.
void push_back(uint64_t N)
Minimal vector-like interface.
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 getSwitchCaseID(SwitchCase *S)
Retrieve the ID for the given switch-case statement.
void ClearSwitchCaseIDs()
unsigned RecordSwitchCaseID(SwitchCase *S)
Record an ID for the given switch-case statement.
unsigned getCompoundStmtAbbrev() const
SmallVector< uint64_t, 64 > RecordData
SourceLocation getColonLoc() const
SourceLocation getQuestionLoc() const
AddrLabelExpr - The GNU address of label extension, representing &&label.
SourceLocation getAmpAmpLoc() const
SourceLocation getLabelLoc() const
LabelDecl * getLabel() const
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...
SourceLocation getRBracketLoc() const
Expr * getBase()
Get base of the array section.
Expr * getLength()
Get length of array section.
bool isOMPArraySection() const
Expr * getStride()
Get stride of array section.
SourceLocation getColonLocSecond() const
Expr * getLowerBound()
Get lower bound of array section.
SourceLocation getColonLocFirst() const
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
SourceLocation getRBracketLoc() const
Expr * getLHS()
An array access can be written A[4] or 4[A] (both are equivalent).
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent.
uint64_t getValue() const
ArrayTypeTrait getTrait() const
Expr * getDimensionExpression() const
TypeSourceInfo * getQueriedTypeSourceInfo() const
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
Expr * getSrcExpr() const
getSrcExpr - Return the Expr to be converted.
SourceLocation getBuiltinLoc() const
getBuiltinLoc - Return the location of the __builtin_astype token.
SourceLocation getRParenLoc() const
getRParenLoc - Return the location of final right parenthesis.
AsmStmt is the base class for GCCAsmStmt and MSAsmStmt.
SourceLocation getAsmLoc() const
unsigned getNumClobbers() const
unsigned getNumOutputs() const
unsigned getNumInputs() const
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load,...
SourceLocation getRParenLoc() const
static unsigned getNumSubExprs(AtomicOp Op)
Determine the number of arguments the specified atomic builtin should have.
SourceLocation getBuiltinLoc() const
Represents an attribute applied to a statement.
SourceLocation getAttrLoc() const
ArrayRef< const Attr * > getAttrs() const
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
Expr * getFalseExpr() const
getFalseExpr - Return the subexpression which will be evaluated if the condition evaluates to false; ...
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
Expr * getCond() const
getCond - Return the condition expression; this is defined in terms of the opaque value.
Expr * getTrueExpr() const
getTrueExpr - Return the subexpression which will be evaluated if the condition evaluates to true; th...
Expr * getCommon() const
getCommon - Return the common expression, written to the left of the condition.
A builtin binary operation expression such as "x + y" or "x <= y".
static OverloadedOperatorKind getOverloadedOperator(Opcode Opc)
Retrieve the overloaded operator kind that corresponds to the given binary opcode.
SourceLocation getOperatorLoc() const
bool hasStoredFPFeatures() const
FPOptionsOverride getStoredFPFeatures() const
Get FPFeatures from trailing storage.
bool hasExcludedOverflowPattern() const
A simple helper class to pack several bits in order into (a) 32 bit integer(s).
void addBits(uint32_t Value, uint32_t BitsWidth)
void reset(uint32_t Value)
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
const BlockDecl * getBlockDecl() const
BreakStmt - This represents a break.
Represents a C++2a __builtin_bit_cast(T, v) expression.
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getBeginLoc() const LLVM_READONLY
CStyleCastExpr - An explicit cast in C (C99 6.5.4) or a C-style cast in C++ (C++ [expr....
SourceLocation getRParenLoc() const
SourceLocation getLParenLoc() const
Represents a call to a CUDA kernel function.
const CallExpr * getConfig() const
A C++ addrspace_cast expression (currently only enabled for OpenCL).
Represents binding an expression to a temporary.
CXXTemporary * getTemporary()
const Expr * getSubExpr() const
A boolean literal, per ([C++ lex.bool] Boolean literals).
SourceLocation getLocation() const
CXXCatchStmt - This represents a C++ catch block.
SourceLocation getCatchLoc() const
Stmt * getHandlerBlock() const
VarDecl * getExceptionDecl() const
A C++ const_cast expression (C++ [expr.const.cast]).
Represents a call to a C++ constructor.
SourceRange getParenOrBraceRange() const
bool isElidable() const
Whether this construction is elidable.
bool hadMultipleCandidates() const
Whether the referred constructor was resolved from an overloaded set having size greater than 1.
Expr * getArg(unsigned Arg)
Return the specified argument.
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
bool isImmediateEscalating() const
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called.
SourceLocation getLocation() const
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
unsigned getNumArgs() const
Return the number of arguments to the constructor call.
CXXConstructionKind getConstructionKind() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
A default argument (C++ [dcl.fct.default]).
SourceLocation getUsedLocation() const
Retrieve the location where this default argument was actually used.
const ParmVarDecl * getParam() const
Expr * getRewrittenExpr()
const DeclContext * getUsedContext() const
bool hasRewrittenInit() const
A use of a default initializer in a constructor or in aggregate initialization.
const DeclContext * getUsedContext() const
const Expr * getRewrittenExpr() const
Retrieve the initializing expression with evaluated immediate calls, if any.
bool hasRewrittenInit() const
FieldDecl * getField()
Get the field whose initializer will be used.
Represents a delete expression for memory deallocation and destructor calls, e.g.
FunctionDecl * getOperatorDelete() const
SourceLocation getBeginLoc() const
bool isGlobalDelete() const
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
bool isArrayFormAsWritten() const
Represents a C++ member access expression where the actual member referenced could not be resolved be...
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '.
SourceLocation getOperatorLoc() const
Retrieve the location of the '->' or '.' operator.
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
QualType getBaseType() const
NamedDecl * getFirstQualifierFoundInScope() const
Retrieve the first part of the nested-name-specifier that was found in the scope of the member access...
Expr * getBase() const
Retrieve the base object of this member expressions, e.g., the x in x.m.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the member name, with source location information.
bool isImplicitAccess() const
True if this is an implicit access, i.e.
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
Helper that selects an expression from an InitListExpr depending on the current expansion index.
InitListExpr * getRangeExpr()
Represents the code generated for an expanded expansion statement.
ArrayRef< Stmt * > getInstantiations() const
bool shouldApplyLifetimeExtensionToPreamble() const
CXXExpansionStmtDecl * getParent()
ArrayRef< Stmt * > getPreambleStmts() const
ArrayRef< Stmt * > getAllSubStmts() const
CXXExpansionStmtPattern - Represents an unexpanded C++ expansion statement.
ExpansionStmtKind getKind() const
SourceLocation getRParenLoc() const
SourceLocation getColonLoc() const
CXXExpansionStmtDecl * getDecl()
SourceLocation getLParenLoc() const
Represents a folding of a pack over an operator.
CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for statement, represented as 'for (ra...
DeclStmt * getBeginStmt()
DeclStmt * getLoopVarStmt()
SourceLocation getForLoc() const
DeclStmt * getRangeStmt()
SourceLocation getRParenLoc() const
SourceLocation getColonLoc() const
SourceLocation getCoawaitLoc() const
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr....
SourceLocation getLParenLoc() const
SourceLocation getRParenLoc() const
Represents a call to an inherited base class constructor from an inheriting constructor.
bool constructsVBase() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will call.
SourceLocation getLocation() const LLVM_READONLY
bool inheritedFromVBase() const
Determine whether the inherited constructor is inherited from a virtual base of the object we constru...
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.
SourceLocation getOperatorLoc() const
Retrieve the location of the cast operator keyword, e.g., static_cast.
SourceRange getAngleBrackets() const LLVM_READONLY
SourceLocation getRParenLoc() const
Retrieve the location of the closing parenthesis.
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
SourceRange getDirectInitRange() const
ExprIterator arg_iterator
ImplicitAllocationParameters implicitAllocationParameters() const
Provides the full set of information about expected implicit parameters in this call.
bool hasInitializer() const
Whether this new-expression has any initializer at all.
FunctionDecl * getOperatorDelete() const
unsigned getNumPlacementArgs() const
TypeSourceInfo * getAllocatedTypeSourceInfo() const
SourceRange getSourceRange() const
SourceRange getTypeIdParens() const
bool isParenTypeId() const
raw_arg_iterator raw_arg_end()
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
raw_arg_iterator raw_arg_begin()
FunctionDecl * getOperatorNew() const
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
Expr * getOperand() const
SourceRange getSourceRange() const
The null pointer literal (C++11 [lex.nullptr])
SourceLocation getLocation() const
A call to an overloaded operator written using operator syntax.
bool isReversed() const
Whether this is a C++20 rewritten reversed operator.
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
Represents a list-initialization with parenthesis.
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getInitLoc() const LLVM_READONLY
MutableArrayRef< Expr * > getInitExprs()
SourceLocation getBeginLoc() const LLVM_READONLY
MutableArrayRef< Expr * > getUserSpecifiedInitExprs()
FieldDecl * getInitializedFieldInUnion()
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
TypeSourceInfo * getDestroyedTypeInfo() const
Retrieve the source location information for the type being destroyed.
bool isArrow() const
Determine whether this pseudo-destructor expression was written using an '->' (otherwise,...
TypeSourceInfo * getScopeTypeInfo() const
Retrieve the scope type in a qualified pseudo-destructor expression.
SourceLocation getTildeLoc() const
Retrieve the location of the '~'.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieves the nested-name-specifier that qualifies the type name, with source-location information.
SourceLocation getDestroyedTypeLoc() const
Retrieve the starting location of the type being destroyed.
SourceLocation getColonColonLoc() const
Retrieve the location of the '::' in a qualified pseudo-destructor expression.
SourceLocation getOperatorLoc() const
Retrieve the location of the '.' or '->' operator.
const IdentifierInfo * getDestroyedTypeIdentifier() const
In a dependent pseudo-destructor expression for which we do not have full type information on the des...
Represents a C++26 reflect expression [expr.reflect].
SourceLocation getOperatorLoc() const
Returns location of the '^^'-operator.
ReflectionKind getKind() const
const TypeSourceInfo * getTypeSourceInfo() const
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
A rewritten comparison expression that was originally written using operator syntax.
Expr * getSemanticForm()
Get an equivalent semantic form for this expression.
bool isReversed() const
Determine whether this expression was rewritten in reverse form.
An expression "T()" which creates an rvalue of a non-class type T.
TypeSourceInfo * getTypeSourceInfo() const
SourceLocation getRParenLoc() const
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.
TypeSourceInfo * getTypeSourceInfo() const
Represents the this expression in C++.
bool isCapturedByCopyInLambdaWithExplicitObjectParameter() const
SourceLocation getLocation() const
A C++ throw-expression (C++ [except.throw]).
const Expr * getSubExpr() const
SourceLocation getThrowLoc() const
bool isThrownVariableInScope() const
Determines whether the variable thrown by this expression (if any!) is within the innermost try block...
CXXTryStmt - A C++ try block, including all handlers.
SourceLocation getTryLoc() const
CXXCatchStmt * getHandler(unsigned i)
unsigned getNumHandlers() const
CompoundStmt * getTryBlock()
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
bool isTypeOperand() const
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Expr * getExprOperand() const
SourceRange getSourceRange() const LLVM_READONLY
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
SourceLocation getLParenLoc() const
Retrieve the location of the left parentheses ('(') that precedes the argument list.
bool isListInitialization() const
Determine whether this expression models list-initialization.
TypeSourceInfo * getTypeSourceInfo() const
Retrieve the type source information for the type being constructed.
SourceLocation getRParenLoc() const
Retrieve the location of the right parentheses (')') that follows the argument list.
unsigned getNumArgs() const
Retrieve the number of arguments.
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
Expr * getExprOperand() const
MSGuidDecl * getGuidDecl() const
bool isTypeOperand() const
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
SourceRange getSourceRange() const LLVM_READONLY
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
bool hasStoredFPFeatures() const
bool usesMemberSyntax() const
ExprIterator arg_iterator
ADLCallKind getADLCallKind() const
FPOptionsOverride getFPFeatures() const
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
bool isCoroElideSafe() const
SourceLocation getRParenLoc() const
This captures a statement into a function.
capture_init_range capture_inits()
CapturedDecl * getCapturedDecl()
Retrieve the outlined function declaration.
capture_iterator capture_end() const
Retrieve an iterator pointing past the end of the sequence of captures.
const RecordDecl * getCapturedRecordDecl() const
Retrieve the record declaration for captured variables.
Stmt * getCapturedStmt()
Retrieve the statement being captured.
capture_iterator capture_begin()
Retrieve an iterator pointing to the first capture.
CapturedRegionKind getCapturedRegionKind() const
Retrieve the captured region kind.
CaseStmt - Represent a case statement.
bool caseStmtIsGNURange() const
True if this case statement is of the form case LHS ... RHS, which is a GNU extension.
SourceLocation getEllipsisLoc() const
Get the location of the ... in a case statement of the form LHS ... RHS.
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
path_iterator path_begin()
unsigned path_size() const
CastKind getCastKind() const
bool hasStoredFPFeatures() const
CXXBaseSpecifier ** path_iterator
FPOptionsOverride getFPFeatures() const
SourceLocation getLocation() const
unsigned getValue() const
CharacterLiteralKind getKind() const
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
SourceLocation getBuiltinLoc() const
bool isConditionDependent() const
bool isConditionTrue() const
isConditionTrue - Return whether the condition is true (i.e.
SourceLocation getRParenLoc() const
Represents a 'co_await' expression.
CompoundAssignOperator - For compound assignments (e.g.
QualType getComputationLHSType() const
QualType getComputationResultType() const
CompoundLiteralExpr - [C99 6.5.2.5].
SourceLocation getLParenLoc() const
const Expr * getInitializer() const
TypeSourceInfo * getTypeSourceInfo() const
CompoundStmt - This represents a group of statements like { stmt stmt }.
FPOptionsOverride getStoredFPFeatures() const
Get FPOptionsOverride from trailing storage.
SourceLocation getLBracLoc() const
bool hasStoredFPFeatures() const
SourceLocation getRBracLoc() const
Represents the specialization of a concept - evaluates to a prvalue of type bool.
ConceptReference * getConceptReference() const
const ImplicitConceptSpecializationDecl * getSpecializationDecl() const
const ASTConstraintSatisfaction & getSatisfaction() const
Get elaborated satisfaction info about the template arguments' satisfaction of the named concept.
ConditionalOperator - The ?
Expr * getCond() const
getCond - Return the expression representing the condition for the ?
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
ConstantResultStorageKind getResultStorageKind() const
ContinueStmt - This represents a continue.
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
SourceLocation getRParenLoc() const
getRParenLoc - Return the location of final right parenthesis.
SourceLocation getBuiltinLoc() const
getBuiltinLoc - Return the location of the __builtin_convertvector token.
FPOptionsOverride getStoredFPFeatures() const
Get FPFeatures from trailing storage.
TypeSourceInfo * getTypeSourceInfo() const
getTypeSourceInfo - Return the destination type.
bool hasStoredFPFeatures() const
Is FPFeatures in Trailing Storage?
Expr * getSrcExpr() const
getSrcExpr - Return the Expr to be converted.
Represents a 'co_return' statement in the C++ Coroutines TS.
Expr * getOperand() const
Retrieve the operand of the 'co_return' statement.
Expr * getPromiseCall() const
Retrieve the promise call that results from this 'co_return' statement.
SourceLocation getKeywordLoc() const
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...
SourceLocation getKeywordLoc() const
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
Represents a 'co_yield' expression.
NamedDecl * getDecl() const
AccessSpecifier getAccess() const
DeclContext * getParent()
getParent - Returns the containing DeclContext.
bool isFileContext() const
A reference to a declared variable, function, enum, etc.
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
NamedDecl * getFoundDecl()
Get the NamedDecl through which this reference occurred.
bool refersToEnclosingVariableOrCapture() const
Does this DeclRefExpr refer to an enclosing local or a captured variable?
bool hasTemplateKWAndArgsInfo() const
bool hasQualifier() const
Determine whether this declaration reference was preceded by a C++ nested-name-specifier,...
NestedNameSpecifierLoc getQualifierLoc() const
If the name was qualified, retrieves the nested-name-specifier that precedes the name,...
NonOdrUseReason isNonOdrUse() const
Is this expression a non-odr-use reference, and if so, why?
bool hadMultipleCandidates() const
Returns true if this expression refers to a function that was resolved from an overloaded set having ...
SourceLocation getLocation() const
bool isImmediateEscalating() const
DeclStmt - Adaptor class for mixing declarations with statements and expressions.
SourceLocation getEndLoc() const
const DeclGroupRef getDeclGroup() const
SourceLocation getBeginLoc() const LLVM_READONLY
NameKind
The kind of the name stored in this DeclarationName.
DeferStmt - This represents a deferred statement.
SourceLocation getDeferLoc() const
Represents a 'co_await' expression while the type of the promise is dependent.
SourceLocation getKeywordLoc() const
A qualified reference to a name whose declaration cannot yet be resolved.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source location information.
A template-id naming a variable template or a concept through a template template parameter.
const DeclarationNameInfo & getNameInfo() const
TemplateName getTemplateName() const
unsigned getNumTemplateArgs() const
Represents a C99 designated initializer expression.
Expr * getSubExpr(unsigned Idx) const
bool usesGNUSyntax() const
Determines whether this designated initializer used the deprecated GNU syntax for designated initiali...
MutableArrayRef< Designator > designators()
SourceLocation getEqualOrColonLoc() const
Retrieve the location of the '=' that precedes the initializer value itself, if present.
unsigned getNumSubExprs() const
Retrieve the total number of subexpressions in this designated initializer expression,...
InitListExpr * getUpdater() const
DoStmt - This represents a 'do/while' stmt.
SourceLocation getWhileLoc() const
SourceLocation getDoLoc() const
SourceLocation getRParenLoc() const
IdentifierInfo & getAccessor() const
const Expr * getBase() const
SourceLocation getAccessorLoc() const
Represents a reference to emded data.
unsigned getStartingElementPos() const
StringLiteral * getDataStringLiteral() const
SourceLocation getBeginLoc() const
size_t getDataElementCount() const
ExplicitCastExpr - An explicit cast written in the source code.
TypeSourceInfo * getTypeInfoAsWritten() const
getTypeInfoAsWritten - Returns the type source info for the type that this expression is casting to.
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
bool cleanupsHaveSideEffects() const
ArrayRef< CleanupObject > getObjects() const
unsigned getNumObjects() const
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.
bool isTypeDependent() const
Determines whether the type of this expression depends on.
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.
Expr * getQueriedExpression() const
ExpressionTrait getTrait() const
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
storage_type getAsOpaqueInt() const
SourceLocation getLocation() const
Retrieve the location of the literal.
unsigned getScale() const
llvm::APInt getValue() const
Returns an internal integer representation of the literal.
SourceLocation getLocation() const
llvm::APFloatBase::Semantics getRawSemantics() const
Get a raw enumeration value representing the floating-point semantics of this literal (32-bit IEEE,...
llvm::APFloat getValue() const
ForStmt - This represents a 'for (init;cond;inc)' stmt.
SourceLocation getRParenLoc() const
SourceLocation getForLoc() const
SourceLocation getLParenLoc() const
DeclStmt * getConditionVariableDeclStmt()
If this ForStmt has a condition variable, return the faux DeclStmt associated with the creation of th...
const Expr * getSubExpr() const
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.
ValueDecl * getParameterPack() const
Get the parameter pack which this expression refers to.
unsigned getNumExpansions() const
Get the number of parameters in this parameter pack.
SourceLocation getParameterPackLocation() const
Get the location of the parameter pack.
This represents a GCC inline-assembly statement extension.
unsigned getNumLabels() const
SourceLocation getRParenLoc() const
IdentifierInfo * getInputIdentifier(unsigned i) const
const Expr * getOutputConstraintExpr(unsigned i) const
IdentifierInfo * getLabelIdentifier(unsigned i) const
const Expr * getInputConstraintExpr(unsigned i) const
IdentifierInfo * getOutputIdentifier(unsigned i) const
const Expr * getAsmStringExpr() const
Expr * getOutputExpr(unsigned i)
Expr * getClobberExpr(unsigned i)
Expr * getInputExpr(unsigned i)
AddrLabelExpr * getLabelExpr(unsigned i) const
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
SourceLocation getTokenLocation() const
getTokenLocation - The location of the __null token.
Represents a C11 generic selection.
unsigned getNumAssocs() const
The number of association expressions.
bool isExprPredicate() const
Whether this generic selection uses an expression as its controlling argument.
SourceLocation getGenericLoc() const
SourceLocation getRParenLoc() const
SourceLocation getDefaultLoc() const
GotoStmt - This represents a direct goto.
SourceLocation getLabelLoc() const
SourceLocation getGotoLoc() const
LabelDecl * getLabel() const
This class represents temporary values used to represent inout and out arguments in HLSL.
const OpaqueValueExpr * getCastedTemporary() const
const OpaqueValueExpr * getOpaqueArgLValue() const
bool isInOut() const
returns true if the parameter is inout and false if the parameter is out.
const Expr * getWritebackCast() const
IfStmt - This represents an if/then/else.
SourceLocation getIfLoc() const
IfStatementKind getStatementKind() const
SourceLocation getElseLoc() const
SourceLocation getLParenLoc() const
DeclStmt * getConditionVariableDeclStmt()
If this IfStmt has a condition variable, return the faux DeclStmt associated with the creation of tha...
SourceLocation getRParenLoc() const
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1....
const Expr * getSubExpr() const
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
bool isPartOfExplicitCast() const
Represents an implicitly-generated value initialization of an object of a given type.
IndirectGotoStmt - This represents an indirect goto.
SourceLocation getGotoLoc() const
SourceLocation getStarLoc() const
Describes an C or C++ initializer list.
FieldDecl * getInitializedFieldInUnion()
If this initializes a union, specifies which field in the union to initialize.
unsigned getNumInits() const
SourceLocation getLBraceLoc() const
InitListExpr * getSyntacticForm() const
bool hadArrayRangeDesignator() const
Expr * getArrayFiller()
If this initializer list initializes an array with more elements than there are initializers in the l...
SourceLocation getRBraceLoc() const
const Expr * getInit(unsigned Init) const
SourceLocation getLocation() const
Retrieve the location of the literal.
LabelStmt - Represents a label, which has a substatement.
LabelDecl * getDecl() const
SourceLocation getIdentLoc() const
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
Expr ** capture_init_iterator
Iterator that walks over the capture initialization arguments.
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument for this lambda expression.
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
Base class for BreakStmt and ContinueStmt.
SourceLocation getLabelLoc() const
LabelDecl * getLabelDecl()
SourceLocation getKwLoc() const
bool hasLabelTarget() const
This represents a Microsoft inline-assembly statement extension.
Expr * getOutputExpr(unsigned i)
StringRef getAsmString() const
SourceLocation getLBraceLoc() const
SourceLocation getEndLoc() const
StringRef getInputConstraint(unsigned i) const
StringRef getOutputConstraint(unsigned i) const
StringRef getClobber(unsigned i) const
Expr * getInputExpr(unsigned i)
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name.
bool isIfExists() const
Determine whether this is an __if_exists statement.
DeclarationNameInfo getNameInfo() const
Retrieve the name of the entity we're testing for, along with location information.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies this name, if any.
CompoundStmt * getSubStmt() const
Retrieve the compound statement that will be included in the program only if the existence of the sym...
SourceLocation getKeywordLoc() const
Retrieve the location of the __if_exists or __if_not_exists keyword.
A member reference to an MSPropertyDecl.
NestedNameSpecifierLoc getQualifierLoc() const
MSPropertyDecl * getPropertyDecl() const
Expr * getBaseExpr() const
SourceLocation getMemberLoc() const
MS property subscript expression.
SourceLocation getRBracketLoc() const
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
Expr * getSubExpr() const
Retrieve the temporary-generating subexpression whose value will be materialized into a glvalue.
LifetimeExtendedTemporaryDecl * getLifetimeExtendedTemporaryDecl()
MatrixSingleSubscriptExpr - Matrix single subscript expression for the MatrixType extension when you ...
SourceLocation getRBracketLoc() const
MatrixSubscriptExpr - Matrix subscript expression for the MatrixType extension.
SourceLocation getRBracketLoc() const
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
SourceLocation getMemberLoc() const
getMemberLoc - Return the location of the "member", in X->F, it is the location of 'F'.
SourceLocation getOperatorLoc() const
NestedNameSpecifierLoc getQualifierLoc() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name,...
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
NonOdrUseReason isNonOdrUse() const
Is this expression a non-odr-use reference, and if so, why?
bool hasQualifier() const
Determines whether this member expression actually had a C++ nested-name-specifier prior to the name ...
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
bool hadMultipleCandidates() const
Returns true if this member expression refers to a method that was resolved from an overloaded set ha...
DeclAccessPair getFoundDecl() const
Retrieves the declaration found by lookup.
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Represents a place-holder for an object not to be initialized by anything.
NullStmt - This is the null statement ";": C99 6.8.3p3.
SourceLocation getSemiLoc() const
An explicit cast in C or a C-style cast in C++, which uses the syntax ([s1][s2]......
Expr * getBase()
Fetches base expression of array shaping expression.
SourceLocation getLParenLoc() const
ArrayRef< Expr * > getDimensions() const
Fetches the dimensions for array shaping expression.
SourceLocation getRParenLoc() const
ArrayRef< SourceRange > getBracketsRanges() const
Fetches source ranges for the brackets os the array shaping expression.
OpenMP 5.0 [2.1.6 Iterators] Iterators are identifiers that expand to multiple values in the clause o...
SourceLocation getLParenLoc() const
SourceLocation getSecondColonLoc(unsigned I) const
Gets the location of the second ':' (if any) in the range for the given iteratori definition.
SourceLocation getColonLoc(unsigned I) const
Gets the location of the first ':' in the range for the given iterator definition.
SourceLocation getRParenLoc() const
IteratorRange getIteratorRange(unsigned I)
Gets the iterator range for the given iterator.
OMPIteratorHelperData & getHelper(unsigned I)
Fetches helper data for the specified iteration space.
SourceLocation getAssignLoc(unsigned I) const
Gets the location of '=' for the given iterator definition.
SourceLocation getIteratorKwLoc() const
unsigned numOfIterators() const
Returns number of iterator definitions.
Decl * getIteratorDecl(unsigned I)
Gets the iterator declaration for the given iterator.
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp,...
Expr * getElement(unsigned Index)
getElement - Return the Element at the specified index.
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c array literal.
SourceRange getSourceRange() const LLVM_READONLY
ObjCMethodDecl * getArrayWithObjectsMethod() const
Represents Objective-C's @catch statement.
const VarDecl * getCatchParamDecl() const
const Stmt * getCatchBody() const
SourceLocation getAtCatchLoc() const
SourceLocation getRParenLoc() const
Represents Objective-C's @finally statement.
const Stmt * getFinallyBody() const
SourceLocation getAtFinallyLoc() const
Represents Objective-C's @synchronized statement.
const Expr * getSynchExpr() const
const CompoundStmt * getSynchBody() const
SourceLocation getAtSynchronizedLoc() const
Represents Objective-C's @throw statement.
const Expr * getThrowExpr() const
SourceLocation getThrowLoc() const LLVM_READONLY
Represents Objective-C's @try ... @catch ... @finally statement.
const ObjCAtFinallyStmt * getFinallyStmt() const
Retrieve the @finally statement, if any.
unsigned getNumCatchStmts() const
Retrieve the number of @catch statements in this try-catch-finally block.
const Stmt * getTryBody() const
Retrieve the @try body.
SourceLocation getAtTryLoc() const
Retrieve the location of the @ in the @try.
catch_range catch_stmts()
Represents Objective-C's @autoreleasepool Statement.
SourceLocation getAtLoc() const
const Stmt * getSubStmt() const
A runtime availability query.
SourceRange getSourceRange() const
VersionTuple getVersion() const
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
SourceLocation getLocation() const
ObjCBoxedExpr - used for generalized expression boxing.
SourceRange getSourceRange() const LLVM_READONLY
ObjCMethodDecl * getBoxingMethod() const
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers,...
SourceLocation getLParenLoc() const
SourceLocation getBridgeKeywordLoc() const
The location of the bridge keyword.
ObjCBridgeCastKind getBridgeKind() const
Determine which kind of bridge is being performed via this cast.
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c dictionary literal.
ObjCMethodDecl * getDictWithObjectsMethod() const
ObjCDictionaryElement getKeyValueElement(unsigned Index) const
SourceRange getSourceRange() const LLVM_READONLY
ObjCEncodeExpr, used for @encode in Objective-C.
TypeSourceInfo * getEncodedTypeSourceInfo() const
SourceLocation getRParenLoc() const
SourceLocation getAtLoc() const
Represents Objective-C's collection statement.
SourceLocation getForLoc() const
SourceLocation getRParenLoc() const
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
bool shouldCopy() const
shouldCopy - True if we should do the 'copy' part of the copy-restore.
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
SourceLocation getIsaMemberLoc() const
getMemberLoc - Return the location of the "member", in X->F, it is the location of 'F'.
SourceLocation getOpLoc() const
ObjCIvarRefExpr - A reference to an ObjC instance variable.
SourceLocation getLocation() const
SourceLocation getOpLoc() const
const Expr * getBase() const
An expression that sends a message to the given Objective-C object or class.
bool isDelegateInitCall() const
isDelegateInitCall - Answers whether this message send has been tagged as a "delegate init call",...
SourceLocation getLeftLoc() const
Expr * getInstanceReceiver()
Returns the object expression (receiver) for an instance message, or null for a message that is not a...
SourceLocation getSuperLoc() const
Retrieve the location of the 'super' keyword for a class or instance message to 'super',...
Selector getSelector() const
@ 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.
TypeSourceInfo * getClassReceiverTypeInfo() const
Returns a type-source information of a class message send, or nullptr if the message is not a class m...
QualType getSuperType() const
Retrieve the type referred to by 'super'.
const ObjCMethodDecl * getMethodDecl() const
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
SourceLocation getRightLoc() const
unsigned getNumArgs() const
Return the number of actual arguments in this message, not counting the receiver.
Base class for Objective-C object literals ("...", @42, @[],}).
bool isExpressibleAsConstantInitializer() const
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
ObjCPropertyDecl * getExplicitProperty() const
ObjCMethodDecl * getImplicitPropertyGetter() const
SourceLocation getReceiverLocation() const
const Expr * getBase() const
bool isObjectReceiver() const
QualType getSuperReceiverType() const
bool isImplicitProperty() const
ObjCMethodDecl * getImplicitPropertySetter() const
ObjCInterfaceDecl * getClassReceiver() const
SourceLocation getLocation() const
bool isSuperReceiver() const
ObjCProtocolExpr used for protocol expression in Objective-C.
ObjCProtocolDecl * getProtocol() const
SourceLocation getRParenLoc() const
SourceLocation getAtLoc() const
ObjCSelectorExpr used for @selector in Objective-C.
SourceLocation getSelectorNameLoc() const
SourceLocation getRParenLoc() const
Selector getSelector() const
SourceLocation getAtLoc() const
ObjCStringLiteral, used for Objective-C string literals i.e.
SourceLocation getAtLoc() const
StringLiteral * getString()
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
Expr * getKeyExpr() const
Expr * getBaseExpr() const
ObjCMethodDecl * getAtIndexMethodDecl() const
SourceLocation getRBracket() const
ObjCMethodDecl * setAtIndexMethodDecl() const
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type,...
Expr * getIndexExpr(unsigned Idx)
SourceLocation getOperatorLoc() const
getOperatorLoc - Return the location of the operator.
const OffsetOfNode & getComponent(unsigned Idx) const
TypeSourceInfo * getTypeSourceInfo() const
unsigned getNumExpressions() const
SourceLocation getRParenLoc() const
Return the location of the right parentheses.
unsigned getNumComponents() const
const IdentifierInfo * getFieldName() const
For a field or identifier offsetof node, returns the name of the field.
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.
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.
Expr * getSourceExpr() const
The source expression of an opaque value expression is the expression which originally generated the ...
SourceLocation getLocation() const
Retrieve the location of this expression.
This is a base class for any OpenACC statement-level constructs that have an associated statement.
Stmt * getAssociatedStmt()
This expression type represents an asterisk in an OpenACC Size-Expr, used in the 'tile' and 'gang' cl...
SourceLocation getLocation() const
This is the base class for an OpenACC statement-level construct, other construct types are expected t...
ArrayRef< const OpenACCClause * > clauses() const
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr.
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
const DeclarationNameInfo & getNameInfo() const
Gets the full name info.
UnresolvedSetImpl::iterator decls_iterator
decls_iterator decls_begin() const
unsigned getNumDecls() const
Gets the number of declarations in the unresolved set.
NestedNameSpecifierLoc getQualifierLoc() const
Fetches the nested-name qualifier with source-location information, if one was given.
TemplateArgumentLoc * getTrailingTemplateArgumentLoc()
Return the optional template arguments.
bool hasTemplateKWAndArgsInfo() const
decls_iterator decls_end() const
DeclarationName getName() const
Gets the name looked up.
Represents a C++11 pack expansion that produces a sequence of expressions.
Expr * getPattern()
Retrieve the pattern of the pack expansion.
SourceLocation getEllipsisLoc() const
Retrieve the location of the ellipsis that describes this pack expansion.
SourceLocation getEllipsisLoc() const
Determine the location of the 'sizeof' keyword.
Expr * getIndexExpr() const
ArrayRef< Expr * > getExpressions() const
Return the trailing expressions, regardless of the expansion.
SourceLocation getRSquareLoc() const
Determine the location of the right parenthesis.
Expr * getPackIdExpression() const
ParenExpr - This represents a parenthesized expression, e.g.
SourceLocation getLParen() const
Get the location of the left parentheses '('.
const Expr * getSubExpr() const
bool isProducedByFoldExpansion() const
SourceLocation getRParen() const
Get the location of the right parentheses ')'.
ArrayRef< Expr * > exprs() const
unsigned getNumExprs() const
Return the number of expressions in this paren list.
SourceLocation getLParenLoc() const
SourceLocation getRParenLoc() const
[C99 6.4.2.2] - A predefined identifier such as func.
bool isTransparent() const
PredefinedIdentKind getIdentKind() const
SourceLocation getLocation() const
StringLiteral * getFunctionName()
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
semantics_iterator semantics_end()
unsigned getResultExprIndex() const
Return the index of the result-bearing expression into the semantics expressions, or PseudoObjectExpr...
semantics_iterator semantics_begin()
Expr *const * semantics_iterator
unsigned getNumSemanticExprs() const
Expr * getSyntacticForm()
Return the syntactic form of this expression, i.e.
Frontend produces RecoveryExprs on semantic errors that prevent creating other well-formed expression...
SourceLocation getEndLoc() const
SourceLocation getBeginLoc() const
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
SourceLocation getLParenLoc() const
SourceLocation getRParenLoc() const
SourceLocation getEndLoc() const LLVM_READONLY
RequiresExprBodyDecl * getBody() const
ArrayRef< concepts::Requirement * > getRequirements() const
ArrayRef< ParmVarDecl * > getLocalParameters() const
ReturnStmt - This represents a return, optionally of an expression: return; return 4;.
SourceLocation getReturnLoc() const
const VarDecl * getNRVOCandidate() const
Retrieve the variable that might be used for the named return value optimization.
CompoundStmt * getBlock() const
SourceLocation getExceptLoc() const
Expr * getFilterExpr() const
SourceLocation getFinallyLoc() const
CompoundStmt * getBlock() const
Represents a __leave statement.
SourceLocation getLeaveLoc() const
CompoundStmt * getTryBlock() const
SourceLocation getTryLoc() const
Stmt * getHandler() const
SYCLKernelCallStmt represents the transformation that is applied to the body of a function declared w...
CompoundStmt * getOriginalStmt()
OutlinedFunctionDecl * getOutlinedFunctionDecl()
Stmt * getKernelLaunchStmt()
SourceLocation getLocation() const
SourceLocation getLParenLocation() const
TypeSourceInfo * getTypeSourceInfo()
SourceLocation getRParenLocation() const
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
SourceLocation getBuiltinLoc() const
unsigned getNumSubExprs() const
getNumSubExprs - Return the size of the SubExprs array.
SourceLocation getRParenLoc() const
Expr * getExpr(unsigned Index)
getExpr - Return the Expr at the specified index.
Represents an expression that computes the length of a parameter pack.
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof... expression, such as is produced f...
ArrayRef< TemplateArgument > getPartialArguments() const
Get.
unsigned getPackLength() const
Retrieve the length of the parameter pack.
Represents a function call to one of __builtin_LINE(), __builtin_COLUMN(), __builtin_FUNCTION(),...
SourceLocation getBeginLoc() const
const DeclContext * getParentContext() const
If the SourceLocExpr has been resolved return the subexpression representing the resolved value.
SourceLocation getEndLoc() const
SourceLocIdentKind getIdentKind() const
SourceLocation getEnd() const
SourceLocation getBegin() const
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
CompoundStmt * getSubStmt()
unsigned getTemplateDepth() const
SourceLocation getRParenLoc() const
SourceLocation getLParenLoc() const
StmtVisitor - This class implements a simple visitor for Stmt subclasses.
Stmt - This represents one statement.
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
NullStmtBitfields NullStmtBits
DependentScopeDeclRefExprBitfields DependentScopeDeclRefExprBits
StringLiteral - This represents a string literal expression, e.g.
SourceLocation getStrTokenLoc(unsigned TokNum) const
Get one of the string literal token.
unsigned getLength() const
StringLiteralKind getKind() const
StringRef getBytes() const
Allow access to clients that need the byte representation, such as ASTWriterStmt::VisitStringLiteral(...
unsigned getByteLength() const
unsigned getNumConcatenated() const
Get the number of string literal tokens that were concatenated in translation phase #6 to form this s...
unsigned getCharByteWidth() const
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Decl * getAssociatedDecl() const
A template-like entity which owns the whole pattern being substituted.
UnsignedOrNone getPackIndex() const
QualType getParameterType() const
Determine the substituted type of the template parameter.
unsigned getIndex() const
Returns the index of the replaced parameter in the associated declaration.
SourceLocation getNameLoc() const
Expr * getReplacement() const
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
TemplateArgument getArgumentPack() const
Retrieve the template argument pack containing the substituted template arguments.
SourceLocation getParameterPackLocation() const
Retrieve the location of the parameter pack name.
Decl * getAssociatedDecl() const
A template-like entity which owns the whole pattern being substituted.
unsigned getIndex() const
Returns the index of the replaced parameter in the associated declaration.
SourceLocation getKeywordLoc() const
SourceLocation getColonLoc() const
const SwitchCase * getNextSwitchCase() const
SwitchStmt - This represents a 'switch' stmt.
SourceLocation getSwitchLoc() const
SourceLocation getLParenLoc() const
bool isAllEnumCasesCovered() const
Returns true if the SwitchStmt is a switch of an enum value and all cases have been explicitly covere...
SourceLocation getRParenLoc() const
SwitchCase * getSwitchCaseList()
DeclStmt * getConditionVariableDeclStmt()
If this SwitchStmt has a condition variable, return the faux DeclStmt associated with the creation of...
Location wrapper for a TemplateArgument.
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
TypeSourceInfo * getArg(unsigned I) const
Retrieve the Ith argument.
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
const APValue & getAPValue() const
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand.
SourceLocation getRParenLoc() const
SourceLocation getOperatorLoc() const
bool isArgumentType() const
TypeSourceInfo * getArgumentTypeInfo() const
UnaryExprOrTypeTrait getKind() const
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
SourceLocation getOperatorLoc() const
getOperatorLoc - Return the location of the operator.
Expr * getSubExpr() const
bool hasStoredFPFeatures() const
Is FPFeatures in Trailing Storage?
FPOptionsOverride getStoredFPFeatures() const
Get FPFeatures from trailing storage.
bool canOverflow() const
Returns true if the unary operator can cause an overflow.
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
CXXRecordDecl * getNamingClass()
Gets the 'naming class' (in the sense of C++0x [class.access.base]p5) of the lookup.
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
Represents a C++ member access expression for which lookup produced a set of overloaded functions.
QualType getBaseType() const
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '.
SourceLocation getOperatorLoc() const
Retrieve the location of the '->' or '.' operator.
bool hasUnresolvedUsing() const
Determine whether the lookup results contain an unresolved using declaration.
Expr * getBase()
Retrieve the base object of this member expressions, e.g., the x in x.m.
bool isImplicitAccess() const
True if this is an implicit access, i.e., one in which the member being accessed was not written in t...
Expr * getKernelLaunchIdExpr()
CompoundStmt * getOriginalStmt()
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.
TypeSourceInfo * getWrittenTypeInfo() const
SourceLocation getBuiltinLoc() const
SourceLocation getRParenLoc() const
VarArgKind getVarargABI() const
const Expr * getSubExpr() const
WhileStmt - This represents a 'while' stmt.
SourceLocation getWhileLoc() const
SourceLocation getRParenLoc() const
DeclStmt * getConditionVariableDeclStmt()
If this WhileStmt has a condition variable, return the faux DeclStmt associated with the creation of ...
SourceLocation getLParenLoc() const
@ SS_ConstraintsNotSatisfied
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
@ 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
@ 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
@ STMT_OMP_ORDERED_STANDALONE_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_UNRESOLVED_SYCL_KERNEL_CALL
An UnresolvedSYCLKernelCallStmt record.
@ STMT_OMP_ORDERED_BLOCK_ASSOC_DIRECTIVE
@ STMT_OMP_TARGET_TEAMS_GENERIC_LOOP_DIRECTIVE
@ STMT_OMP_TEAMS_DIRECTIVE
@ STMT_OMP_TARGET_PARALLEL_DIRECTIVE
@ EXPR_CXX_REWRITTEN_BINARY_OPERATOR
A CXXRewrittenBinaryOperator record.
@ STMT_GOTO
A GotoStmt record.
@ EXPR_NO_INIT
An NoInitExpr record.
@ EXPR_OBJC_ARRAY_LITERAL
@ STMT_OMP_ERROR_DIRECTIVE
@ EXPR_OBJC_PROTOCOL_EXPR
An ObjCProtocolExpr record.
@ STMT_OMP_GENERIC_LOOP_DIRECTIVE
@ EXPR_ARRAY_INIT_INDEX
An ArrayInitIndexExpr record.
@ STMT_OMP_TASK_DIRECTIVE
@ 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
@ STMT_OMP_FLATTEN_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_FUSE_DIRECTIVE
@ STMT_OMP_TEAMS_DISTRIBUTE_DIRECTIVE
@ STMT_CXX_EXPANSION_INSTANTIATION
A CXXExpansionInstantiationStmt.
@ 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.
@ STMT_CXX_EXPANSION_PATTERN
A CXXExpansionPatternStmt.
@ 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_SPLIT_DIRECTIVE
@ 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
@ EXPR_DEPENDENT_TEMPLATE_ID
@ 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.
@ EXPR_CXX_EXPANSION_SELECT
@ STMT_OBJC_AT_THROW
An ObjCAtThrowStmt record.
@ EXPR_ADDR_LABEL
An AddrLabelExpr record.
@ EXPR_MATRIX_ELEMENT
A MatrixElementExpr 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.
Top level wrappers for InstallAPI frontend operations.
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
bool isa(CodeGen::Address addr)
@ OK_Ordinary
An ordinary object is located at an address in memory.
OpenACCComputeConstruct(OpenACCDirectiveKind K, SourceLocation Start, SourceLocation DirectiveLoc, SourceLocation End, ArrayRef< const OpenACCClause * > Clauses, Stmt *StructuredBlock)
bool isAlignedAllocation(AlignedAllocationMode Mode)
bool isTypeAwareAllocation(TypeAwareAllocationMode Mode)
@ VK_PRValue
A pr-value expression (in the C++11 taxonomy) produces a temporary value.
U cast(CodeGen::Address addr)
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
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.
Expr * Value
The value of the dictionary element.
SourceLocation EllipsisLoc
The location of the ellipsis, if this is a pack expansion.
UnsignedOrNone NumExpansions
The number of elements this pack expansion will expand to, if this is a pack expansion and is known.
Expr * Key
The key for the dictionary element.
constexpr underlying_type toInternalRepresentation() const
StringRef SubstitutedEntity