22 #include "llvm/Bitcode/BitstreamWriter.h"
23 using namespace clang;
41 : Writer(Writer), Record(Record) { }
47 #define STMT(Type, Base) \
48 void Visit##Type(Type *);
49 #include "clang/AST/StmtNodes.inc"
58 for (
unsigned i = 0; i != ArgInfo.NumTemplateArgs; ++i)
65 void ASTStmtWriter::VisitNullStmt(
NullStmt *
S) {
68 Record.push_back(S->HasLeadingEmptyMacro);
74 Record.push_back(S->
size());
75 for (
auto *CS : S->
body())
82 void ASTStmtWriter::VisitSwitchCase(
SwitchCase *S) {
89 void ASTStmtWriter::VisitCaseStmt(
CaseStmt *S) {
98 void ASTStmtWriter::VisitDefaultStmt(
DefaultStmt *S) {
104 void ASTStmtWriter::VisitLabelStmt(
LabelStmt *S) {
114 Record.push_back(S->
getAttrs().size());
115 Writer.WriteAttributes(S->
getAttrs(), Record);
121 void ASTStmtWriter::VisitIfStmt(
IfStmt *S) {
132 void ASTStmtWriter::VisitSwitchStmt(
SwitchStmt *S) {
145 void ASTStmtWriter::VisitWhileStmt(
WhileStmt *S) {
154 void ASTStmtWriter::VisitDoStmt(
DoStmt *S) {
164 void ASTStmtWriter::VisitForStmt(
ForStmt *S) {
177 void ASTStmtWriter::VisitGotoStmt(
GotoStmt *S) {
193 void ASTStmtWriter::VisitContinueStmt(
ContinueStmt *S) {
199 void ASTStmtWriter::VisitBreakStmt(
BreakStmt *S) {
205 void ASTStmtWriter::VisitReturnStmt(
ReturnStmt *S) {
213 void ASTStmtWriter::VisitDeclStmt(
DeclStmt *S) {
223 void ASTStmtWriter::VisitAsmStmt(
AsmStmt *S) {
233 void ASTStmtWriter::VisitGCCAsmStmt(
GCCAsmStmt *S) {
259 void ASTStmtWriter::VisitMSAsmStmt(
MSAsmStmt *S) {
293 llvm_unreachable(
"unimplemented");
296 void ASTStmtWriter::VisitCoreturnStmt(
CoreturnStmt *S) {
298 llvm_unreachable(
"unimplemented");
301 void ASTStmtWriter::VisitCoawaitExpr(
CoawaitExpr *S) {
303 llvm_unreachable(
"unimplemented");
306 void ASTStmtWriter::VisitCoyieldExpr(
CoyieldExpr *S) {
308 llvm_unreachable(
"unimplemented");
311 void ASTStmtWriter::VisitCapturedStmt(
CapturedStmt *S) {
331 if (
I.capturesThis() ||
I.capturesVariableArrayType())
335 Record.push_back(
I.getCaptureKind());
342 void ASTStmtWriter::VisitExpr(
Expr *
E) {
361 void ASTStmtWriter::VisitDeclRefExpr(
DeclRefExpr *E) {
372 Record.push_back(NumTemplateArgs);
404 if (E->
getValue().getBitWidth() == 32) {
414 Record.push_back(E->
isExact());
430 Record.push_back(E->
getKind());
446 Record.push_back(E->
getKind());
453 void ASTStmtWriter::VisitParenExpr(
ParenExpr *E) {
463 Record.push_back(E->NumExprs);
464 for (
unsigned i=0; i != E->NumExprs; ++i)
479 void ASTStmtWriter::VisitOffsetOfExpr(
OffsetOfExpr *E) {
488 Record.push_back(ON.
getKind());
516 Record.push_back(E->
getKind());
546 void ASTStmtWriter::VisitCallExpr(
CallExpr *E) {
552 Arg != ArgEnd; ++Arg)
557 void ASTStmtWriter::VisitMemberExpr(
MemberExpr *E) {
564 Record.push_back(E->HasTemplateKWAndArgsInfo);
565 if (E->HasTemplateKWAndArgsInfo) {
568 Record.push_back(NumTemplateArgs);
571 for (
unsigned i=0; i != NumTemplateArgs; ++i)
587 Record.push_back(E->
isArrow());
594 void ASTStmtWriter::VisitObjCIsaExpr(
ObjCIsaExpr *E) {
599 Record.push_back(E->
isArrow());
612 VisitExplicitCastExpr(E);
619 void ASTStmtWriter::VisitCastExpr(
CastExpr *E) {
641 VisitBinaryOperator(E);
685 VisitExplicitCastExpr(E);
708 void ASTStmtWriter::VisitInitListExpr(
InitListExpr *E) {
715 bool isArrayFiller = E->ArrayFillerOrUnionFieldInit.is<
Expr*>();
716 Record.push_back(isArrayFiller);
746 if (D->isFieldDesignator()) {
756 }
else if (D->isArrayDesignator()) {
758 Record.push_back(D->getFirstExprIndex());
762 assert(D->isArrayRangeDesignator() &&
"Unknown designator");
764 Record.push_back(D->getFirstExprIndex());
780 void ASTStmtWriter::VisitNoInitExpr(
NoInitExpr *E) {
790 void ASTStmtWriter::VisitVAArgExpr(
VAArgExpr *E) {
808 void ASTStmtWriter::VisitStmtExpr(
StmtExpr *E) {
816 void ASTStmtWriter::VisitChooseExpr(
ChooseExpr *E) {
827 void ASTStmtWriter::VisitGNUNullExpr(
GNUNullExpr *E) {
852 void ASTStmtWriter::VisitBlockExpr(
BlockExpr *E) {
883 Record.push_back(result);
893 void ASTStmtWriter::VisitAtomicExpr(
AtomicExpr *E) {
895 Record.push_back(E->
getOp());
935 Record.push_back(E->HasPackExpansions);
940 if (E->HasPackExpansions) {
942 unsigned NumExpansions = 0;
945 Record.push_back(NumExpansions);
985 Record.push_back(E->
isArrow());
992 Record.push_back(E->SetterAndMethodRefFlags.getInt());
1003 Record.push_back(0);
1006 Record.push_back(1);
1009 Record.push_back(2);
1030 Record.push_back(E->getNumStoredSelLocs());
1031 Record.push_back(E->SelLocsKind);
1033 Record.push_back(E->IsImplicit);
1052 Record.push_back(1);
1055 Record.push_back(0);
1063 Arg != ArgEnd; ++Arg)
1067 for (
unsigned i = 0, e = E->getNumStoredSelLocs(); i != e; ++i)
1139 void ASTStmtWriter::VisitCXXCatchStmt(
CXXCatchStmt *S) {
1147 void ASTStmtWriter::VisitCXXTryStmt(
CXXTryStmt *S) {
1213 VisitCXXConstructExpr(E);
1218 void ASTStmtWriter::VisitLambdaExpr(
LambdaExpr *E) {
1220 Record.push_back(E->NumCaptures);
1221 unsigned NumArrayIndexVars = 0;
1222 if (E->HasArrayIndexVars)
1223 NumArrayIndexVars = E->getArrayIndexStarts()[E->NumCaptures];
1224 Record.push_back(NumArrayIndexVars);
1226 Record.push_back(E->CaptureDefault);
1228 Record.push_back(E->ExplicitParams);
1229 Record.push_back(E->ExplicitResultType);
1240 if (NumArrayIndexVars) {
1241 Record.append(E->getArrayIndexStarts(),
1242 E->getArrayIndexStarts() + E->NumCaptures + 1);
1243 VarDecl **ArrayIndexVars = E->getArrayIndexVars();
1244 for (
unsigned I = 0;
I != NumArrayIndexVars; ++
I)
1258 VisitExplicitCastExpr(E);
1265 VisitCXXNamedCastExpr(E);
1270 VisitCXXNamedCastExpr(E);
1275 VisitCXXNamedCastExpr(E);
1280 VisitCXXNamedCastExpr(E);
1285 VisitExplicitCastExpr(E);
1322 void ASTStmtWriter::VisitCXXThisExpr(
CXXThisExpr *E) {
1329 void ASTStmtWriter::VisitCXXThrowExpr(
CXXThrowExpr *E) {
1365 void ASTStmtWriter::VisitCXXNewExpr(
CXXNewExpr *E) {
1368 Record.push_back(E->
isArray());
1371 Record.push_back(E->StoredInitializationStyle);
1402 Record.push_back(E->
isArrow());
1436 Record.push_back(E->HasTemplateKWAndArgsInfo);
1437 if (E->HasTemplateKWAndArgsInfo) {
1438 const ASTTemplateKWAndArgsInfo &ArgInfo =
1439 *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>();
1440 Record.push_back(ArgInfo.NumTemplateArgs);
1450 Record.push_back(E->
isArrow());
1465 Record.push_back(E->HasTemplateKWAndArgsInfo);
1466 if (E->HasTemplateKWAndArgsInfo) {
1467 const ASTTemplateKWAndArgsInfo &ArgInfo =
1468 *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>();
1469 Record.push_back(ArgInfo.NumTemplateArgs);
1492 void ASTStmtWriter::VisitOverloadExpr(
OverloadExpr *E) {
1500 const ASTTemplateKWAndArgsInfo &ArgInfo =
1502 Record.push_back(ArgInfo.NumTemplateArgs);
1510 Record.push_back(OvI.getAccess());
1518 VisitOverloadExpr(E);
1519 Record.push_back(E->
isArrow());
1528 VisitOverloadExpr(E);
1537 Record.push_back(E->TypeTraitExprBits.NumArgs);
1538 Record.push_back(E->TypeTraitExprBits.Kind);
1539 Record.push_back(E->TypeTraitExprBits.Value);
1575 Record.push_back(E->NumExpansions);
1597 void ASTStmtWriter::VisitSubstNonTypeTemplateParmExpr(
1606 void ASTStmtWriter::VisitSubstNonTypeTemplateParmPackExpr(
1634 void ASTStmtWriter::VisitCXXFoldExpr(
CXXFoldExpr *E) {
1639 Writer.
AddStmt(E->SubExprs[0]);
1640 Writer.
AddStmt(E->SubExprs[1]);
1641 Record.push_back(E->Opcode);
1652 void ASTStmtWriter::VisitTypoExpr(
TypoExpr *E) {
1655 assert(
false &&
"Cannot write TypoExpr nodes");
1671 void ASTStmtWriter::VisitAsTypeExpr(
AsTypeExpr *E) {
1684 Record.push_back(E->
isArrow());
1727 void ASTStmtWriter::VisitSEHTryStmt(
SEHTryStmt *S) {
1736 void ASTStmtWriter::VisitSEHLeaveStmt(
SEHLeaveStmt *S) {
1752 : Writer(W), Record(Record) { }
1753 #define OPENMP_CLAUSE(Name, Class) \
1754 void Visit##Class(Class *S);
1755 #include "clang/Basic/OpenMPKinds.def"
1767 void OMPClauseWriter::VisitOMPIfClause(
OMPIfClause *
C) {
1836 void OMPClauseWriter::VisitOMPReadClause(
OMPReadClause *) {}
1848 void OMPClauseWriter::VisitOMPSIMDClause(
OMPSIMDClause *) {}
1872 for (
auto *VE : C->
inits()) {
1921 Record.push_back(C->getModifier());
1926 for (
auto *VE : C->privates()) {
1929 for (
auto *VE : C->inits()) {
1932 for (
auto *VE : C->updates()) {
1935 for (
auto *VE : C->finals()) {
1938 Writer->Writer.
AddStmt(C->getStep());
1939 Writer->Writer.
AddStmt(C->getCalcStep());
1943 Record.push_back(C->varlist_size());
1946 for (
auto *VE : C->varlists())
1952 Record.push_back(C->varlist_size());
1954 for (
auto *VE : C->varlists())
1965 Record.push_back(C->varlist_size());
1967 for (
auto *VE : C->varlists())
1978 Record.push_back(C->varlist_size());
1980 for (
auto *VE : C->varlists())
1985 Record.push_back(C->varlist_size());
1990 for (
auto *VE : C->varlists())
1999 void OMPClauseWriter::VisitOMPMapClause(
OMPMapClause *C) {
2000 Record.push_back(C->varlist_size());
2006 for (
auto *VE : C->varlists())
2035 void OMPClauseWriter::VisitOMPHintClause(
OMPHintClause *C) {
2048 ClauseWriter.writeClause(E->
getClause(i));
2058 VisitOMPExecutableDirective(D);
2081 for (
auto I : D->
inits()) {
2095 VisitOMPExecutableDirective(D);
2096 Record.push_back(D->
hasCancel() ? 1 : 0);
2101 VisitOMPLoopDirective(D);
2106 VisitOMPLoopDirective(D);
2107 Record.push_back(D->
hasCancel() ? 1 : 0);
2112 VisitOMPLoopDirective(D);
2119 VisitOMPExecutableDirective(D);
2120 Record.push_back(D->
hasCancel() ? 1 : 0);
2126 VisitOMPExecutableDirective(D);
2127 Record.push_back(D->
hasCancel() ? 1 : 0);
2134 VisitOMPExecutableDirective(D);
2140 VisitOMPExecutableDirective(D);
2147 VisitOMPExecutableDirective(D);
2153 VisitOMPLoopDirective(D);
2154 Record.push_back(D->
hasCancel() ? 1 : 0);
2158 void ASTStmtWriter::VisitOMPParallelForSimdDirective(
2160 VisitOMPLoopDirective(D);
2164 void ASTStmtWriter::VisitOMPParallelSectionsDirective(
2168 VisitOMPExecutableDirective(D);
2169 Record.push_back(D->
hasCancel() ? 1 : 0);
2176 VisitOMPExecutableDirective(D);
2177 Record.push_back(D->
hasCancel() ? 1 : 0);
2184 VisitOMPExecutableDirective(D);
2197 VisitOMPExecutableDirective(D);
2204 VisitOMPExecutableDirective(D);
2210 VisitOMPExecutableDirective(D);
2216 VisitOMPExecutableDirective(D);
2222 VisitOMPExecutableDirective(D);
2228 VisitOMPExecutableDirective(D);
2235 VisitOMPExecutableDirective(D);
2242 VisitOMPExecutableDirective(D);
2249 VisitOMPExecutableDirective(D);
2253 void ASTStmtWriter::VisitOMPCancellationPointDirective(
2256 VisitOMPExecutableDirective(D);
2264 VisitOMPExecutableDirective(D);
2270 VisitOMPLoopDirective(D);
2275 VisitOMPLoopDirective(D);
2280 VisitOMPLoopDirective(D);
2289 assert(SwitchCaseIDs.find(S) == SwitchCaseIDs.end() &&
2290 "SwitchCase recorded twice");
2291 unsigned NextID = SwitchCaseIDs.size();
2292 SwitchCaseIDs[
S] = NextID;
2297 assert(SwitchCaseIDs.find(S) != SwitchCaseIDs.end() &&
2298 "SwitchCase hasn't been seen yet");
2299 return SwitchCaseIDs[
S];
2303 SwitchCaseIDs.clear();
2308 void ASTWriter::WriteSubStmt(
Stmt *S,
2309 llvm::DenseMap<Stmt *, uint64_t> &SubStmtEntries,
2321 if (I != SubStmtEntries.end()) {
2322 Record.push_back(I->second);
2328 assert(!ParentStmts.count(S) &&
"There is a Stmt cycle!");
2330 struct ParentStmtInserterRAII {
2335 : S(S), ParentStmts(ParentStmts) {
2336 ParentStmts.insert(S);
2338 ~ParentStmtInserterRAII() {
2339 ParentStmts.erase(S);
2343 ParentStmtInserterRAII ParentStmtInserter(S, ParentStmts);
2348 CollectedStmts = &SubStmts;
2351 Writer.AbbrevToUse = 0;
2357 = DeclIDs.begin()->first->getASTContext().getSourceManager();
2359 llvm_unreachable(
"Unhandled sub-statement writing AST file");
2364 CollectedStmts = &StmtsToEmit;
2370 while (!SubStmts.empty())
2371 WriteSubStmt(SubStmts.pop_back_val(), SubStmtEntries, ParentStmts);
2373 Stream.EmitRecord(Writer.Code, Record, Writer.AbbrevToUse);
2375 SubStmtEntries[
S] = Stream.GetCurrentBitNo();
2385 assert(SubStmtEntries.empty() &&
"unexpected entries in sub-stmt map");
2386 assert(ParentStmts.empty() &&
"unexpected entries in parent stmt map");
2388 for (
unsigned I = 0, N = StmtsToEmit.size(); I != N; ++
I) {
2389 WriteSubStmt(StmtsToEmit[I], SubStmtEntries, ParentStmts);
2391 assert(N == StmtsToEmit.size() &&
2392 "Substatement written via AddStmt rather than WriteSubStmt!");
2399 SubStmtEntries.clear();
2400 ParentStmts.clear();
2403 StmtsToEmit.clear();
void AddTemplateArgument(const TemplateArgument &Arg, RecordDataImpl &Record)
Emit a template argument.
A CXXConstCastExpr record.
SourceLocation getRParenLoc() const
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
A call to an overloaded operator written using operator syntax.
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
The receiver is the instance of the superclass object.
Represents a single C99 designator.
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
SourceRange getParenOrBraceRange() const
Defines the clang::ASTContext interface.
A CompoundLiteralExpr record.
unsigned getNumInits() const
This represents '#pragma omp master' directive.
SourceLocation getEnd() const
const SwitchCase * getNextSwitchCase() const
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
const Expr * getBase() const
ParmVarDecl *const * iterator
Iterators over the parameters which the parameter pack expanded into.
The null pointer literal (C++11 [lex.nullptr])
CastKind getCastKind() const
ExprObjectKind getObjectKind() const
getObjectKind - The object kind that this expression produces.
This represents '#pragma omp task' directive.
This represents a GCC inline-assembly statement extension.
serialization::StmtCode Code
IdentifierInfo * getFieldName() const
For a field or identifier offsetof node, returns the name of the field.
TypeSourceInfo * getDestroyedTypeInfo() const
Retrieve the source location information for the type being destroyed.
NamedDecl * getFoundDecl()
Get the NamedDecl through which this reference occurred.
OpenMPScheduleClauseModifier getSecondScheduleModifier() const
Get the second modifier of the clause.
unsigned arg_size() const
Retrieve the number of arguments.
unsigned getNumOutputs() const
TypeSourceInfo * getTypeSourceInfo() const
This represents 'thread_limit' clause in the '#pragma omp ...' directive.
A UserDefinedLiteral record.
The receiver is an object instance.
SourceRange getSourceRange() const LLVM_READONLY
bool isXLHSInRHSPart() const
Return true if helper update expression has form 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' and...
Expr * getSyntacticForm()
Return the syntactic form of this expression, i.e.
bool isFPContractable() const
void AddDeclarationNameInfo(const DeclarationNameInfo &NameInfo, RecordDataImpl &Record)
const DeclGroupRef getDeclGroup() const
SourceLocation getLParenLoc() const
Returns the location of '('.
An IndirectGotoStmt record.
This represents clause 'copyin' in the '#pragma omp ...' directives.
const ObjCAtFinallyStmt * getFinallyStmt() const
Retrieve the @finally statement, if any.
SourceLocation getColonLoc() const
Get colon location.
helper_expr_const_range source_exprs() const
bool containsUnexpandedParameterPack() const
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates)...
NameKind
NameKind - The kind of name this object contains.
SourceLocation getLParenLoc() const
Retrieve the location of the left parentheses ('(') that precedes the argument list.
bool isResultDependent() const
Whether this generic selection is result-dependent.
SourceLocation getOperatorLoc() const
Retrieve the location of the '->' or '.' operator.
SourceLocation getThrowLoc() const
void AddToken(const Token &Tok, RecordDataImpl &Record)
Emit a token.
SourceLocation getLParenLoc() const
SourceLocation getCommaLoc()
Get location of ','.
SourceLocation getLocation() const
bool isElidable() const
Whether this construction is elidable.
Expr * getExpr(unsigned Index)
getExpr - Return the Expr at the specified index.
bool isDelegateInitCall() const
isDelegateInitCall - Answers whether this message send has been tagged as a "delegate init call"...
A CXXStaticCastExpr record.
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
An AttributedStmt record.
void AddAPInt(const llvm::APInt &Value, RecordDataImpl &Record)
Emit an integral value.
CompoundStmt * getSubStmt()
A CXXReinterpretCastExpr record.
Expr * getSimdlen() const
Return safe iteration space distance.
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding the member name, if any.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the member name, with source location information...
A ObjCBoolLiteralExpr record.
private_copies_range private_copies()
CharacterKind getKind() const
Expr *const * semantics_iterator
Represents a 'co_return' statement in the C++ Coroutines TS.
TypeSourceInfo * getScopeTypeInfo() const
Retrieve the scope type in a qualified pseudo-destructor expression.
CXXCatchStmt * getHandler(unsigned i)
bool isArgumentType() const
IfStmt - This represents an if/then/else.
bool isGlobalDelete() const
This represents '#pragma omp for simd' directive.
SourceLocation getLParenLoc() const
Returns the location of '('.
SourceLocation getForLoc() const
OpenMPProcBindClauseKind getProcBindKind() const
Returns kind of the clause.
TypeSourceInfo * getTypeSourceInfo() const
SourceLocation getLParenLoc() const
Returns the location of '('.
SourceRange getTypeIdParens() const
An ImplicitValueInitExpr record.
unsigned getPackLength() const
Retrieve the length of the parameter pack.
Decl - This represents one declaration (or definition), e.g.
SourceLocation getLParenLoc() const
This represents 'grainsize' clause in the '#pragma omp ...' directive.
AccessSpecifier getAccess() const
ObjCMethodDecl * getAtIndexMethodDecl() const
An ImplicitCastExpr record.
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
This represents 'if' clause in the '#pragma omp ...' directive.
Defines the C++ template declaration subclasses.
Represents an attribute applied to a statement.
TypeSourceInfo * getArg(unsigned I) const
Retrieve the Ith argument.
ParenExpr - This represents a parethesized expression, e.g.
SourceLocation getRParenLoc() const
A CXXOperatorCallExpr record.
Expr * getLowerBound()
Get lower bound of array section.
This represents 'priority' clause in the '#pragma omp ...' directive.
unsigned getArrayExprIndex() const
For an array element node, returns the index into the array of expressions.
SourceLocation getBuiltinLoc() const
getBuiltinLoc - Return the location of the __builtin_astype token.
A CXXTemporaryObjectExpr record.
Represents Objective-C's @throw statement.
unsigned getDeclRefExprAbbrev() const
unsigned getResultIndex() const
The zero-based index of the result expression's generic association in the generic selection's associ...
SourceLocation getLabelLoc() const
void AddTypeSourceInfo(TypeSourceInfo *TInfo, RecordDataImpl &Record)
Emits a reference to a declarator info.
InitListExpr * getSyntacticForm() const
SourceLocation getIfLoc() const
Represents a call to a C++ constructor.
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
SourceLocation getCoawaitLoc() const
TypeSourceInfo * getTypeSourceInfo() const
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent...
SourceLocation getColonLoc() const
Returns the location of ':'.
This represents 'update' clause in the '#pragma omp atomic' directive.
const Stmt * getElse() const
SourceLocation getOperatorLoc() const
This represents '#pragma omp parallel for' directive.
MS property subscript expression.
void AddTypeRef(QualType T, RecordDataImpl &Record)
Emit a reference to a type.
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "for" statement, if any.
SourceLocation getLParenLoc() const
Returns the location of '('.
SourceLocation getColonLoc() const
Get colon location.
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
Expr * getAlignment()
Returns alignment.
SourceLocation getEndLoc() const
CompoundStmt * getBlock() const
IdentType getIdentType() const
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
bool isConditionTrue() const
isConditionTrue - Return whether the condition is true (i.e.
Expr * getIndexExpr(unsigned Idx)
bool hadArrayRangeDesignator() const
ObjCDictionaryElement getKeyValueElement(unsigned Index) const
This represents 'read' clause in the '#pragma omp atomic' directive.
SourceRange getSourceRange() const LLVM_READONLY
Expr * getOperand() const
ArrayRef< TemplateArgument > getPartialArguments() const
Get.
VarDecl - An instance of this class is created to represent a variable declaration or definition...
SourceLocation getReturnLoc() const
This represents clause 'private' in the '#pragma omp ...' directives.
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
This represents 'num_threads' clause in the '#pragma omp ...' directive.
CompoundLiteralExpr - [C99 6.5.2.5].
SourceRange getSourceRange() const LLVM_READONLY
const Expr * getCallee() const
StringRef getInputConstraint(unsigned i) const
SourceLocation getLocation() const
Retrieve the location of the literal.
A ConditionOperator record.
const TypeSourceInfo * getAssocTypeSourceInfo(unsigned i) const
void AddCXXTemporary(const CXXTemporary *Temp, RecordDataImpl &Record)
Emit a CXXTemporary.
SourceLocation getDoLoc() const
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
SourceLocation getRParenLoc() const
UnaryExprOrTypeTrait getKind() const
CapturedRegionKind getCapturedRegionKind() const
Retrieve the captured region kind.
This represents implicit clause 'flush' for the '#pragma omp flush' directive.
Expr * getCond() const
getCond - Return the condition expression; this is defined in terms of the opaque value...
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.
const ParmVarDecl * getParam() const
SourceLocation getLParenLoc() const
raw_arg_iterator raw_arg_begin()
unsigned getValue() const
A C++ throw-expression (C++ [except.throw]).
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
Expr * getNumForLoops() const
Return the number of associated for-loops.
SourceRange getSourceRange() const LLVM_READONLY
QualType getBaseType() const
unsigned path_size() const
SourceLocation getLocation() const
SourceLocation getEllipsisLoc() const
SourceLocation getAtLoc() const
void AddIdentifierRef(const IdentifierInfo *II, RecordDataImpl &Record)
Emit a reference to an identifier.
ArrayTypeTrait getTrait() const
This represents 'nogroup' clause in the '#pragma omp ...' directive.
TypeSourceInfo * getTypeSourceInfo() const
Retrieve the type source information for the type being constructed.
A ShuffleVectorExpr record.
This represents 'safelen' clause in the '#pragma omp ...' directive.
SourceLocation getDestroyedTypeLoc() const
Retrieve the starting location of the type being destroyed.
A C++ static_cast expression (C++ [expr.static.cast]).
OpenMPDirectiveKind getDirectiveKind() const
LabelStmt - Represents a label, which has a substatement.
SourceLocation getRParenLoc() const
Return the location of the right parentheses.
Represents a C99 designated initializer expression.
SourceLocation getIsaMemberLoc() const
getMemberLoc - Return the location of the "member", in X->F, it is the location of 'F'...
SourceLocation getLParenLoc() const
Returns the location of '('.
Expr * getNumThreads() const
Returns number of threads.
An ObjCAtThrowStmt record.
ObjCProtocolDecl * getProtocol() const
CompoundStmt * getSubStmt() const
Retrieve the compound statement that will be included in the program only if the existence of the sym...
SourceLocation getLParenLoc() const
Returns the location of '('.
Expr * getSubExpr(unsigned Idx) const
bool hasCancel() const
Return true if current directive has inner cancel directive.
An element in an Objective-C dictionary literal.
A DesignatedInitExpr record.
This represents '#pragma omp parallel' directive.
unsigned getNumInputs() const
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
ObjCInterfaceDecl * getClassReceiver() const
This represents 'simd' clause in the '#pragma omp ...' directive.
OpenMPScheduleClauseModifier getFirstScheduleModifier() const
Get the first modifier of the clause.
unsigned getNumSemanticExprs() const
unsigned getNumAssocs() const
An ObjCProtocolExpr record.
An ObjCSelectorExpr record.
SourceLocation getAmpAmpLoc() const
FieldDecl - An instance of this class is created by Sema::ActOnField to represent a member of a struc...
This represents clause 'lastprivate' in the '#pragma omp ...' directives.
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.
unsigned getManglingNumber() const
SourceLocation getLocStart() const
Returns the starting location of the clause.
StringLiteral * getString()
SourceLocation getRParen() const
Get the location of the right parentheses ')'.
const TemplateArgumentLoc * getTemplateArgs() const
Retrieve the template arguments provided as part of this template-id.
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
ArrayRef< Expr * > updates()
This represents clause 'map' in the '#pragma omp ...' directives.
The iterator over UnresolvedSets.
TypeSourceInfo * getTypeSourceInfo() const
DeclarationNameInfo getNameInfo() const
Retrieve the name of the entity we're testing for, along with location information.
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
SourceLocation getAtLoc() const
IdentifierInfo & getAccessor() const
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
SourceLocation getLBracLoc() const
SourceLocation getLBraceLoc() const
This represents '#pragma omp barrier' directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp, [NSNumber numberWithInt:42]];.
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
This is a common base class for loop directives ('omp simd', 'omp for', 'omp for simd' etc...
Expr * getNumTeams()
Return NumTeams number.
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
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.
SourceLocation getRParenLoc() const
Expr * getFilterExpr() const
bool isFPContractable() const
SourceLocation getSuperLoc() const
Retrieve the location of the 'super' keyword for a class or instance message to 'super', otherwise an invalid source location.
bool shouldCopy() const
shouldCopy - True if we should do the 'copy' part of the copy-restore.
const VarDecl * getCatchParamDecl() const
bool isOverloaded() const
True if this lookup is overloaded.
SourceLocation getWhileLoc() const
Represents Objective-C's @catch statement.
const CompoundStmt * getSynchBody() const
const VarDecl * getNRVOCandidate() const
Retrieve the variable that might be used for the named return value optimization. ...
This represents clause 'copyprivate' in the '#pragma omp ...' directives.
IndirectGotoStmt - This represents an indirect goto.
Describes an C or C++ initializer list.
SourceLocation getFirstScheduleModifierLoc() const
Get the first modifier location.
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
SmallVector< uint64_t, 64 > RecordData
ObjCMethodDecl * getBoxingMethod() const
IdentifierInfo * getOutputIdentifier(unsigned i) const
const Stmt * getFinallyBody() const
ForStmt - This represents a 'for (init;cond;inc)' stmt.
ArrayRef< Expr * > finals()
ObjCBridgeCastKind getBridgeKind() const
Determine which kind of bridge is being performed via this cast.
IdentifierInfo * getDestroyedTypeIdentifier() const
In a dependent pseudo-destructor expression for which we do not have full type information on the des...
helper_expr_const_range private_copies() const
const ValueDecl * getExtendingDecl() const
Get the declaration which triggered the lifetime-extension of this temporary, if any.
SourceLocation getAtFinallyLoc() const
Expr * getX()
Get 'x' part of the associated expression/statement.
QualType getSuperType() const
Retrieve the type referred to by 'super'.
bool isSuperReceiver() const
SourceLocation getRParenLoc() const
A reference to a previously [de]serialized Stmt record.
Stmt * getHandlerBlock() const
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
Expr * getExprOperand() const
path_iterator path_begin()
SourceLocation getLParen() const
Get the location of the left parentheses '('.
helper_expr_const_range source_exprs() const
OpenMPScheduleClauseKind getScheduleKind() const
Get kind of the clause.
const Expr * getSubExpr() const
semantics_iterator semantics_end()
SourceLocation getRParenLoc() const
void AddSourceRange(SourceRange Range, RecordDataImpl &Record)
Emit a source range.
A builtin binary operation expression such as "x + y" or "x <= y".
SourceLocation getLocation() const
Selector getSelector() const
SourceLocation getRBraceLoc() const
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
Expr * getOutputExpr(unsigned i)
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for statement, represented as 'for (ra...
void AddSelectorRef(Selector, RecordDataImpl &Record)
Emit a Selector (which is a smart pointer reference).
SourceLocation getThrowLoc()
This represents '#pragma omp cancellation point' directive.
This represents 'default' clause in the '#pragma omp ...' directive.
ObjCStringLiteral, used for Objective-C string literals i.e.
Expr * getBaseExpr() const
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
const Stmt * getCatchBody() const
This represents 'final' clause in the '#pragma omp ...' directive.
This represents 'mergeable' clause in the '#pragma omp ...' directive.
SourceLocation getSecondScheduleModifierLoc() const
Get the second modifier location.
This represents '#pragma omp teams' directive.
bool isConditionDependent() const
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
This represents clause 'reduction' in the '#pragma omp ...' directives.
void AddTemplateArgumentLoc(const TemplateArgumentLoc &Arg, RecordDataImpl &Record)
Emits a template argument location.
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.
Represents binding an expression to a temporary.
const ObjCAtCatchStmt * getCatchStmt(unsigned I) const
Retrieve a @catch statement.
StringLiteral * getClobberStringLiteral(unsigned i)
Expr * Key
The key for the dictionary element.
CXXTemporary * getTemporary()
bool isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a worksharing directive.
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
TypeSourceInfo * getTypeInfoAsWritten() const
getTypeInfoAsWritten - Returns the type source info for the type that this expression is casting to...
bool hasCancel() const
Return true if current directive has inner cancel directive.
const RecordDecl * getCapturedRecordDecl() const
Retrieve the record declaration for captured variables.
Represents a C++ member access expression where the actual member referenced could not be resolved be...
const Expr * getBase() const
CleanupObject getObject(unsigned i) const
bool isArrow() const
Determine whether this pseudo-destructor expression was written using an '->' (otherwise, it used a '.
Expr * getHint() const
Returns number of threads.
bool hadMultipleCandidates() const
Returns true if this member expression refers to a method that was resolved from an overloaded set ha...
SourceLocation getLocation() const
ObjCMethodDecl * setAtIndexMethodDecl() const
detail::InMemoryDirectory::const_iterator I
SourceLocation getUsedLocation() const
Retrieve the location where this default argument was actually used.
SourceLocation getDefaultLoc() const
A default argument (C++ [dcl.fct.default]).
ExpressionTrait getTrait() const
SourceLocation getSwitchLoc() const
Represents the this expression in C++.
bool hadMultipleCandidates() const
Whether the referred constructor was resolved from an overloaded set having size greater than 1...
MSPropertyDecl * getPropertyDecl() const
OpenMPDefaultClauseKind getDefaultKind() const
Returns kind of the clause.
SourceLocation getRParenLoc() const
getRParenLoc - Return the location of final right parenthesis.
SourceLocation getBuiltinLoc() const
unsigned RecordSwitchCaseID(SwitchCase *S)
Record an ID for the given switch-case statement.
OpenMPClauseKind getClauseKind() const
Returns kind of OpenMP clause (private, shared, reduction, etc.).
SourceLocation getReceiverLocation() const
SourceLocation getOperatorLoc() const LLVM_READONLY
OpenMPDependClauseKind getDependencyKind() const
Get dependency type.
ArrayRef< Expr * > private_counters()
OpenMP 4.0 [2.4, Array Sections].
FunctionDecl * getOperatorDelete() const
SourceLocation getColonColonLoc() const
Retrieve the location of the '::' in a qualified pseudo-destructor expression.
void AddNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS, RecordDataImpl &Record)
Emit a nested name specifier with source-location information.
SourceLocation getRParenLoc() const
SourceLocation getLocEnd() const
Returns the ending location of the clause.
ConditionalOperator - The ?: ternary operator.
unsigned getNumDecls() const
Gets the number of declarations in the unresolved set.
SourceLocation getTryLoc() const
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
llvm::APInt getValue() const
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
SourceLocation getMemberLoc() const
SourceLocation getTokenLocation() const
getTokenLocation - The location of the __null token.
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
CompoundStmt - This represents a group of statements like { stmt stmt }.
SourceLocation getAsmLoc() const
This represents 'threads' clause in the '#pragma omp ...' directive.
StringRef getAsmString() const
void Visit(PTR(OMPClause) S)
This represents '#pragma omp taskgroup' directive.
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
SourceLocation getDefaultKindKwLoc() const
Returns location of clause kind.
unsigned getNumObjects() const
const Expr * getControllingExpr() const
OMPClauseWriter(ASTStmtWriter *W, ASTWriter::RecordData &Record)
This represents clause 'aligned' in the '#pragma omp ...' directives.
unsigned getNumExpansions() const
Get the number of parameters in this parameter pack.
SourceRange getSourceRange() const LLVM_READONLY
Expr * getQueriedExpression() const
NestedNameSpecifierLoc getQualifierLoc() const
Stmt * getHandler() const
unsigned getCharacterLiteralAbbrev() const
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
TypeSourceInfo * getEncodedTypeSourceInfo() const
NamedDecl * getDecl() const
bool isPostfixUpdate() const
Return true if 'v' expression must be updated to original value of 'x', false if 'v' must be updated ...
unsigned getSwitchCaseID(SwitchCase *S)
Retrieve the ID for the given switch-case statement.
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on a template...
Represents a call to the builtin function __builtin_va_arg.
bool HasTemplateKWAndArgsInfo
Whether the name includes info for explicit template keyword and arguments.
FunctionDecl * getOperatorDelete() const
NamedDecl * getFirstQualifierFoundInScope() const
Retrieve the first part of the nested-name-specifier that was found in the scope of the member access...
SourceLocation getOpLoc() const
NameKind getNameKind() const
getNameKind - Determine what kind of name this is.
static unsigned getNumSubExprs(AtomicOp Op)
Determine the number of arguments the specified atomic builtin should have.
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called...
This represents '#pragma omp distribute' directive.
This represents implicit clause 'depend' for the '#pragma omp task' directive.
const ObjCMethodDecl * getMethodDecl() const
designators_iterator designators_begin()
LabelDecl * getDecl() const
OMPClause * getClause(unsigned i) const
Returns specified clause.
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type...
SourceLocation getLParenLoc() const
Returns the location of '('.
SourceLocation getColonLoc() const
Gets location of ':' symbol in clause.
IdentifierInfo * getInputIdentifier(unsigned i) const
This represents 'proc_bind' clause in the '#pragma omp ...' directive.
This represents 'capture' clause in the '#pragma omp atomic' directive.
Expr - This represents one expression.
SourceLocation getRParenLoc() const
SourceLocation getMapLoc() const LLVM_READONLY
Fetches location of clause mapping kind.
SourceLocation getRParenLoc() const
helper_expr_const_range assignment_ops() const
NestedNameSpecifierLoc getQualifierLoc() const
Fetches the nested-name qualifier with source-location information, if one was given.
This represents 'simdlen' clause in the '#pragma omp ...' directive.
decls_iterator decls_end() const
SourceLocation getScheduleKindLoc()
Get kind location.
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "while" statement, if any.
SourceLocation getLocation() const
Retrieve the location of this expression.
TypeSourceInfo * getTypeSourceInfo() const
getTypeSourceInfo - Return the destination type.
bool hasCancel() const
Return true if current directive has inner cancel directive.
Expr * getCondition() const
Returns condition.
Represents a C++ functional cast expression that builds a temporary object.
unsigned getExprImplicitCastAbbrev() const
SourceLocation getLBraceLoc() const
bool hasCancel() const
Return true if current directive has inner cancel directive.
SourceLocation getRParenLoc() const
A C++ const_cast expression (C++ [expr.const.cast]).
unsigned getNumExpressions() const
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Field designator where only the field name is known.
An ObjCSubscriptRefExpr record.
Expr * getIterationVariable() const
SourceLocation getGotoLoc() const
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source location information.
ObjCMethodDecl * getImplicitPropertyGetter() const
raw_arg_iterator raw_arg_end()
SourceLocation getLocation() const
SourceLocation getEqualOrColonLoc() const
Retrieve the location of the '=' that precedes the initializer value itself, if present.
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
ConstructionKind getConstructionKind() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
Represents Objective-C's @synchronized statement.
ObjCSelectorExpr used for @selector in Objective-C.
bool isImplicitAccess() const
True if this is an implicit access, i.e., one in which the member being accessed was not written in t...
A CXXStdInitializerListExpr record.
SourceLocation getLParenLoc() const
Returns the location of '('.
Represents an expression that computes the length of a parameter pack.
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.
OpenMPDirectiveKind getNameModifier() const
Return directive name modifier associated with the clause.
void AddString(StringRef Str, RecordDataImpl &Record)
Add a string to the given record.
This represents 'ordered' clause in the '#pragma omp ...' directive.
Selector getSelector() const
A PseudoObjectExpr record.
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c array literal.
NonTypeTemplateParmDecl * getParameterPack() const
Retrieve the non-type template parameter pack being substituted.
SourceRange getAngleBrackets() const LLVM_READONLY
SourceLocation getEndLoc() const
const SwitchCase * getSwitchCaseList() const
void AddCXXBaseSpecifier(const CXXBaseSpecifier &Base, RecordDataImpl &Record)
Emit a C++ base specifier.
SourceLocation getQuestionLoc() const
SourceLocation getLocation() const
Expr * getSubExpr() const
capture_init_range capture_inits()
This represents '#pragma omp for' directive.
An ObjCIndirectCopyRestoreExpr record.
SourceLocation getLabelLoc() const
Expr * getElement(unsigned Index)
getExpr - Return the Expr at the specified index.
SourceLocation getColonLoc() const
Return the location of ':'.
SourceLocation getLParenLoc() const
Returns the location of '('.
Optional< unsigned > NumExpansions
The number of elements this pack expansion will expand to, if this is a pack expansion and is known...
Stmt * getTemporary() const
Represents a folding of a pack over an operator.
ReturnStmt - This represents a return, optionally of an expression: return; return 4;...
Expr * getSrcExpr() const
getSrcExpr - Return the Expr to be converted.
Expr * getIsLastIterVariable() const
An expression that sends a message to the given Objective-C object or class.
unsigned getNumComponents() const
This represents a Microsoft inline-assembly statement extension.
CXXBaseSpecifier * getBase() const
For a base class node, returns the base specifier.
A DesignatedInitUpdateExpr record.
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)
A member reference to an MSPropertyDecl.
Expr * getNextUpperBound() const
DeclarationName getDeclName() const
getDeclName - Get the actual, stored name of the declaration, which may be a special name...
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Expr * getDevice()
Return device number.
This represents '#pragma omp cancel' directive.
SourceLocation getLParenLoc() const
Returns the location of '('.
This represents 'collapse' clause in the '#pragma omp ...' directive.
SourceLocation getKeywordLoc() const
Retrieve the location of the __if_exists or __if_not_exists keyword.
This represents clause 'firstprivate' in the '#pragma omp ...' directives.
QualType getComputationLHSType() const
SourceLocation getProcBindKindKwLoc() const
Returns location of clause kind.
SourceRange getSourceRange() const LLVM_READONLY
unsigned getNumClauses() const
Get number of clauses.
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.
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
NestedNameSpecifierLoc getQualifierLoc() const
If the name was qualified, retrieves the nested-name-specifier that precedes the name, with source-location information.
Expr * getLHS()
An array access can be written A[4] or 4[A] (both are equivalent).
SourceLocation getLParenLoc() const
SourceLocation getSemiLoc() const
An ObjCPropertyRefExpr record.
APFloatSemantics getRawSemantics() const
Get a raw enumeration value representing the floating-point semantics of this literal (32-bit IEEE...
helper_expr_const_range privates() const
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1...
SourceLocation getAtLoc() const
This represents '#pragma omp flush' directive.
An ObjCForCollectionStmt record.
helper_expr_const_range destination_exprs() const
SourceLocation getParameterPackLocation() const
Retrieve the location of the parameter pack name.
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.
This represents '#pragma omp parallel for simd' directive.
InitListExpr * getUpdater() const
DoStmt - This represents a 'do/while' stmt.
AsmStmt is the base class for GCCAsmStmt and MSAsmStmt.
This represents 'seq_cst' clause in the '#pragma omp atomic' directive.
SourceLocation getRightLoc() const
This represents 'untied' clause in the '#pragma omp ...' directive.
SourceLocation getLParenLoc() const
Returns the location of '('.
SourceLocation getLocStart() const
Returns starting location of directive kind.
QualType getComputationResultType() const
A MS-style AsmStmt record.
unsigned getNumSubExprs() const
getNumSubExprs - Return the size of the SubExprs array.
LabelDecl * getLabel() const
void AddSourceLocation(SourceLocation Loc, RecordDataImpl &Record)
Emit a source location.
decls_iterator decls_begin() const
SourceLocation getOperatorLoc() const
SourceLocation getLParenLoc()
Get location of '('.
This represents 'num_teams' clause in the '#pragma omp ...' directive.
SourceLocation getAtLoc() 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...
SourceLocation getGotoLoc() const
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
const StringLiteral * getAsmString() 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.
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
SourceLocation getRBracket() const
Expr * getNumForLoops() const
Return the number of associated for-loops.
unsigned getResultExprIndex() const
Return the index of the result-bearing expression into the semantics expressions, or PseudoObjectExpr...
This represents '#pragma omp single' directive.
Encodes a location in the source.
SourceLocation getLeaveLoc() const
This represents 'hint' clause in the '#pragma omp ...' directive.
helper_expr_const_range reduction_ops() const
const TemplateArgument * iterator
SourceLocation getLParenLoc() const
Returns the location of '('.
Expr * getSourceExpr() const
The source expression of an opaque value expression is the expression which originally generated the ...
SourceLocation getOperatorLoc() const
getOperatorLoc - Return the location of the operator.
This is a basic class for representing single OpenMP executable directive.
private_copies_range private_copies()
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies this name, if any.
NonTypeTemplateParmDecl * getParameter() const
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
SourceLocation getOperatorLoc() const
Retrieve the location of the '.' or '->' operator.
Expr * getLowerBoundVariable() const
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit...
Expr * getCondition() const
Returns condition.
helper_expr_const_range lhs_exprs() const
This represents 'schedule' clause in the '#pragma omp ...' directive.
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...
unsigned getCollapsedNumber() const
Get number of collapsed loops.
SourceLocation getKeywordLoc() const
SourceRange getSourceRange() const LLVM_READONLY
bool refersToEnclosingVariableOrCapture() const
Does this DeclRefExpr refer to an enclosing local or a captured variable?
SourceLocation getRParenLoc() const
DeclStmt - Adaptor class for mixing declarations with statements and expressions. ...
CompoundStmt * getBlock() const
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
This represents clause 'shared' in the '#pragma omp ...' directives.
const Expr * getCond() const
TemplateArgument getArgumentPack() const
Retrieve the template argument pack containing the substituted template arguments.
SourceLocation getIdentLoc() const
A CXXFunctionalCastExpr record.
Expr * getSrcExpr() const
getSrcExpr - Return the Expr to be converted.
A FloatingLiteral record.
SourceLocation getTryLoc() const
TypeSourceInfo * getClassReceiverTypeInfo() const
Returns a type-source information of a class message send, or NULL if the message is not a class mess...
Expr * getPriority()
Return Priority number.
StmtVisitor - This class implements a simple visitor for Stmt subclasses.
An ObjCEncodeExpr record.
SourceLocation getGenericLoc() const
SourceLocation getAtLoc() const
This represents '#pragma omp taskwait' directive.
OpenMPMapClauseKind getMapType() const LLVM_READONLY
Fetches mapping kind for the clause.
bool isImplicitAccess() const
True if this is an implicit access, i.e.
SourceLocation getStrTokenLoc(unsigned TokNum) const
An ImaginaryLiteral record.
This is a basic class for representing single OpenMP clause.
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>.
unsigned getIntegerLiteralAbbrev() const
ObjCProtocolExpr used for protocol expression in Objective-C.
SourceLocation getContinueLoc() const
QualType getBaseType() const
StringLiteral * getFunctionName()
SourceLocation getOperatorLoc() const
Retrieve the location of the cast operator keyword, e.g., static_cast.
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "switch" statement, if any.
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
capture_iterator capture_end() const
Retrieve an iterator pointing past the end of the sequence of captures.
Stmt * getCapturedStmt()
Retrieve the statement being captured.
OpenMPMapClauseKind getMapTypeModifier() const LLVM_READONLY
Fetches the map type modifier for the clause.
ParmVarDecl * getParameterPack() const
Get the parameter pack which this expression refers to.
SourceLocation getLParenLoc() const
Returns the location of '('.
This represents '#pragma omp target' directive.
Expr * getInputExpr(unsigned i)
SourceLocation getBegin() const
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.
Expr * getUpperBoundVariable() const
SourceLocation getDependencyLoc() const
Get dependency type location.
bool isAllEnumCasesCovered() const
Returns true if the SwitchStmt is a switch of an enum value and all cases have been explicitly covere...
Expr * getV()
Get 'v' part of the associated expression/statement.
void AddDeclRef(const Decl *D, RecordDataImpl &Record)
Emit a reference to a declaration.
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '...
StringRef getOutputConstraint(unsigned i) const
An expression trait intrinsic.
StringRef getClobber(unsigned i) const
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
SourceLocation getAtSynchronizedLoc() const
uint64_t getValue() const
This represents '#pragma omp ordered' directive.
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
const Expr * getBase() const
ObjCBoxedExpr - used for generalized expression boxing.
Expr * getGrainsize() const
Return safe iteration space distance.
Expr * getArrayFiller()
If this initializer list initializes an array with more elements than there are initializers in the l...
const BlockDecl * getBlockDecl() const
bool isObjectReceiver() const
SourceLocation getForLoc() const
SourceLocation getRParenLoc() const
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name...
const OffsetOfNode & getComponent(unsigned Idx) const
Expr * getPreCond() const
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
SourceLocation getNameLoc() const
SourceLocation getOperatorLoc() const
getOperatorLoc - Return the location of the operator.
A qualified reference to a name whose declaration cannot yet be resolved.
Expr * Value
The value of the dictionary element.
SourceLocation getRBracketLoc() const
SourceLocation getRBracketLoc() const
void AddTemplateKWAndArgsInfo(const ASTTemplateKWAndArgsInfo &ArgInfo, const TemplateArgumentLoc *Args)
CompoundAssignOperator - For compound assignments (e.g.
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof...
A POD class for pairing a NamedDecl* with an access specifier.
Represents a C11 generic selection.
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...
SourceLocation getEllipsisLoc() const
Retrieve the location of the ellipsis that describes this pack expansion.
Represents a reference to a function parameter pack that has been substituted but not yet expanded...
void AddDeclarationNameLoc(const DeclarationNameLoc &DNLoc, DeclarationName Name, RecordDataImpl &Record)
Expr * getReplacement() const
SourceLocation getLocation() const
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "if" statement, if any.
Expr * getCommon() const
getCommon - Return the common expression, written to the left of the condition.
NullStmt - This is the null statement ";": C99 6.8.3p3.
const Expr * getSubExpr() const
bool isImplicitProperty() const
void writeClause(OMPClause *C)
SourceLocation getLParenLoc() const
This represents 'device' clause in the '#pragma omp ...' directive.
const Expr * getAssocExpr(unsigned i) const
An IntegerLiteral record.
helper_expr_const_range rhs_exprs() const
bool hadMultipleCandidates() const
Returns true if this expression refers to a function that was resolved from an overloaded set having ...
[C99 6.4.2.2] - A predefined identifier such as func.
unsigned getByteLength() const
A CXXBoolLiteralExpr record.
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
SourceLocation getStarLoc() const
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
SourceLocation getOpLoc() const
bool hasCancel() const
Return true if current directive has inner cancel directive.
const Stmt * getBody() const
An ExtVectorElementExpr record.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieves the nested-name-specifier that qualifies the type name, with source-location information...
This represents '#pragma omp section' directive.
bool isThrownVariableInScope() const
Determines whether the variable thrown by this expression (if any!) is within the innermost try block...
NestedNameSpecifierLoc getQualifierLoc() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name...
ExprIterator arg_iterator
SourceLocation getLParenLoc() const
SourceLocation EllipsisLoc
The location of the ellipsis, if this is a pack expansion.
An ObjCIvarRefExpr record.
designators_iterator designators_end()
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
This represents '#pragma omp simd' directive.
SourceLocation getTildeLoc() const
Retrieve the location of the '~'.
Represents a 'co_yield' expression.
An ObjCAutoreleasePoolStmt record.
const Expr * getSynchExpr() const
unsigned getNumHandlers() const
Expr * getNumTasks() const
Return safe iteration space distance.
A CharacterLiteral record.
const StringLiteral * getOutputConstraintLiteral(unsigned i) const
Represents a C++11 pack expansion that produces a sequence of expressions.
An ObjCStringLiteral record.
unsigned getNumPlacementArgs() const
A CXXDynamicCastExpr record.
StringRef getBytes() const
Allow access to clients that need the byte representation, such as ASTWriterStmt::VisitStringLiteral(...
SourceLocation getWhileLoc() const
This represents clause 'linear' in the '#pragma omp ...' directives.
DeclarationNameInfo getDirectiveName() const
Return name of the directive.
A CXXForRangeStmt record.
StringKind getKind() const
bool isTypeOperand() const
ObjCMethodDecl * getArrayWithObjectsMethod() const
Expr * getEnsureUpperBound() const
detail::InMemoryDirectory::const_iterator E
Expr * getUpdateExpr()
Get helper expression of the form 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' or 'OpaqueValueExp...
bool usesGNUSyntax() const
Determines whether this designated initializer used the deprecated GNU syntax for designated initiali...
semantics_iterator semantics_begin()
const Expr * getRetValue() const
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
SourceLocation getLocation() const
ExplicitCastExpr - An explicit cast written in the source code.
unsigned getNumArgs() const
unsigned getNumConcatenated() const
getNumConcatenated - Get the number of string literal tokens that were concatenated in translation ph...
This represents '#pragma omp atomic' directive.
SourceLocation getParameterPackLocation() const
Get the location of the parameter pack.
Expr * getBaseExpr() const
CXXRecordDecl * getNamingClass() const
Gets the 'naming class' (in the sense of C++0x [class.access.base]p5) of the lookup.
An ObjCAtFinallyStmt record.
Expr * getCalcLastIteration() const
ObjCMethodDecl * getDictWithObjectsMethod() const
llvm::APFloat getValue() const
Represents a __leave statement.
const Stmt * getThen() const
ArrayRef< Expr * > counters()
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
SourceLocation getMemberLoc() const
getMemberLoc - Return the location of the "member", in X->F, it is the location of 'F'...
bool hasQualifier() const
Determine whether this declaration reference was preceded by a C++ nested-name-specifier, e.g., N::foo.
SwitchStmt - This represents a 'switch' stmt.
SourceLocation getAtCatchLoc() const
SourceLocation getRParenLoc() const
getRParenLoc - Return the location of final right parenthesis.
SourceLocation getRParenLoc() const
Expr * getSafelen() const
Return safe iteration space distance.
Represents the body of a coroutine.
SourceLocation getLeftLoc() const
TemplateArgumentLoc * getTrailingTemplateArgumentLoc()
Return the optional template arguments.
Location wrapper for a TemplateArgument.
Expr * getBase() const
Retrieve the base object of this member expressions, e.g., the x in x.m.
SourceLocation getOperatorLoc() const
Retrieve the location of the '->' or '.' operator.
FunctionDecl * getOperatorNew() const
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
DeclStmt * getBeginEndStmt()
const Stmt * getSubStmt() const
Represents Objective-C's collection statement.
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
An ObjCAtSynchronizedStmt record.
SourceLocation getBridgeKeywordLoc() const
The location of the bridge keyword.
ArrayRef< Expr * > inits()
ObjCEncodeExpr, used for @encode in Objective-C.
SourceLocation getLParenLoc() const
Returns the location of '('.
SourceLocation getBuiltinLoc() const
SourceLocation getAtTryLoc() const
Retrieve the location of the @ in the @try.
An implicit indirection through a C++ base class, when the field found is in a base class...
SourceLocation getLParenLoc() const
Returns the location of '('.
A SizefAlignOfExpr record.
Represents a call to a CUDA kernel function.
Represents a 'co_await' expression.
TypeSourceInfo * getWrittenTypeInfo() const
A CXXMemberCallExpr record.
Expr * getArg(unsigned Arg)
Return the specified argument.
CXXConstructorDecl * getConstructor() const
Expr * getExprOperand() const
Represents Objective-C's @finally statement.
const Expr * getSubExpr() const
SourceLocation getRParenLoc() const
Retrieve the location of the right parentheses (')') that follows the argument list.
QualType getSuperReceiverType() const
ExprIterator arg_iterator
SourceLocation getRParenLoc() const
SourceLocation getBuiltinLoc() const
getBuiltinLoc - Return the location of the __builtin_convertvector token.
Expr * getKeyExpr() const
unsigned getNumArgs() const
Return the number of actual arguments in this message, not counting the receiver. ...
LabelDecl * getLabel() const
SourceLocation getAccessorLoc() const
Represents a base class of a C++ class.
This represents 'write' clause in the '#pragma omp atomic' directive.
ObjCPropertyDecl * getExplicitProperty() const
unsigned getNumCatchStmts() const
Retrieve the number of @catch statements in this try-catch-finally block.
const Expr * getInitializer() const
SourceRange getDirectInitRange() const
SourceLocation getRParenLoc() const
ObjCIvarRefExpr - A reference to an ObjC instance variable.
SourceLocation getForLoc() const
SourceLocation getLocation() const
DeclStmt * getRangeStmt()
A ConvertVectorExpr record.
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
Expr * getFalseExpr() const
getFalseExpr - Return the subexpression which will be evaluated if the condnition evaluates to false;...
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
GotoStmt - This represents a direct goto.
ArrayRef< const Attr * > getAttrs() const
A use of a default initializer in a constructor or in aggregate initialization.
SourceLocation getColonLoc() const
SourceLocation getAttrLoc() const
SourceLocation getLParenLoc() const
Returns the location of '('.
CapturedDecl * getCapturedDecl()
Retrieve the outlined function declaration.
helper_expr_const_range destination_exprs() const
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
const StringLiteral * getInputConstraintLiteral(unsigned i) const
ASTStmtWriter(ASTWriter &Writer, ASTWriter::RecordData &Record)
bool isArrayFormAsWritten() const
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
GNU array range designator.
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
Expr * getNextLowerBound() const
SourceLocation getFinallyLoc() const
const Expr * getSubExpr() const
void AddStmt(Stmt *S)
Add the given statement or expression to the queue of statements to emit.
A GCC-style AsmStmt record.
SourceLocation getBuiltinLoc() const
SourceLocation getRParenLoc() const
Retrieve the location of the closing parenthesis.
This represents 'nowait' clause in the '#pragma omp ...' directive.
void FlushStmts()
Flush all of the statements and expressions that have been added to the queue via AddStmt()...
ContinueStmt - This represents a continue.
SourceLocation getRParenLoc() const
This represents 'num_tasks' clause in the '#pragma omp ...' directive.
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
SourceLocation getBreakLoc() const
CXXCatchStmt - This represents a C++ catch block.
SourceLocation getBuiltinLoc() const
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
bool hasQualifier() const
Determines whether this member expression actually had a C++ nested-name-specifier prior to the name ...
An ObjCAtCatchStmt record.
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
WhileStmt - This represents a 'while' stmt.
Field designator where the field has been resolved to a declaration.
const Expr * getCond() const
FieldDecl * getField() const
For a field offsetof node, returns the field.
SourceLocation getElseLoc() const
TypeSourceInfo * getQueriedTypeSourceInfo() const
helper_expr_const_range assignment_ops() const
Expr * getThreadLimit()
Return ThreadLimit number.
CompoundStmt * getTryBlock()
Writes an AST file containing the contents of a translation unit.
Represents Objective-C's @try ... @catch ... @finally statement.
This represents '#pragma omp taskloop simd' directive.
const Expr * getThrowExpr() const
bool hasTemplateKWAndArgsInfo() const
SourceLocation getRBracketLoc() const
SourceLocation getLocation() const
StringLiteral - This represents a string literal expression, e.g.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Expr * getPattern()
Retrieve the pattern of the pack expansion.
Expr * getHelperChunkSize()
Get helper chunk size.
bool isIfExists() const
Determine whether this is an __if_exists statement.
An ObjCMessageExpr record.
SourceLocation getRBracLoc() const
SourceLocation getColonLoc() const
bool hasCancel() const
Return true if current directive has inner cancel directive.
void ClearSwitchCaseIDs()
Abstract class common to all of the C++ "named"/"keyword" casts.
bool isMicrosoftABI() const
Returns whether this is really a Win64 ABI va_arg expression.
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
This represents '#pragma omp sections' directive.
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
const Stmt * getTryBody() const
Retrieve the @try body.
A CompoundAssignOperator record.
This represents '#pragma omp target data' directive.
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument for this lambda expression...
VarDecl * getExceptionDecl() const
A reference to a declared variable, function, enum, etc.
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
SourceLocation getLParenLoc() const
Returns the location of '('.
BreakStmt - This represents a break.
Expr * getLastIteration() const
SourceLocation getColonLoc() const
Expr * getChunkSize()
Get chunk size.
const Expr * getInit(unsigned Init) const
const Expr * getSubExpr() const
FieldDecl * getInitializedFieldInUnion()
If this initializes a union, specifies which field in the union to initialize.
TypeSourceInfo * getAllocatedTypeSourceInfo() const
DeclStmt * getLoopVarStmt()
unsigned getNumClobbers() const
Expr * getTrueExpr() const
getTrueExpr - Return the subexpression which will be evaluated if the condition evaluates to true; th...
SourceLocation getRParenLoc() const
A trivial tuple used to represent a source range.
helper_expr_const_range destination_exprs() const
This represents '#pragma omp taskyield' directive.
SourceLocation getRParenLoc() const
A boolean literal, per ([C++ lex.bool] Boolean literals).
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type, member-designator).
CompoundStmt * getTryBlock() const
This represents '#pragma omp parallel sections' directive.
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
SourceLocation getStartLoc() const
const CallExpr * getConfig() const
SourceLocation getLocation() const
SourceLocation getLocEnd() const
Returns ending location of directive.
bool isTypeOperand() const
The receiver is a superclass.
Stmt * getAssociatedStmt() const
Returns statement associated with the directive.
SourceLocation getExceptLoc() const
SourceLocation getNameModifierLoc() const
Return the location of directive name modifier.
SourceLocation getCatchLoc() const
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
Represents Objective-C's @autoreleasepool Statement.
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '...
unsigned varlist_size() const
StmtCode
Record codes for each kind of statement or expression.
This class handles loading and caching of source files into memory.
Represents an implicitly-generated value initialization of an object of a given type.
ObjCMethodDecl * getImplicitPropertySetter() const
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c dictionary literal.
A GenericSelectionExpr record.
SourceLocation getRParenLoc() const
SourceLocation getRParenLoc() const
Expr * getLength()
Get length of array section.
Kind getKind() const
Determine what kind of offsetof node this is.
helper_expr_const_range assignment_ops() const
SourceLocation getColonLoc() const
Expr * getStrideVariable() const
void AddAPFloat(const llvm::APFloat &Value, RecordDataImpl &Record)
Emit a floating-point value.
DeclAccessPair getFoundDecl() const
Retrieves the declaration found by lookup.
bool hasUnresolvedUsing() const
Determine whether the lookup results contain an unresolved using declaration.
Expr * getBase()
An array section can be written only as Base[LowerBound:Length].
TypeSourceInfo * getArgumentTypeInfo() const
helper_expr_const_range source_exprs() const
This represents '#pragma omp taskloop' directive.