21 #include "llvm/Bitstream/BitstreamWriter.h" 22 using namespace clang;
39 : Writer(Writer), Record(Writer, Record),
46 "unhandled sub-statement writing AST file");
47 return Record.
EmitStmt(Code, AbbrevToUse);
54 #define STMT(Type, Base) \ 55 void Visit##Type(Type *); 56 #include "clang/AST/StmtNodes.inc" 73 void ASTStmtWriter::VisitNullStmt(
NullStmt *S) {
83 for (
auto *CS : S->
body())
90 void ASTStmtWriter::VisitSwitchCase(
SwitchCase *S) {
97 void ASTStmtWriter::VisitCaseStmt(
CaseStmt *S) {
109 void ASTStmtWriter::VisitDefaultStmt(
DefaultStmt *S) {
115 void ASTStmtWriter::VisitLabelStmt(
LabelStmt *S) {
132 void ASTStmtWriter::VisitIfStmt(
IfStmt *S) {
135 bool HasElse = S->
getElse() !=
nullptr;
137 bool HasInit = S->
getInit() !=
nullptr;
160 void ASTStmtWriter::VisitSwitchStmt(
SwitchStmt *S) {
163 bool HasInit = S->
getInit() !=
nullptr;
184 void ASTStmtWriter::VisitWhileStmt(
WhileStmt *S) {
199 void ASTStmtWriter::VisitDoStmt(
DoStmt *S) {
209 void ASTStmtWriter::VisitForStmt(
ForStmt *S) {
222 void ASTStmtWriter::VisitGotoStmt(
GotoStmt *S) {
238 void ASTStmtWriter::VisitContinueStmt(
ContinueStmt *S) {
244 void ASTStmtWriter::VisitBreakStmt(
BreakStmt *S) {
250 void ASTStmtWriter::VisitReturnStmt(
ReturnStmt *S) {
257 if (HasNRVOCandidate)
264 void ASTStmtWriter::VisitDeclStmt(
DeclStmt *S) {
274 void ASTStmtWriter::VisitAsmStmt(
AsmStmt *S) {
284 void ASTStmtWriter::VisitGCCAsmStmt(
GCCAsmStmt *S) {
298 for (
unsigned I = 0, N = S->
getNumInputs(); I != N; ++I) {
314 void ASTStmtWriter::VisitMSAsmStmt(
MSAsmStmt *S) {
339 for (
unsigned I = 0, N = S->
getNumInputs(); I != N; ++I) {
355 void ASTStmtWriter::VisitCoreturnStmt(
CoreturnStmt *S) {
372 void ASTStmtWriter::VisitCoawaitExpr(
CoawaitExpr *E) {
373 VisitCoroutineSuspendExpr(E);
378 void ASTStmtWriter::VisitCoyieldExpr(
CoyieldExpr *E) {
379 VisitCoroutineSuspendExpr(E);
391 void ASTStmtWriter::VisitCapturedStmt(
CapturedStmt *S) {
410 for (
const auto &I : S->
captures()) {
411 if (I.capturesThis() || I.capturesVariableArrayType())
422 void ASTStmtWriter::VisitExpr(
Expr *E) {
433 void ASTStmtWriter::VisitConstantExpr(
ConstantExpr *E) {
461 void ASTStmtWriter::VisitDeclRefExpr(
DeclRefExpr *E) {
506 if (E->
getValue().getBitWidth() == 32) {
568 void ASTStmtWriter::VisitParenExpr(
ParenExpr *E) {
579 for (
auto *SubStmt : E->
exprs())
595 void ASTStmtWriter::VisitOffsetOfExpr(
OffsetOfExpr *E) {
662 void ASTStmtWriter::VisitCallExpr(
CallExpr *E) {
668 Arg != ArgEnd; ++Arg)
674 void ASTStmtWriter::VisitMemberExpr(
MemberExpr *E) {
679 E->hasQualifierOrFoundDecl() &&
682 bool HasTemplateInfo = E->hasTemplateKWAndArgsInfo();
718 void ASTStmtWriter::VisitObjCIsaExpr(
ObjCIsaExpr *E) {
736 VisitExplicitCastExpr(E);
743 void ASTStmtWriter::VisitCastExpr(
CastExpr *E) {
765 VisitBinaryOperator(E);
810 VisitExplicitCastExpr(E);
833 void ASTStmtWriter::VisitInitListExpr(
InitListExpr *E) {
840 bool isArrayFiller = E->ArrayFillerOrUnionFieldInit.is<
Expr*>();
852 for (
unsigned I = 0, N = E->
getNumInits(); I != N; ++I)
855 for (
unsigned I = 0, N = E->
getNumInits(); I != N; ++I)
869 if (D.isFieldDesignator()) {
879 }
else if (D.isArrayDesignator()) {
885 assert(D.isArrayRangeDesignator() &&
"Unknown designator");
903 void ASTStmtWriter::VisitNoInitExpr(
NoInitExpr *E) {
910 Record.
AddStmt(E->SubExprs[0]);
911 Record.
AddStmt(E->SubExprs[1]);
925 void ASTStmtWriter::VisitVAArgExpr(
VAArgExpr *E) {
952 void ASTStmtWriter::VisitStmtExpr(
StmtExpr *E) {
960 void ASTStmtWriter::VisitChooseExpr(
ChooseExpr *E) {
971 void ASTStmtWriter::VisitGNUNullExpr(
GNUNullExpr *E) {
996 void ASTStmtWriter::VisitBlockExpr(
BlockExpr *E) {
1011 Stmt **Stmts = E->getTrailingObjects<
Stmt *>();
1015 for (
unsigned I = 0, N = E->
getNumAssocs() + 1; I < N; ++I)
1019 for (
unsigned I = 0, N = E->
getNumAssocs(); I < N; ++I)
1043 void ASTStmtWriter::VisitAtomicExpr(
AtomicExpr *E) {
1090 if (E->HasPackExpansions) {
1092 unsigned NumExpansions = 0;
1142 Record.
push_back(E->SetterAndMethodRefFlags.getInt());
1180 Record.
push_back(E->getNumStoredSelLocs());
1213 Arg != ArgEnd; ++Arg)
1217 for (
unsigned i = 0, e = E->getNumStoredSelLocs();
i != e; ++
i)
1302 void ASTStmtWriter::VisitCXXCatchStmt(
CXXCatchStmt *S) {
1310 void ASTStmtWriter::VisitCXXTryStmt(
CXXTryStmt *S) {
1374 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I)
1390 VisitCXXConstructExpr(E);
1395 void ASTStmtWriter::VisitLambdaExpr(
LambdaExpr *E) {
1402 Record.
push_back(E->ExplicitResultType);
1422 VisitExplicitCastExpr(E);
1428 VisitCXXNamedCastExpr(E);
1433 VisitCXXNamedCastExpr(E);
1438 VisitCXXNamedCastExpr(E);
1443 VisitCXXNamedCastExpr(E);
1448 VisitExplicitCastExpr(E);
1455 VisitExplicitCastExpr(E);
1491 void ASTStmtWriter::VisitCXXThisExpr(
CXXThisExpr *E) {
1498 void ASTStmtWriter::VisitCXXThrowExpr(
CXXThrowExpr *E) {
1536 void ASTStmtWriter::VisitCXXNewExpr(
CXXNewExpr *E) {
1609 void ASTStmtWriter::VisitCXXDependentScopeMemberExpr(
1616 Record.
push_back(E->hasTemplateKWAndArgsInfo());
1618 Record.
push_back(E->hasFirstQualifierFoundInScope());
1620 if (E->hasTemplateKWAndArgsInfo()) {
1636 if (E->hasFirstQualifierFoundInScope())
1677 void ASTStmtWriter::VisitOverloadExpr(
OverloadExpr *E) {
1691 OvI != OvE; ++OvI) {
1701 VisitOverloadExpr(E);
1711 VisitOverloadExpr(E);
1724 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I)
1781 void ASTStmtWriter::VisitSubstNonTypeTemplateParmExpr(
1790 void ASTStmtWriter::VisitSubstNonTypeTemplateParmPackExpr(
1818 void ASTStmtWriter::VisitCXXFoldExpr(
CXXFoldExpr *E) {
1824 Record.
AddStmt(E->SubExprs[0]);
1825 Record.
AddStmt(E->SubExprs[1]);
1838 void ASTStmtWriter::VisitTypoExpr(
TypoExpr *E) {
1841 llvm_unreachable(
"Cannot write TypoExpr nodes");
1857 void ASTStmtWriter::VisitAsTypeExpr(
AsTypeExpr *E) {
1914 void ASTStmtWriter::VisitSEHTryStmt(
SEHTryStmt *S) {
1923 void ASTStmtWriter::VisitSEHLeaveStmt(
SEHLeaveStmt *S) {
1947 VisitOMPExecutableDirective(D);
1989 for (
auto I : D->
inits()) {
1995 for (
auto I : D->
finals()) {
2003 VisitOMPExecutableDirective(D);
2009 VisitOMPLoopDirective(D);
2014 VisitOMPLoopDirective(D);
2020 VisitOMPLoopDirective(D);
2027 VisitOMPExecutableDirective(D);
2034 VisitOMPExecutableDirective(D);
2042 VisitOMPExecutableDirective(D);
2048 VisitOMPExecutableDirective(D);
2055 VisitOMPExecutableDirective(D);
2061 VisitOMPLoopDirective(D);
2066 void ASTStmtWriter::VisitOMPParallelForSimdDirective(
2068 VisitOMPLoopDirective(D);
2072 void ASTStmtWriter::VisitOMPParallelSectionsDirective(
2076 VisitOMPExecutableDirective(D);
2084 VisitOMPExecutableDirective(D);
2092 VisitOMPExecutableDirective(D);
2105 VisitOMPExecutableDirective(D);
2112 VisitOMPExecutableDirective(D);
2116 void ASTStmtWriter::VisitOMPTargetEnterDataDirective(
2120 VisitOMPExecutableDirective(D);
2124 void ASTStmtWriter::VisitOMPTargetExitDataDirective(
2128 VisitOMPExecutableDirective(D);
2132 void ASTStmtWriter::VisitOMPTargetParallelDirective(
2136 VisitOMPExecutableDirective(D);
2140 void ASTStmtWriter::VisitOMPTargetParallelForDirective(
2142 VisitOMPLoopDirective(D);
2149 VisitOMPExecutableDirective(D);
2155 VisitOMPExecutableDirective(D);
2161 VisitOMPExecutableDirective(D);
2168 VisitOMPExecutableDirective(D);
2176 VisitOMPExecutableDirective(D);
2183 VisitOMPExecutableDirective(D);
2190 VisitOMPExecutableDirective(D);
2194 void ASTStmtWriter::VisitOMPCancellationPointDirective(
2197 VisitOMPExecutableDirective(D);
2205 VisitOMPExecutableDirective(D);
2211 VisitOMPLoopDirective(D);
2216 VisitOMPLoopDirective(D);
2221 VisitOMPLoopDirective(D);
2228 VisitOMPExecutableDirective(D);
2232 void ASTStmtWriter::VisitOMPDistributeParallelForDirective(
2234 VisitOMPLoopDirective(D);
2239 void ASTStmtWriter::VisitOMPDistributeParallelForSimdDirective(
2241 VisitOMPLoopDirective(D);
2245 void ASTStmtWriter::VisitOMPDistributeSimdDirective(
2247 VisitOMPLoopDirective(D);
2251 void ASTStmtWriter::VisitOMPTargetParallelForSimdDirective(
2253 VisitOMPLoopDirective(D);
2258 VisitOMPLoopDirective(D);
2262 void ASTStmtWriter::VisitOMPTeamsDistributeDirective(
2264 VisitOMPLoopDirective(D);
2268 void ASTStmtWriter::VisitOMPTeamsDistributeSimdDirective(
2270 VisitOMPLoopDirective(D);
2274 void ASTStmtWriter::VisitOMPTeamsDistributeParallelForSimdDirective(
2276 VisitOMPLoopDirective(D);
2280 void ASTStmtWriter::VisitOMPTeamsDistributeParallelForDirective(
2282 VisitOMPLoopDirective(D);
2290 VisitOMPExecutableDirective(D);
2294 void ASTStmtWriter::VisitOMPTargetTeamsDistributeDirective(
2296 VisitOMPLoopDirective(D);
2300 void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForDirective(
2302 VisitOMPLoopDirective(D);
2307 void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
2309 VisitOMPLoopDirective(D);
2314 void ASTStmtWriter::VisitOMPTargetTeamsDistributeSimdDirective(
2316 VisitOMPLoopDirective(D);
2325 assert(SwitchCaseIDs.find(S) == SwitchCaseIDs.end() &&
2326 "SwitchCase recorded twice");
2327 unsigned NextID = SwitchCaseIDs.size();
2328 SwitchCaseIDs[S] = NextID;
2333 assert(SwitchCaseIDs.find(S) != SwitchCaseIDs.end() &&
2334 "SwitchCase hasn't been seen yet");
2335 return SwitchCaseIDs[S];
2339 SwitchCaseIDs.clear();
2344 void ASTWriter::WriteSubStmt(
Stmt *S) {
2354 llvm::DenseMap<Stmt *, uint64_t>::iterator I = SubStmtEntries.find(S);
2355 if (I != SubStmtEntries.end()) {
2356 Record.push_back(I->second);
2362 assert(!ParentStmts.count(S) &&
"There is a Stmt cycle!");
2364 struct ParentStmtInserterRAII {
2369 : S(S), ParentStmts(ParentStmts) {
2370 ParentStmts.insert(S);
2372 ~ParentStmtInserterRAII() {
2373 ParentStmts.erase(S);
2377 ParentStmtInserterRAII ParentStmtInserter(S, ParentStmts);
2383 SubStmtEntries[S] =
Offset;
2388 void ASTRecordWriter::FlushStmts() {
2391 assert(Writer->SubStmtEntries.empty() &&
"unexpected entries in sub-stmt map");
2392 assert(Writer->ParentStmts.empty() &&
"unexpected entries in parent stmt map");
2394 for (
unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
2395 Writer->WriteSubStmt(StmtsToEmit[I]);
2397 assert(N == StmtsToEmit.size() &&
"record modified while being written!");
2404 Writer->SubStmtEntries.clear();
2405 Writer->ParentStmts.clear();
2408 StmtsToEmit.clear();
2411 void ASTRecordWriter::FlushSubStmts() {
2415 for (
unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
2416 Writer->WriteSubStmt(StmtsToEmit[N - I - 1]);
2417 assert(N == StmtsToEmit.size() &&
"record modified while being written!");
2420 StmtsToEmit.clear();
A CXXConstCastExpr record.
SourceLocation getRParenLoc() const
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
unsigned getNumSemanticExprs() const
const Expr * getSubExpr() const
A call to an overloaded operator written using operator syntax.
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
bool hasCancel() const
Return true if current directive has inner cancel directive.
The receiver is the instance of the superclass object.
Represents a single C99 designator.
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
SourceLocation getRBracLoc() const
Defines the clang::ASTContext interface.
A CompoundLiteralExpr record.
This represents '#pragma omp distribute simd' composite directive.
const BlockDecl * getBlockDecl() const
Expr * getNextUpperBound() const
IdentifierInfo * getInputIdentifier(unsigned i) const
This represents '#pragma omp master' directive.
ConstantExprBitfields ConstantExprBits
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
SourceLocation getRParenLoc() const
The null pointer literal (C++11 [lex.nullptr])
unsigned getNumDecls() const
Gets the number of declarations in the unresolved set.
This represents '#pragma omp task' directive.
This represents a GCC inline-assembly statement extension.
Represents a 'co_await' expression while the type of the promise is dependent.
SourceLocation getForLoc() const
NamedDecl * getFoundDecl()
Get the NamedDecl through which this reference occurred.
A UserDefinedLiteral record.
The receiver is an object instance.
Expr * getUpperBoundVariable() const
unsigned getNumInputs() const
SourceLocation getOpLoc() const
Expr * getSyntacticForm()
Return the syntactic form of this expression, i.e.
SourceLocation getRParenLoc() const
ObjCDictionaryElement getKeyValueElement(unsigned Index) const
CompoundStmt * getBlock() const
An IndirectGotoStmt record.
SourceLocation getForLoc() const
SourceLocation getUsedLocation() const
Retrieve the location where this default argument was actually used.
uint64_t getValue() const
StringKind getKind() const
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
NameKind
The kind of the name stored in this DeclarationName.
ObjCMethodDecl * getAtIndexMethodDecl() const
Selector getSelector() const
SourceRange getSourceRange() const
void AddToken(const Token &Tok, RecordDataImpl &Record)
Emit a token.
SourceLocation getEllipsisLoc() const
Get the location of the ... in a case statement of the form LHS ... RHS.
SourceLocation getLParen() const
Get the location of the left parentheses '('.
const Expr * getSubExpr() const
Expr * getExpr(unsigned Index)
getExpr - Return the Expr at the specified index.
A CXXStaticCastExpr record.
unsigned getNumSubExprs() const
getNumSubExprs - Return the size of the SubExprs array.
bool isSuperReceiver() const
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
VarDecl * getParameterPack() const
Get the parameter pack which this expression refers to.
SourceLocation TemplateKWLoc
The source location of the template keyword; this is used as part of the representation of qualified ...
An AttributedStmt record.
CompoundStmt * getSubStmt()
A CXXReinterpretCastExpr record.
const Expr * getInit(unsigned Init) const
const DeclContext * getParentContext() const
If the SourceLocExpr has been resolved return the subexpression representing the resolved value...
An ObjCBoolLiteralExpr record.
SourceLocation getRParenLoc() const
bool isThrownVariableInScope() const
Determines whether the variable thrown by this expression (if any!) is within the innermost try block...
Expr *const * semantics_iterator
ObjCProtocolDecl * getProtocol() const
Represents a 'co_return' statement in the C++ Coroutines TS.
Stmt - This represents one statement.
Expr * getLowerBoundVariable() const
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
Expr * getDimensionExpression() const
const ObjCAtFinallyStmt * getFinallyStmt() const
Retrieve the @finally statement, if any.
CXXCatchStmt * getHandler(unsigned i)
bool isArrayFormAsWritten() const
IfStmt - This represents an if/then/else.
SourceLocation getOperatorLoc() const
getOperatorLoc - Return the location of the operator.
SourceLocation getRParenLoc() const
SourceLocation getLocation() const
ObjCMethodDecl * setAtIndexMethodDecl() const
void AddNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS)
Emit a nested name specifier with source-location information.
unsigned getNumOutputs() const
This represents '#pragma omp for simd' directive.
const StringLiteral * getAsmString() const
TypeSourceInfo * getTypeSourceInfo() const
An ImplicitValueInitExpr record.
Decl - This represents one declaration (or definition), e.g.
This represents '#pragma omp teams distribute parallel for' composite directive.
An ImplicitCastExpr record.
Stmt * getHandlerBlock() const
SourceLocation getBeginLoc() const
Returns starting location of directive kind.
llvm::APFloat getValue() const
ObjCMethodDecl * getImplicitPropertySetter() const
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
FunctionDecl * getOperatorNew() const
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
DeclarationNameInfo getNameInfo() const
Retrieve the name of the entity we're testing for, along with location information.
const Expr * getSubExpr() const
Defines the C++ template declaration subclasses.
unsigned getNumSubExprs() const
Retrieve the total number of subexpressions in this designated initializer expression, including the actual initialized value and any expressions that occur within array and array-range designators.
SourceLocation getIdentLoc() const
Represents an attribute applied to a statement.
ParenExpr - This represents a parethesized expression, e.g.
NamedDecl * getDecl() const
A CXXOperatorCallExpr record.
bool hasQualifier() const
Determines whether this member expression actually had a C++ nested-name-specifier prior to the name ...
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies this name, if any.
Expr * getLowerBound()
Get lower bound of array section.
This represents '#pragma omp target teams distribute' combined directive.
A CXXTemporaryObjectExpr record.
Represents Objective-C's @throw statement.
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called...
SourceLocation getLocation() const
const RecordDecl * getCapturedRecordDecl() const
Retrieve the record declaration for captured variables.
SourceLocation getRParenLoc() const
SourceLocation getKeywordLoc() const
Represents a call to a C++ constructor.
SourceLocation getBeginLoc() const LLVM_READONLY
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
TypeSourceInfo * getTypeInfoAsWritten() const
getTypeInfoAsWritten - Returns the type source info for the type that this expression is casting to...
FPOptions getFPFeatures() const
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent...
SourceLocation getLParenLoc() const
A constant expression context.
Expr * getCombinedParForInDistCond() const
A container of type source information.
Stmt * getTemporary() const
This represents '#pragma omp parallel for' directive.
MS property subscript expression.
IdentKind getIdentKind() const
SourceLocation getGotoLoc() const
SourceLocation getRParenLoc() const
This represents '#pragma omp target teams distribute parallel for' combined directive.
Expr * getCombinedEnsureUpperBound() const
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
float __ovld __cnfn distance(float p0, float p1)
Returns the distance between p0 and p1.
SourceLocation getAccessorLoc() const
SourceLocation getRParenLoc() const
getRParenLoc - Return the location of final right parenthesis.
unsigned getDeclRefExprAbbrev() const
const Expr * getSubExpr() const
SourceLocation getAtLoc() const
SourceLocation getCoawaitLoc() const
Expr * getIndexExpr(unsigned Idx)
SourceLocation getEndLoc() const
Returns ending location of directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
This represents '#pragma omp target exit data' directive.
const VarDecl * getNRVOCandidate() const
Retrieve the variable that might be used for the named return value optimization. ...
SourceLocation getLParenLoc() const
QualType getBaseType() const
bool hasTemplateKWAndArgsInfo() const
bool hasCancel() const
Return true if current directive has inner cancel directive.
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
CompoundLiteralExpr - [C99 6.5.2.5].
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation getOperatorLoc() const
Retrieve the location of the '.' or '->' operator.
SourceLocation getAtLoc() const
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
SourceRange getSourceRange() const
ObjCInterfaceDecl * getClassReceiver() const
Expr * getCombinedUpperBoundVariable() const
SourceLocation getColonLoc() const
SourceLocation getLeftLoc() const
A ConditionOperator record.
Expr * getCalcLastIteration() const
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
SourceLocation getIfLoc() const
unsigned getNumPlacementArgs() const
TypeSourceInfo * getArgumentTypeInfo() const
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
SourceRange getSourceRange() const LLVM_READONLY
Retrieve the source range that covers this offsetof node.
capture_iterator capture_begin()
Retrieve an iterator pointing to the first capture.
A CXXConstructExpr record.
unsigned getNumExpressions() const
SourceLocation getLocation() const
Retrieve the location of the literal.
raw_arg_iterator raw_arg_begin()
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will call.
A C++ throw-expression (C++ [except.throw]).
Expr * getExprOperand() const
Represents an expression – generally a full-expression – that introduces cleanups to be run at the ...
TypeSourceInfo * getArg(unsigned I) const
Retrieve the Ith argument.
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation getRParenLoc() const
SourceLocation getLocation() const
Retrieve the location of the literal.
void AddString(StringRef Str)
Emit a string.
bool isXLHSInRHSPart() const
Return true if helper update expression has form 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' and...
void AddSourceRange(SourceRange Range)
Emit a source range.
A ShuffleVectorExpr record.
SourceLocation getBuiltinLoc() const
ObjCPropertyDecl * getExplicitProperty() const
A C++ static_cast expression (C++ [expr.static.cast]).
void AddTypeSourceInfo(TypeSourceInfo *TInfo)
Emits a reference to a declarator info.
Expr * getExprOperand() const
const Stmt * getSubStmt() const
SourceLocation getRParenLoc() const
Retrieve the location of the closing parenthesis.
LabelStmt - Represents a label, which has a substatement.
Represents a C99 designated initializer expression.
SourceLocation getAtLoc() const
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
TypeSourceInfo * getEncodedTypeSourceInfo() const
TypeSourceInfo * getScopeTypeInfo() const
Retrieve the scope type in a qualified pseudo-destructor expression.
SourceLocation getKeywordLoc() const
An ObjCAtThrowStmt record.
SourceLocation getTildeLoc() const
Retrieve the location of the '~'.
FieldDecl * getField() const
For a field offsetof node, returns the field.
SourceLocation getRParenLoc() const
Represents a function call to one of __builtin_LINE(), __builtin_COLUMN(), __builtin_FUNCTION(), or __builtin_FILE().
void AddTypeRef(QualType T)
Emit a reference to a type.
An element in an Objective-C dictionary literal.
A DesignatedInitExpr record.
This represents '#pragma omp parallel' directive.
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
bool cleanupsHaveSideEffects() const
QualType getComputationResultType() const
SourceLocation getRParen() const
Get the location of the right parentheses ')'.
DeclStmt * getConditionVariableDeclStmt()
If this SwitchStmt has a condition variable, return the faux DeclStmt associated with the creation of...
An ObjCProtocolExpr record.
An ObjCSelectorExpr record.
SourceLocation getAmpAmpLoc() const
Expr * getEnsureUpperBound() const
NameKind getNameKind() const
Determine what kind of name this is.
SourceLocation getEndLoc() const
Represents a member of a struct/union/class.
Expr * getBase()
Retrieve the base object of this member expressions, e.g., the x in x.m.
Represents a place-holder for an object not to be initialized by anything.
NonTypeTemplateParmDecl * getParameter() const
const DeclarationNameInfo & getNameInfo() const
Gets the full name info.
StringLiteral * getString()
unsigned getArrayExprIndex() const
For an array element node, returns the index into the array of expressions.
SourceLocation getLabelLoc() const
SourceLocation getRBraceLoc() const
SourceLocation getOperatorLoc() const
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
ArrayRef< Expr * > updates()
SourceLocation getRParenLoc() const
The iterator over UnresolvedSets.
This represents '#pragma omp target simd' directive.
Expr * getSourceExpr() const
The source expression of an opaque value expression is the expression which originally generated the ...
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
const DeclGroupRef getDeclGroup() const
OpenMPDirectiveKind getDirectiveKind() const
bool isAllEnumCasesCovered() const
Returns true if the SwitchStmt is a switch of an enum value and all cases have been explicitly covere...
This represents '#pragma omp barrier' directive.
SourceLocation getQuestionLoc() const
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp, [NSNumber numberWithInt:42]];.
unsigned getCharByteWidth() const
This is a common base class for loop directives ('omp simd', 'omp for', 'omp for simd' etc...
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
This represents '#pragma omp critical' directive.
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
bool hadArrayRangeDesignator() const
SourceLocation getCatchLoc() const
Selector getSelector() const
void AddIdentifierRef(const IdentifierInfo *II)
Emit a reference to an identifier.
Represents Objective-C's @catch statement.
SourceLocation getOpLoc() const
IndirectGotoStmt - This represents an indirect goto.
Describes an C or C++ initializer list.
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
This represents '#pragma omp distribute parallel for' composite directive.
ArrayRef< Stmt const * > getParamMoves() const
This represents '#pragma omp teams distribute parallel for simd' composite directive.
Expr * getKeyExpr() const
ASTWriter::RecordDataImpl & getRecordData() const
Extract the underlying record storage.
unsigned getNumExpansions() const
Get the number of parameters in this parameter pack.
unsigned getLength() const
ForStmt - This represents a 'for (init;cond;inc)' stmt.
ArrayRef< Expr * > finals()
Expr * getIsLastIterVariable() const
FunctionDecl * getOperatorDelete() const
Expr * getBaseExpr() const
TemplateArgument getArgumentPack() const
Retrieve the template argument pack containing the substituted template arguments.
bool isElidable() const
Whether this construction is elidable.
Expr * getOperand() const
unsigned getIntegerLiteralAbbrev() const
const Expr * getThrowExpr() const
SourceLocation getParameterPackLocation() const
Retrieve the location of the parameter pack name.
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
LabelDecl * getDecl() const
Expr * getX()
Get 'x' part of the associated expression/statement.
SourceLocation getLBracLoc() const
A reference to a previously [de]serialized Stmt record.
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
SourceLocation getRParenLoc() const
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
path_iterator path_begin()
SourceLocation getIsaMemberLoc() const
getMemberLoc - Return the location of the "member", in X->F, it is the location of 'F'...
semantics_iterator semantics_end()
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Expr * getIterationVariable() const
A builtin binary operation expression such as "x + y" or "x <= y".
bool hasCancel() const
Return true if current directive has inner cancel directive.
bool constructsVBase() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
Expr * getOutputExpr(unsigned i)
bool hadMultipleCandidates() const
Returns true if this member expression refers to a method that was resolved from an overloaded set ha...
unsigned getCharacterLiteralAbbrev() const
SourceLocation getThrowLoc() const
unsigned getResultExprIndex() const
Return the index of the result-bearing expression into the semantics expressions, or PseudoObjectExpr...
const StringLiteral * getInputConstraintLiteral(unsigned i) const
CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for statement, represented as 'for (ra...
This represents '#pragma omp cancellation point' directive.
ObjCStringLiteral, used for Objective-C string literals i.e.
SourceLocation getEqualOrColonLoc() const
Retrieve the location of the '=' that precedes the initializer value itself, if present.
const CallExpr * getConfig() const
FPOptions getFPFeatures() const
CaseStmt - Represent a case statement.
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
IdentKind getIdentKind() const
SourceLocation getContinueLoc() const
This represents '#pragma omp teams' directive.
unsigned getInt() const
Used to serialize this.
SourceLocation getEndLoc() const
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
FieldDecl * getField()
Get the field whose initializer will be used.
Helper class for OffsetOfExpr.
A marker record that indicates that we are at the end of an expression.
This represents '#pragma omp teams distribute simd' combined directive.
Represents binding an expression to a temporary.
StringLiteral * getClobberStringLiteral(unsigned i)
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
Expr * Key
The key for the dictionary element.
SourceLocation getBuiltinLoc() const
CXXTemporary * getTemporary()
bool isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a worksharing directive.
ObjCMethodDecl * getArrayWithObjectsMethod() const
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
CXXRecordDecl * getNamingClass()
Gets the 'naming class' (in the sense of C++0x [class.access.base]p5) of the lookup.
NestedNameSpecifierLoc getQualifierLoc() const
If the name was qualified, retrieves the nested-name-specifier that precedes the name, with source-location information.
bool isTypeDependent() const
isTypeDependent - Determines whether this expression is type-dependent (C++ [temp.dep.expr]), which means that its type could change from one template instantiation to the next.
SourceLocation getTryLoc() const
Represents a C++ member access expression where the actual member referenced could not be resolved be...
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "for" statement, if any.
SourceLocation getOperatorLoc() const
getOperatorLoc - Return the location of the operator.
SourceLocation getNameLoc() const
TypeSourceInfo * getTypeSourceInfo() const
SourceLocation getLocation() const
A default argument (C++ [dcl.fct.default]).
bool isTypeOperand() const
SourceLocation getTokenLocation() const
getTokenLocation - The location of the __null token.
llvm::APFloatBase::Semantics getRawSemantics() const
Get a raw enumeration value representing the floating-point semantics of this literal (32-bit IEEE...
NamedDecl * getFirstQualifierFoundInScope() const
Retrieve the first part of the nested-name-specifier that was found in the scope of the member access...
Represents the this expression in C++.
ObjCMethodDecl * getDictWithObjectsMethod() const
SourceLocation getRParenLoc() const
Retrieve the location of the right parentheses (')') that follows the argument list.
TypeSourceInfo * getAllocatedTypeSourceInfo() const
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
NestedNameSpecifierLoc getQualifierLoc() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name...
void AddAPValue(const APValue &Value)
Emit an APvalue.
TypeSourceInfo * getQueriedTypeSourceInfo() const
unsigned RecordSwitchCaseID(SwitchCase *S)
Record an ID for the given switch-case statement.
const ObjCAtCatchStmt * getCatchStmt(unsigned I) const
Retrieve a @catch statement.
This represents '#pragma omp target parallel for simd' directive.
ArrayRef< Expr * > private_counters()
OpenMP 4.0 [2.4, Array Sections].
VersionTuple getVersion()
ConditionalOperator - The ?: ternary operator.
const ValueDecl * getExtendingDecl() const
Get the declaration which triggered the lifetime-extension of this temporary, if any.
TypeSourceInfo * getTypeSourceInfo() const
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
CompoundStmt - This represents a group of statements like { stmt stmt }.
unsigned NumTemplateArgs
The number of template arguments in TemplateArgs.
SourceLocation getRBracket() const
bool isMicrosoftABI() const
Returns whether this is really a Win64 ABI va_arg expression.
bool hasCancel() const
Return true if current directive has inner cancel directive.
void AddDeclarationNameLoc(const DeclarationNameLoc &DNLoc, DeclarationName Name)
CompoundStmt * getSubStmt() const
Retrieve the compound statement that will be included in the program only if the existence of the sym...
This represents '#pragma omp taskgroup' directive.
void AddCXXTemporary(const CXXTemporary *Temp)
Emit a CXXTemporary.
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
QualType getComputationLHSType() const
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation getRParenLoc() const
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
SourceLocation getTryLoc() const
Expr * getCombinedLowerBoundVariable() const
SourceLocation getLocation() const
SourceLocation getRBracketLoc() const
SourceLocation getLocation() const
unsigned getSwitchCaseID(SwitchCase *S)
Retrieve the ID for the given switch-case statement.
InitListExpr * getUpdater() const
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
Represents a call to the builtin function __builtin_va_arg.
SourceLocation getLabelLoc() const
bool isImplicitAccess() const
True if this is an implicit access, i.e.
SourceLocation getThrowLoc() const LLVM_READONLY
static unsigned getNumSubExprs(AtomicOp Op)
Determine the number of arguments the specified atomic builtin should have.
unsigned getValue() const
This represents '#pragma omp distribute' directive.
Expr * getSrcExpr() const
getSrcExpr - Return the Expr to be converted.
SourceLocation getDestroyedTypeLoc() const
Retrieve the starting location of the type being destroyed.
ObjCMethodDecl * getBoxingMethod() const
SourceLocation getFinallyLoc() const
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type...
ADLCallKind getADLCallKind() const
const Stmt * getAssociatedStmt() const
Returns statement associated with the directive.
SourceLocation getOperatorLoc() const
Retrieve the location of the '->' or '.' operator.
bool hasCancel() const
Return true if current directive has inner cancel directive.
llvm::MutableArrayRef< Designator > designators()
DeclAccessPair getFoundDecl() const
Retrieves the declaration found by lookup.
bool hasCancel() const
Return true if current directive has inner cancel directive.
This represents one expression.
SourceLocation getElseLoc() const
IdentifierInfo * getFieldName() const
For a field or identifier offsetof node, returns the name of the field.
CXXBaseSpecifier * getBase() const
For a base class node, returns the base specifier.
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '...
StringRef getClobber(unsigned i) const
bool isImplicitAccess() const
True if this is an implicit access, i.e., one in which the member being accessed was not written in t...
SourceLocation getWhileLoc() const
unsigned getPackLength() const
Retrieve the length of the parameter pack.
NonOdrUseReason isNonOdrUse() const
Is this expression a non-odr-use reference, and if so, why? This is only meaningful if the named memb...
Represents a C++ functional cast expression that builds a temporary object.
A C++ const_cast expression (C++ [expr.const.cast]).
SourceLocation getLocation() const
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Field designator where only the field name is known.
An ObjCSubscriptRefExpr record.
VarDecl * getExceptionDecl() const
IdentifierInfo * getDestroyedTypeIdentifier() const
In a dependent pseudo-destructor expression for which we do not have full type information on the des...
unsigned getNumInits() const
bool hasCancel() const
Return true if current directive has inner cancel directive.
This represents '#pragma omp target teams distribute parallel for simd' combined directive.
raw_arg_iterator raw_arg_end()
bool isArrow() const
Determine whether this pseudo-destructor expression was written using an '->' (otherwise, it used a '.
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
const CompoundStmt * getSynchBody() const
SourceLocation getLParenLoc() const
bool hasQualifier() const
Determine whether this declaration reference was preceded by a C++ nested-name-specifier, e.g., N::foo.
Represents Objective-C's @synchronized statement.
ObjCSelectorExpr used for @selector in Objective-C.
A CXXStdInitializerListExpr record.
TypeSourceInfo * getTypeSourceInfo() const
Represents an expression that computes the length of a parameter pack.
SourceLocation getRBracketLoc() const
CXXTryStmt - A C++ try block, including all handlers.
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
An ArraySubscriptExpr record.
SourceLocation getAtTryLoc() const
Retrieve the location of the @ in the @try.
bool refersToEnclosingVariableOrCapture() const
Does this DeclRefExpr refer to an enclosing local or a captured variable?
IdentifierInfo & getAccessor() const
This represents '#pragma omp target teams distribute simd' combined directive.
ArrayTypeTrait getTrait() const
decls_iterator decls_begin() const
unsigned getNumClauses() const
Get number of clauses.
An ArrayInitLoopExpr record.
Expr * getDistInc() const
A PseudoObjectExpr record.
SourceRange getAngleBrackets() const LLVM_READONLY
Expr * getNextLowerBound() const
Kind getKind() const
Determine what kind of offsetof node this is.
Expr * getPrevEnsureUpperBound() const
SourceLocation getKeywordLoc() const
Retrieve the location of the __if_exists or __if_not_exists keyword.
capture_init_range capture_inits()
This represents '#pragma omp for' directive.
An ObjCIndirectCopyRestoreExpr record.
Expr * getElement(unsigned Index)
getElement - Return the Element at the specified index.
Optional< unsigned > NumExpansions
The number of elements this pack expansion will expand to, if this is a pack expansion and is known...
SourceLocation getSwitchLoc() const
LabelDecl * getLabel() const
bool hasInitializer() const
Whether this new-expression has any initializer at all.
const Stmt * getTryBody() const
Retrieve the @try body.
Represents a folding of a pack over an operator.
ReturnStmt - This represents a return, optionally of an expression: return; return 4;...
This represents '#pragma omp target teams' directive.
SourceLocation getRParenLoc() const
getRParenLoc - Return the location of final right parenthesis.
An expression that sends a message to the given Objective-C object or class.
void AddDeclRef(const Decl *D)
Emit a reference to a declaration.
This represents a Microsoft inline-assembly statement extension.
SourceLocation getDoLoc() const
SwitchCase * getSwitchCaseList()
SourceLocation getAtLoc() const
ObjCMethodDecl * getImplicitPropertyGetter() const
A DesignatedInitUpdateExpr record.
SourceLocation getRBracketLoc() const
void AddStmt(Stmt *S)
Add the given statement or expression to the queue of statements to emit.
SourceLocation getEnd() const
UnaryOperator - This represents the unary-expression's (except sizeof and alignof), the postinc/postdec operators from postfix-expression, and various extensions.
Expr * getInputExpr(unsigned i)
Expr * getOutputExpr(unsigned i)
bool isOpenMPTaskLoopDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a taskloop directive.
void AddSelectorRef(Selector S)
Emit a Selector (which is a smart pointer reference).
SourceLocation getMemberLoc() const
getMemberLoc - Return the location of the "member", in X->F, it is the location of 'F'...
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
bool usesGNUSyntax() const
Determines whether this designated initializer used the deprecated GNU syntax for designated initiali...
A member reference to an MSPropertyDecl.
Represents a reference to a non-type template parameter that has been substituted with a template arg...
const OffsetOfNode & getComponent(unsigned Idx) const
This represents '#pragma omp cancel' directive.
Expr * getTrueExpr() const
getTrueExpr - Return the subexpression which will be evaluated if the condition evaluates to true; th...
An ObjCAvailabilityCheckExpr record.
SourceLocation getLocation() const
SourceLocation getRParenLoc() const
SourceLocation getForLoc() const
const Expr * getSubExpr() const
ObjCBridgeCastKind getBridgeKind() const
Determine which kind of bridge is being performed via this cast.
SourceRange getSourceRange() const LLVM_READONLY
const Expr * getSubExpr() const
CStyleCastExpr - An explicit cast in C (C99 6.5.4) or a C-style cast in C++ (C++ [expr.cast]), which uses the syntax (Type)expr.
const DeclContext * getUsedContext() const
Expr * getLHS()
An array access can be written A[4] or 4[A] (both are equivalent).
bool hadMultipleCandidates() const
Returns true if this expression refers to a function that was resolved from an overloaded set having ...
An ObjCPropertyRefExpr record.
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1...
This represents '#pragma omp flush' directive.
An ObjCForCollectionStmt record.
This represents '#pragma omp parallel for simd' directive.
ExprObjectKind getObjectKind() const
getObjectKind - The object kind that this expression produces.
DoStmt - This represents a 'do/while' stmt.
AsmStmt is the base class for GCCAsmStmt and MSAsmStmt.
SourceLocation getOperatorLoc() const
Retrieve the location of the '->' or '.' operator.
SourceLocation getLParenLoc() const
Retrieve the location of the left parentheses ('(') that precedes the argument list.
A MS-style AsmStmt record.
void push_back(uint64_t N)
Minimal vector-like interface.
Expr * getLastIteration() const
bool isPostfixUpdate() const
Return true if 'v' expression must be updated to original value of 'x', false if 'v' must be updated ...
This represents '#pragma omp target enter data' directive.
Expr * getStrideVariable() const
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class...
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
unsigned getNumArgs() const
Return the number of actual arguments in this message, not counting the receiver. ...
Expr * getCombinedDistCond() const
const Stmt * getPreInits() const
SourceLocation getLParenLoc() const
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr...
A field in a dependent type, known only by its name.
This captures a statement into a function.
Represents a call to an inherited base class constructor from an inheriting constructor.
ExpressionTrait getTrait() const
unsigned path_size() const
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
bool isImplicitProperty() const
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on a template...
bool inheritedFromVBase() const
Determine whether the inherited constructor is inherited from a virtual base of the object we constru...
StringLiteral * getFunctionName()
unsigned getNumExprs() const
Return the number of expressions in this paren list.
This represents '#pragma omp single' directive.
Encodes a location in the source.
StringRef getOutputConstraint(unsigned i) const
SourceLocation getOperatorLoc() const
const Stmt * getCatchBody() const
unsigned getNumHandlers() const
Expr * getSubExpr() const
NestedNameSpecifierLoc getQualifierLoc() const
Retrieves the nested-name-specifier that qualifies the type name, with source-location information...
This is a basic class for representing single OpenMP executable directive.
SourceLocation getBuiltinLoc() const
getBuiltinLoc - Return the location of the __builtin_astype token.
bool hasUnresolvedUsing() const
Determine whether the lookup results contain an unresolved using declaration.
CastKind getCastKind() const
Expr * getSubExpr(unsigned Idx) const
SourceLocation getOperatorLoc() const
Retrieve the location of the cast operator keyword, e.g., static_cast.
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c dictionary literal.
OMPClause * getClause(unsigned i) const
Returns specified clause.
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit...
Represents a C++2a __builtin_bit_cast(T, v) expression.
SourceLocation getEllipsisLoc() const
Retrieve the location of the ellipsis that describes this pack expansion.
Expr * getExpr()
Get 'expr' part of the associated expression/statement.
Represents a call to a member function that may be written either with member call syntax (e...
SourceLocation getExceptLoc() const
SourceRange getSourceRange() const LLVM_READONLY
DeclStmt - Adaptor class for mixing declarations with statements and expressions. ...
DeclarationNameInfo getDirectiveName() const
Return name of the directive.
SourceLocation getLBraceLoc() const
A CXXFunctionalCastExpr record.
A FloatingLiteral record.
SourceLocation getStrTokenLoc(unsigned TokNum) const
Get one of the string literal token.
StmtVisitor - This class implements a simple visitor for Stmt subclasses.
bool canOverflow() const
Returns true if the unary operator can cause an overflow.
SourceLocation getColonLoc() const
SourceLocation RAngleLoc
The source location of the right angle bracket ('>').
SourceLocation getRParenLoc() const
void AddTemplateArgument(const TemplateArgument &Arg)
Emit a template argument.
An ObjCEncodeExpr record.
SourceLocation getRParenLoc() const
SourceLocation getSuperLoc() const
Retrieve the location of the 'super' keyword for a class or instance message to 'super', otherwise an invalid source location.
This represents '#pragma omp taskwait' directive.
SourceLocation getAtLoc() const
SourceRange getSourceRange() const
An ImaginaryLiteral record.
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load, __atomic_store, and __atomic_compare_exchange_*, for the similarly-named C++11 instructions, and __c11 variants for <stdatomic.h>, and corresponding __opencl_atomic_* for OpenCL 2.0.
UnaryExprOrTypeTrait getKind() const
bool isOpenMPLoopBoundSharingDirective(OpenMPDirectiveKind Kind)
Checks if the specified directive kind is one of the composite or combined directives that need loop ...
ObjCProtocolExpr used for protocol expression in Objective-C.
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
SourceLocation getLParenLoc() const
SourceLocation getGotoLoc() const
SourceLocation getAtFinallyLoc() const
AccessSpecifier getAccess() const
const StringLiteral * getOutputConstraintLiteral(unsigned i) const
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Stmt * getCapturedStmt()
Retrieve the statement being captured.
void AddAttributes(ArrayRef< const Attr *> Attrs)
Emit a list of attributes.
SourceLocation getAtCatchLoc() const
CharacterKind getKind() const
This represents '#pragma omp target' directive.
Expr * getInputExpr(unsigned i)
void AddSourceLocation(SourceLocation Loc)
Emit a source location.
bool hasCancel() const
Return true if current directive has inner cancel directive.
Expr * getV()
Get 'v' part of the associated expression/statement.
bool isParenTypeId() const
SourceLocation getEndLoc() const
NullStmtBitfields NullStmtBits
An expression trait intrinsic.
ArrayRef< Expr * > exprs()
const ObjCMethodDecl * getMethodDecl() const
VarDecl * getConditionVariable()
Retrieve the variable declared in this "switch" statement, if any.
DeclStmt * getConditionVariableDeclStmt()
If this WhileStmt has a condition variable, return the faux DeclStmt associated with the creation of ...
This represents '#pragma omp ordered' directive.
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
void AddAPFloat(const llvm::APFloat &Value)
Emit a floating-point value.
This represents '#pragma omp target update' directive.
ObjCBoxedExpr - used for generalized expression boxing.
bool isArgumentType() const
SourceLocation getKeywordLoc() const
Expr * getArrayFiller()
If this initializer list initializes an array with more elements than there are initializers in the l...
SourceLocation getStarLoc() const
bool passAlignment() const
Indicates whether the required alignment should be implicitly passed to the allocation function...
bool isPartOfExplicitCast() const
FunctionDecl * getOperatorDelete() const
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name...
unsigned getExprImplicitCastAbbrev() const
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
void AddDeclarationNameInfo(const DeclarationNameInfo &NameInfo)
NonOdrUseReason isNonOdrUse() const
Is this expression a non-odr-use reference, and if so, why?
A qualified reference to a name whose declaration cannot yet be resolved.
Expr * Value
The value of the dictionary element.
const Expr * getInitializer() const
void AddTemplateKWAndArgsInfo(const ASTTemplateKWAndArgsInfo &ArgInfo, const TemplateArgumentLoc *Args)
CompoundAssignOperator - For compound assignments (e.g.
SourceLocation getLocation() const LLVM_READONLY
A POD class for pairing a NamedDecl* with an access specifier.
Represents a C11 generic selection.
ArrayRef< TemplateArgument > getPartialArguments() const
Get.
const Expr * getBase() const
Expr * getInstanceReceiver()
Returns the object expression (receiver) for an instance message, or null for a message that is not a...
AddrLabelExpr - The GNU address of label extension, representing &&label.
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers...
Represents a reference to a function parameter pack or init-capture pack that has been substituted bu...
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
unsigned getManglingNumber() const
SourceLocation getMemberLoc() const
TypeSourceInfo * getDestroyedTypeInfo() const
Retrieve the source location information for the type being destroyed.
Expr * getFalseExpr() const
getFalseExpr - Return the subexpression which will be evaluated if the condnition evaluates to false;...
NullStmt - This is the null statement ";": C99 6.8.3p3.
bool isTypeOperand() const
StringRef getInputConstraint(unsigned i) const
SourceLocation getLocation() const
unsigned getNumAssocs() const
The number of association expressions.
void writeClause(OMPClause *C)
Dataflow Directional Tag Classes.
Expr * getPrevUpperBoundVariable() const
An IntegerLiteral record.
VarDecl * getConditionVariable()
Retrieve the variable declared in this "while" statement, if any.
[C99 6.4.2.2] - A predefined identifier such as func.
SourceLocation getLocation() const
A CXXBoolLiteralExpr record.
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
IdentifierInfo * getOutputIdentifier(unsigned i) const
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
NonTypeTemplateParmDecl * getParameterPack() const
Retrieve the non-type template parameter pack being substituted.
MSPropertyDecl * getPropertyDecl() const
const Stmt * getFinallyBody() const
An ExtVectorElementExpr record.
ArrayRef< const Attr * > getAttrs() const
This represents '#pragma omp section' directive.
This represents '#pragma omp teams distribute' directive.
QualType getSuperType() const
Retrieve the type referred to by 'super'.
SourceLocation EllipsisLoc
The location of the ellipsis, if this is a pack expansion.
An ObjCIvarRefExpr record.
TypeSourceInfo * getTypeSourceInfo() const
Retrieve the type source information for the type being constructed.
AccessSpecifier getAccess() const
A runtime availability query.
bool hasCancel() const
Return true if current directive has inner cancel directive.
VarDecl *const * iterator
Iterators over the parameters which the parameter pack expanded into.
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
This represents '#pragma omp simd' directive.
Stmt * getHandler() const
Represents a 'co_yield' expression.
SourceLocation getLBraceLoc() const
SourceLocation getSemiLoc() const
An ObjCAutoreleasePoolStmt record.
Expr * getOperand() const
Retrieve the operand of the 'co_return' statement.
A CharacterLiteral record.
const Expr * getReductionRef() const
Returns reference to the task_reduction return variable.
Represents a C++11 pack expansion that produces a sequence of expressions.
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
An ObjCStringLiteral record.
A CXXDynamicCastExpr record.
A CXXForRangeStmt record.
DependentScopeDeclRefExprBitfields DependentScopeDeclRefExprBits
const Expr * getSynchExpr() const
Expr * getUpdateExpr()
Get helper expression of the form 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' or 'OpaqueValueExp...
SourceLocation getParameterPackLocation() const
Get the location of the parameter pack.
semantics_iterator semantics_begin()
bool isIfExists() const
Determine whether this is an __if_exists statement.
SourceLocation getBeginLoc() const
NestedNameSpecifierLoc getQualifierLoc() const
ExplicitCastExpr - An explicit cast written in the source code.
This represents '#pragma omp atomic' directive.
Expr * getCombinedInit() const
SourceLocation getLParenLoc() const
DeclStmt * getConditionVariableDeclStmt()
If this IfStmt has a condition variable, return the faux DeclStmt associated with the creation of tha...
void AddVersionTuple(const VersionTuple &Version)
Emit a version tuple.
An ObjCAtFinallyStmt record.
SourceLocation getRParenLoc() const
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
CXXNewExprBitfields CXXNewExprBits
llvm::APInt getValue() const
Represents a __leave statement.
unsigned getCollapsedNumber() const
Get number of collapsed loops.
Expr * getCombinedNextLowerBound() const
ArrayRef< Expr * > counters()
LabelDecl * getLabel() const
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
SwitchStmt - This represents a 'switch' stmt.
unsigned getByteLength() const
SourceLocation getColonColonLoc() const
Retrieve the location of the '::' in a qualified pseudo-destructor expression.
Expr * getCombinedNextUpperBound() const
SourceLocation getBeginLoc() const
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source location information.
SourceLocation getRParenLoc() const
Represents the body of a coroutine.
TemplateArgumentLoc * getTrailingTemplateArgumentLoc()
Return the optional template arguments.
Location wrapper for a TemplateArgument.
bool isOpenMPDistributeDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a distribute directive.
Iterator for iterating over Stmt * arrays that contain only T *.
SourceLocation getBuiltinLoc() const
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c array literal.
SourceLocation getLeaveLoc() const
Represents Objective-C's collection statement.
An ObjCAtSynchronizedStmt record.
ArrayRef< Expr * > inits()
unsigned getNumObjects() const
ObjCEncodeExpr, used for @encode in Objective-C.
SourceLocation getLocation() const
Retrieve the location of this expression.
SourceLocation getLocation() const
An implicit indirection through a C++ base class, when the field found is in a base class...
Expr * getCond() const
getCond - Return the condition expression; this is defined in terms of the opaque value...
A SizefAlignOfExpr record.
Represents a call to a CUDA kernel function.
SourceLocation getRParenLoc() const
Represents a 'co_await' expression.
TypeTraitExprBitfields TypeTraitExprBits
Expr * getReplacement() const
bool isDelegateInitCall() const
isDelegateInitCall - Answers whether this message send has been tagged as a "delegate init call"...
A CXXMemberCallExpr record.
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
SourceRange getDirectInitRange() const
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the member name, with source location information...
Expr * getNumIterations() const
Expr * getArg(unsigned Arg)
Return the specified argument.
StringRef getBytes() const
Allow access to clients that need the byte representation, such as ASTWriterStmt::VisitStringLiteral(...
Represents Objective-C's @finally statement.
SourceLocation getDefaultLoc() const
StringRef getAsmString() const
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
Expr * getPrevLowerBoundVariable() const
uint64_t EmitStmt(unsigned Code, unsigned Abbrev=0)
Emit the record to the stream, preceded by its substatements.
const Expr * getBase() const
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '...
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
SourceLocation getColonLoc() const
Represents a base class of a C++ class.
unsigned getNumClobbers() const
SourceLocation getRParenLoc() const
ObjCIvarRefExpr - A reference to an ObjC instance variable.
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof...
Represents an expression that might suspend coroutine execution; either a co_await or co_yield expres...
DeclStmt * getRangeStmt()
A ConvertVectorExpr record.
unsigned arg_size() const
Retrieve the number of arguments.
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
SourceLocation getAsmLoc() const
GotoStmt - This represents a direct goto.
A use of a default initializer in a constructor or in aggregate initialization.
Expr * getSrcExpr() const
getSrcExpr - Return the Expr to be converted.
const SwitchCase * getNextSwitchCase() const
CapturedDecl * getCapturedDecl()
Retrieve the outlined function declaration.
StringRef getUuidStr() const
QualType getSuperReceiverType() const
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
VarDecl * getConditionVariable()
Retrieve the variable declared in this "if" statement, if any.
ASTStmtWriter(ASTWriter &Writer, ASTWriter::RecordData &Record)
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
GNU array range designator.
SourceLocation getWhileLoc() const
An ArrayInitIndexExpr record.
A GCC-style AsmStmt record.
This represents '#pragma omp target parallel' directive.
ContinueStmt - This represents a continue.
Expr * getPromiseCall() const
Retrieve the promise call that results from this 'co_return' statement.
Represents a loop initializing the elements of an array.
SourceLocation getColonLoc() const
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
Expr * getFilterExpr() const
SourceLocation getAttrLoc() const
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
CXXCatchStmt - This represents a C++ catch block.
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
SourceLocation getRParenLoc() const
An object for streaming information to a record.
An ObjCAtCatchStmt record.
Expr * getCombinedCond() const
WhileStmt - This represents a 'while' stmt.
SourceRange getParenOrBraceRange() const
CleanupObject getObject(unsigned i) const
Field designator where the field has been resolved to a declaration.
unsigned getNumConcatenated() const
getNumConcatenated - Get the number of string literal tokens that were concatenated in translation ph...
SourceLocation getLParenLoc() const
bool containsUnexpandedParameterPack() const
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates)...
SourceLocation getAtSynchronizedLoc() const
A CXXInheritedCtorInitExpr record.
const DeclContext * getUsedContext() const
CompoundStmt * getTryBlock()
Writes an AST file containing the contents of a translation unit.
SourceLocation getBreakLoc() const
bool shouldCopy() const
shouldCopy - True if we should do the 'copy' part of the copy-restore.
Represents Objective-C's @try ... @catch ... @finally statement.
capture_iterator capture_end() const
Retrieve an iterator pointing past the end of the sequence of captures.
void AddCXXBaseSpecifier(const CXXBaseSpecifier &Base)
Emit a C++ base specifier.
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
bool isGlobalDelete() const
This represents '#pragma omp taskloop simd' directive.
void AddAPInt(const llvm::APInt &Value)
Emit an integral value.
SourceLocation getBuiltinLoc() const
getBuiltinLoc - Return the location of the __builtin_convertvector token.
unsigned getNumCatchStmts() const
Retrieve the number of @catch statements in this try-catch-finally block.
Expr * getBase() const
Retrieve the base object of this member expressions, e.g., the x in x.m.
StringLiteral - This represents a string literal expression, e.g.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
SourceRange getTypeIdParens() const
Expr * getPattern()
Retrieve the pattern of the pack expansion.
Expr * getPreCond() const
RetTy Visit(PTR(Stmt) S, ParamTys... P)
bool hasTemplateKWAndArgsInfo() const
An ObjCMessageExpr record.
void ClearSwitchCaseIDs()
Abstract class common to all of the C++ "named"/"keyword" casts.
This represents '#pragma omp sections' directive.
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
bool isObjectReceiver() const
A CompoundAssignOperator record.
unsigned getNumComponents() const
This represents '#pragma omp target data' directive.
const ParmVarDecl * getParam() const
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument for this lambda expression...
A reference to a declared variable, function, enum, etc.
NestedNameSpecifierLoc getQualifierLoc() const
Fetches the nested-name qualifier with source-location information, if one was given.
BreakStmt - This represents a break.
SourceLocation getReceiverLocation() const
const VarDecl * getCatchParamDecl() const
unsigned getNumLabels() const
SourceLocation getLocation() const
FieldDecl * getInitializedFieldInUnion()
If this initializes a union, specifies which field in the union to initialize.
bool isConditionDependent() const
SourceLocation getBridgeKeywordLoc() const
The location of the bridge keyword.
bool hadMultipleCandidates() const
Whether the referred constructor was resolved from an overloaded set having size greater than 1...
void AddTemplateArgumentLoc(const TemplateArgumentLoc &Arg)
Emits a template argument location.
DeclStmt * getLoopVarStmt()
unsigned getNumArgs() const
Return the number of arguments to the constructor call.
const Expr * getBase() const
A trivial tuple used to represent a source range.
This represents '#pragma omp taskyield' directive.
This represents '#pragma omp distribute parallel for simd' composite directive.
A boolean literal, per ([C++ lex.bool] Boolean literals).
SourceLocation getBeginLoc() const LLVM_READONLY
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type, member-designator).
Expr * getQueriedExpression() const
This represents '#pragma omp parallel sections' directive.
SourceLocation getBuiltinLoc() const
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
SourceLocation getRParenLoc() const
Expr * getCommon() const
getCommon - Return the common expression, written to the left of the condition.
TypeSourceInfo * getWrittenTypeInfo() const
DeclStmt * getBeginStmt()
SourceLocation getRightLoc() const
The receiver is a superclass.
SourceLocation getGenericLoc() const
SourceLocation LAngleLoc
The source location of the left angle bracket ('<').
bool hasCancel() const
Return true if current directive has inner cancel directive.
SourceLocation getBegin() const
TypeSourceInfo * getTypeSourceInfo() const
getTypeSourceInfo - Return the destination type.
SourceLocation getRParenLoc() const
Return the location of the right parentheses.
Represents Objective-C's @autoreleasepool Statement.
bool isConditionTrue() const
isConditionTrue - Return whether the condition is true (i.e.
decls_iterator decls_end() const
SourceLocation getKeywordLoc() const
bool caseStmtIsGNURange() const
True if this case statement is of the form case LHS ...
StmtCode
Record codes for each kind of statement or expression.
CompoundStmt * getTryBlock() const
QualType getBaseType() const
InitListExpr * getSyntacticForm() const
Expr * getBaseExpr() const
Represents an implicitly-generated value initialization of an object of a given type.
CompoundStmt * getBlock() const
SourceLocation getReturnLoc() const
CapturedRegionKind getCapturedRegionKind() const
Retrieve the captured region kind.
A GenericSelectionExpr record.
This represents '#pragma omp target parallel for' directive.
Expr * getLength()
Get length of array section.
SourceLocation getOperatorLoc() const
ConstructionKind getConstructionKind() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
SourceLocation getEndLoc() const LLVM_READONLY
TypeSourceInfo * getClassReceiverTypeInfo() const
Returns a type-source information of a class message send, or nullptr if the message is not a class m...
Expr * getBase()
An array section can be written only as Base[LowerBound:Length].
bool isOverloaded() const
True if this lookup is overloaded.
This represents '#pragma omp taskloop' directive.