22 #include "llvm/ADT/FoldingSet.h"
23 using namespace clang;
27 llvm::FoldingSetNodeID &
ID;
34 : ID(ID), Context(Context), Canonical(Canonical) { }
36 void VisitStmt(
const Stmt *
S);
38 #define STMT(Node, Base) void Visit##Node(const Node *S);
39 #include "clang/AST/StmtNodes.inc"
43 void VisitDecl(
const Decl *D);
70 void StmtProfiler::VisitStmt(
const Stmt *
S) {
71 ID.AddInteger(S->getStmtClass());
72 for (
const Stmt *SubStmt : S->children()) {
80 void StmtProfiler::VisitDeclStmt(
const DeclStmt *S) {
82 for (
const auto *D : S->
decls())
86 void StmtProfiler::VisitNullStmt(
const NullStmt *S) {
90 void StmtProfiler::VisitCompoundStmt(
const CompoundStmt *S) {
94 void StmtProfiler::VisitSwitchCase(
const SwitchCase *S) {
98 void StmtProfiler::VisitCaseStmt(
const CaseStmt *S) {
102 void StmtProfiler::VisitDefaultStmt(
const DefaultStmt *S) {
106 void StmtProfiler::VisitLabelStmt(
const LabelStmt *S) {
116 void StmtProfiler::VisitIfStmt(
const IfStmt *S) {
121 void StmtProfiler::VisitSwitchStmt(
const SwitchStmt *S) {
126 void StmtProfiler::VisitWhileStmt(
const WhileStmt *S) {
131 void StmtProfiler::VisitDoStmt(
const DoStmt *S) {
135 void StmtProfiler::VisitForStmt(
const ForStmt *S) {
139 void StmtProfiler::VisitGotoStmt(
const GotoStmt *S) {
148 void StmtProfiler::VisitContinueStmt(
const ContinueStmt *S) {
152 void StmtProfiler::VisitBreakStmt(
const BreakStmt *S) {
156 void StmtProfiler::VisitReturnStmt(
const ReturnStmt *S) {
160 void StmtProfiler::VisitGCCAsmStmt(
const GCCAsmStmt *S) {
171 for (
unsigned I = 0, N = S->
getNumInputs(); I != N; ++I) {
180 void StmtProfiler::VisitMSAsmStmt(
const MSAsmStmt *S) {
185 void StmtProfiler::VisitCXXCatchStmt(
const CXXCatchStmt *S) {
190 void StmtProfiler::VisitCXXTryStmt(
const CXXTryStmt *S) {
205 void StmtProfiler::VisitSEHTryStmt(
const SEHTryStmt *S) {
213 void StmtProfiler::VisitSEHExceptStmt(
const SEHExceptStmt *S) {
217 void StmtProfiler::VisitSEHLeaveStmt(
const SEHLeaveStmt *S) {
221 void StmtProfiler::VisitCapturedStmt(
const CapturedStmt *S) {
240 void StmtProfiler::VisitObjCAtTryStmt(
const ObjCAtTryStmt *S) {
260 StmtProfiler *Profiler;
262 template <
typename T>
263 void VisitOMPClauseList(T *
Node);
265 OMPClauseProfiler(StmtProfiler *
P) : Profiler(P) { }
266 #define OPENMP_CLAUSE(Name, Class) \
267 void Visit##Class(const Class *C);
268 #include "clang/Basic/OpenMPKinds.def"
271 void OMPClauseProfiler::VisitOMPIfClause(
const OMPIfClause *
C) {
296 void OMPClauseProfiler::VisitOMPDefaultClause(
const OMPDefaultClause *C) { }
311 void OMPClauseProfiler::VisitOMPNowaitClause(
const OMPNowaitClause *) {}
313 void OMPClauseProfiler::VisitOMPUntiedClause(
const OMPUntiedClause *) {}
317 void OMPClauseProfiler::VisitOMPReadClause(
const OMPReadClause *) {}
319 void OMPClauseProfiler::VisitOMPWriteClause(
const OMPWriteClause *) {}
321 void OMPClauseProfiler::VisitOMPUpdateClause(
const OMPUpdateClause *) {}
325 void OMPClauseProfiler::VisitOMPSeqCstClause(
const OMPSeqCstClause *) {}
328 void OMPClauseProfiler::VisitOMPClauseList(T *
Node) {
329 for (
auto *E : Node->varlists()) {
330 Profiler->VisitStmt(E);
335 VisitOMPClauseList(C);
337 Profiler->VisitStmt(E);
342 VisitOMPClauseList(C);
344 Profiler->VisitStmt(E);
346 for (
auto *E : C->
inits()) {
347 Profiler->VisitStmt(E);
352 VisitOMPClauseList(C);
354 Profiler->VisitStmt(E);
357 Profiler->VisitStmt(E);
360 Profiler->VisitStmt(E);
363 void OMPClauseProfiler::VisitOMPSharedClause(
const OMPSharedClause *C) {
364 VisitOMPClauseList(C);
366 void OMPClauseProfiler::VisitOMPReductionClause(
368 Profiler->VisitNestedNameSpecifier(
371 VisitOMPClauseList(C);
373 Profiler->VisitStmt(E);
376 Profiler->VisitStmt(E);
379 Profiler->VisitStmt(E);
382 void OMPClauseProfiler::VisitOMPLinearClause(
const OMPLinearClause *C) {
383 VisitOMPClauseList(C);
384 for (
auto *E : C->inits()) {
385 Profiler->VisitStmt(E);
387 for (
auto *E : C->updates()) {
388 Profiler->VisitStmt(E);
390 for (
auto *E : C->finals()) {
391 Profiler->VisitStmt(E);
393 Profiler->VisitStmt(C->getStep());
394 Profiler->VisitStmt(C->getCalcStep());
397 VisitOMPClauseList(C);
400 void OMPClauseProfiler::VisitOMPCopyinClause(
const OMPCopyinClause *C) {
401 VisitOMPClauseList(C);
403 Profiler->VisitStmt(E);
406 Profiler->VisitStmt(E);
409 Profiler->VisitStmt(E);
414 VisitOMPClauseList(C);
416 Profiler->VisitStmt(E);
419 Profiler->VisitStmt(E);
422 Profiler->VisitStmt(E);
425 void OMPClauseProfiler::VisitOMPFlushClause(
const OMPFlushClause *C) {
426 VisitOMPClauseList(C);
428 void OMPClauseProfiler::VisitOMPDependClause(
const OMPDependClause *C) {
429 VisitOMPClauseList(C);
436 OMPClauseProfiler
P(
this);
445 VisitOMPExecutableDirective(S);
449 VisitOMPExecutableDirective(S);
453 VisitOMPLoopDirective(S);
457 VisitOMPLoopDirective(S);
461 VisitOMPLoopDirective(S);
465 VisitOMPExecutableDirective(S);
469 VisitOMPExecutableDirective(S);
473 VisitOMPExecutableDirective(S);
477 VisitOMPExecutableDirective(S);
481 VisitOMPExecutableDirective(S);
487 VisitOMPLoopDirective(S);
490 void StmtProfiler::VisitOMPParallelForSimdDirective(
492 VisitOMPLoopDirective(S);
495 void StmtProfiler::VisitOMPParallelSectionsDirective(
497 VisitOMPExecutableDirective(S);
501 VisitOMPExecutableDirective(S);
505 VisitOMPExecutableDirective(S);
509 VisitOMPExecutableDirective(S);
513 VisitOMPExecutableDirective(S);
517 VisitOMPExecutableDirective(S);
521 VisitOMPExecutableDirective(S);
525 VisitOMPExecutableDirective(S);
529 VisitOMPExecutableDirective(S);
533 VisitOMPExecutableDirective(S);
537 VisitOMPExecutableDirective(S);
540 void StmtProfiler::VisitOMPCancellationPointDirective(
542 VisitOMPExecutableDirective(S);
546 VisitOMPExecutableDirective(S);
549 void StmtProfiler::VisitExpr(
const Expr *S) {
553 void StmtProfiler::VisitDeclRefExpr(
const DeclRefExpr *S) {
590 void StmtProfiler::VisitStringLiteral(
const StringLiteral *S) {
596 void StmtProfiler::VisitParenExpr(
const ParenExpr *S) {
600 void StmtProfiler::VisitParenListExpr(
const ParenListExpr *S) {
604 void StmtProfiler::VisitUnaryOperator(
const UnaryOperator *S) {
609 void StmtProfiler::VisitOffsetOfExpr(
const OffsetOfExpr *S) {
612 for (
unsigned i = 0; i < n; ++i) {
649 void StmtProfiler::VisitCallExpr(
const CallExpr *S) {
653 void StmtProfiler::VisitMemberExpr(
const MemberExpr *S) {
666 void StmtProfiler::VisitCastExpr(
const CastExpr *S) {
681 VisitExplicitCastExpr(S);
691 VisitBinaryOperator(S);
698 void StmtProfiler::VisitBinaryConditionalOperator(
703 void StmtProfiler::VisitAddrLabelExpr(
const AddrLabelExpr *S) {
708 void StmtProfiler::VisitStmtExpr(
const StmtExpr *S) {
720 void StmtProfiler::VisitChooseExpr(
const ChooseExpr *S) {
724 void StmtProfiler::VisitGNUNullExpr(
const GNUNullExpr *S) {
728 void StmtProfiler::VisitVAArgExpr(
const VAArgExpr *S) {
732 void StmtProfiler::VisitInitListExpr(
const InitListExpr *S) {
747 if (D->isFieldDesignator()) {
749 VisitName(D->getFieldName());
753 if (D->isArrayDesignator()) {
756 assert(D->isArrayRangeDesignator());
759 ID.AddInteger(D->getFirstExprIndex());
765 void StmtProfiler::VisitDesignatedInitUpdateExpr(
767 llvm_unreachable(
"Unexpected DesignatedInitUpdateExpr in syntactic form of "
771 void StmtProfiler::VisitNoInitExpr(
const NoInitExpr *S) {
772 llvm_unreachable(
"Unexpected NoInitExpr in syntactic form of initializer");
784 void StmtProfiler::VisitBlockExpr(
const BlockExpr *S) {
794 ID.AddPointer(
nullptr);
807 Visit(OVE->getSourceExpr());
810 void StmtProfiler::VisitAtomicExpr(
const AtomicExpr *S) {
823 case OO_Array_Delete:
828 llvm_unreachable(
"Invalid operator call kind");
833 return Stmt::UnaryOperatorClass;
837 return Stmt::BinaryOperatorClass;
842 return Stmt::UnaryOperatorClass;
846 return Stmt::BinaryOperatorClass;
851 return Stmt::UnaryOperatorClass;
855 return Stmt::BinaryOperatorClass;
859 return Stmt::BinaryOperatorClass;
863 return Stmt::BinaryOperatorClass;
867 return Stmt::BinaryOperatorClass;
872 return Stmt::UnaryOperatorClass;
876 return Stmt::BinaryOperatorClass;
880 return Stmt::BinaryOperatorClass;
884 return Stmt::UnaryOperatorClass;
888 return Stmt::UnaryOperatorClass;
892 return Stmt::BinaryOperatorClass;
896 return Stmt::BinaryOperatorClass;
900 return Stmt::BinaryOperatorClass;
904 return Stmt::CompoundAssignOperatorClass;
908 return Stmt::CompoundAssignOperatorClass;
912 return Stmt::CompoundAssignOperatorClass;
916 return Stmt::CompoundAssignOperatorClass;
918 case OO_PercentEqual:
920 return Stmt::CompoundAssignOperatorClass;
924 return Stmt::CompoundAssignOperatorClass;
928 return Stmt::CompoundAssignOperatorClass;
932 return Stmt::CompoundAssignOperatorClass;
936 return Stmt::BinaryOperatorClass;
938 case OO_GreaterGreater:
940 return Stmt::BinaryOperatorClass;
942 case OO_LessLessEqual:
944 return Stmt::CompoundAssignOperatorClass;
946 case OO_GreaterGreaterEqual:
948 return Stmt::CompoundAssignOperatorClass;
952 return Stmt::BinaryOperatorClass;
954 case OO_ExclaimEqual:
956 return Stmt::BinaryOperatorClass;
960 return Stmt::BinaryOperatorClass;
962 case OO_GreaterEqual:
964 return Stmt::BinaryOperatorClass;
968 return Stmt::BinaryOperatorClass;
972 return Stmt::BinaryOperatorClass;
977 return Stmt::UnaryOperatorClass;
982 return Stmt::UnaryOperatorClass;
986 return Stmt::BinaryOperatorClass;
991 return Stmt::BinaryOperatorClass;
994 return Stmt::ArraySubscriptExprClass;
997 llvm_unreachable(
"Invalid overloaded operator expression");
1010 for (
unsigned I = 0, N = S->
getNumArgs(); I != N; ++I)
1012 if (SC == Stmt::UnaryOperatorClass)
1013 ID.AddInteger(UnaryOp);
1014 else if (SC == Stmt::BinaryOperatorClass ||
1015 SC == Stmt::CompoundAssignOperatorClass)
1016 ID.AddInteger(BinaryOp);
1018 assert(SC == Stmt::ArraySubscriptExprClass);
1035 void StmtProfiler::VisitAsTypeExpr(
const AsTypeExpr *S) {
1040 VisitExplicitCastExpr(S);
1044 VisitCXXNamedCastExpr(S);
1048 VisitCXXNamedCastExpr(S);
1053 VisitCXXNamedCastExpr(S);
1057 VisitCXXNamedCastExpr(S);
1073 void StmtProfiler::VisitCXXStdInitializerListExpr(
1078 void StmtProfiler::VisitCXXTypeidExpr(
const CXXTypeidExpr *S) {
1084 void StmtProfiler::VisitCXXUuidofExpr(
const CXXUuidofExpr *S) {
1095 void StmtProfiler::VisitCXXThisExpr(
const CXXThisExpr *S) {
1100 void StmtProfiler::VisitCXXThrowExpr(
const CXXThrowExpr *S) {
1127 VisitExplicitCastExpr(S);
1132 VisitCXXConstructExpr(S);
1136 StmtProfiler::VisitLambdaExpr(
const LambdaExpr *S) {
1141 ID.AddInteger(C->getCaptureKind());
1142 switch (C->getCaptureKind()) {
1147 VisitDecl(C->getCapturedVar());
1148 ID.AddBoolean(C->isPackExpansion());
1151 llvm_unreachable(
"VLA type in explicit captures.");
1165 void StmtProfiler::VisitCXXDeleteExpr(
const CXXDeleteExpr *S) {
1173 void StmtProfiler::VisitCXXNewExpr(
const CXXNewExpr *S) {
1200 void StmtProfiler::VisitOverloadExpr(
const OverloadExpr *S) {
1212 VisitOverloadExpr(S);
1215 void StmtProfiler::VisitTypeTraitExpr(
const TypeTraitExpr *S) {
1219 for (
unsigned I = 0, N = S->
getNumArgs(); I != N; ++I)
1235 void StmtProfiler::VisitDependentScopeDeclRefExpr(
1249 void StmtProfiler::VisitCXXUnresolvedConstructExpr(
1255 void StmtProfiler::VisitCXXDependentScopeMemberExpr(
1290 void StmtProfiler::VisitSizeOfPackExpr(
const SizeOfPackExpr *S) {
1295 void StmtProfiler::VisitSubstNonTypeTemplateParmPackExpr(
1302 void StmtProfiler::VisitSubstNonTypeTemplateParmExpr(
1316 void StmtProfiler::VisitMaterializeTemporaryExpr(
1321 void StmtProfiler::VisitCXXFoldExpr(
const CXXFoldExpr *S) {
1330 void StmtProfiler::VisitTypoExpr(
const TypoExpr *E) {
1338 void StmtProfiler::VisitObjCBoxedExpr(
const ObjCBoxedExpr *E) {
1350 void StmtProfiler::VisitObjCEncodeExpr(
const ObjCEncodeExpr *S) {
1398 void StmtProfiler::VisitObjCIsaExpr(
const ObjCIsaExpr *S) {
1408 void StmtProfiler::VisitObjCIndirectCopyRestoreExpr(
1415 VisitExplicitCastExpr(S);
1419 void StmtProfiler::VisitDecl(
const Decl *D) {
1422 if (Canonical && D) {
1424 dyn_cast<NonTypeTemplateParmDecl>(D)) {
1425 ID.AddInteger(NTTP->getDepth());
1426 ID.AddInteger(NTTP->getIndex());
1427 ID.AddBoolean(NTTP->isParameterPack());
1428 VisitType(NTTP->getType());
1432 if (
const ParmVarDecl *Parm = dyn_cast<ParmVarDecl>(D)) {
1440 VisitType(Parm->getType());
1441 ID.AddInteger(Parm->getFunctionScopeDepth());
1442 ID.AddInteger(Parm->getFunctionScopeIndex());
1447 dyn_cast<TemplateTypeParmDecl>(D)) {
1448 ID.AddInteger(TTP->getDepth());
1449 ID.AddInteger(TTP->getIndex());
1450 ID.AddBoolean(TTP->isParameterPack());
1455 dyn_cast<TemplateTemplateParmDecl>(D)) {
1456 ID.AddInteger(TTP->getDepth());
1457 ID.AddInteger(TTP->getIndex());
1458 ID.AddBoolean(TTP->isParameterPack());
1466 void StmtProfiler::VisitType(
QualType T) {
1483 void StmtProfiler::VisitTemplateName(
TemplateName Name) {
1492 ID.AddInteger(NumArgs);
1493 for (
unsigned I = 0; I != NumArgs; ++I)
1494 VisitTemplateArgument(Args[I].getArgument());
1532 VisitTemplateArgument(
P);
1538 bool Canonical)
const {
1539 StmtProfiler Profiler(ID, Context, Canonical);
1540 Profiler.Visit(
this);
A call to an overloaded operator written using operator syntax.
Represents a single C99 designator.
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
Defines the clang::ASTContext interface.
This represents '#pragma omp master' directive.
DeclarationName getMember() const
Retrieve the name of the member that this expression refers to.
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
ParmVarDecl *const * iterator
Iterators over the parameters which the parameter pack expanded into.
The null pointer literal (C++11 [lex.nullptr])
This represents '#pragma omp task' directive.
TypeSourceInfo * getDestroyedTypeInfo() const
Retrieve the source location information for the type being destroyed.
unsigned getNumOutputs() const
llvm::iterator_range< pack_iterator > pack_elements() const
Iterator range referencing all of the elements of a template argument pack.
This represents clause 'copyin' in the '#pragma omp ...' directives.
bool hasExplicitTemplateArgs() const
Determines whether this expression had explicit template arguments.
helper_expr_const_range source_exprs() const
ArrayRef< OMPClause * > clauses()
llvm::APSInt getAsIntegral() const
Retrieve the template argument as an integral value.
Expr * getArg(unsigned Arg)
getArg - Return the specified argument.
NestedNameSpecifier * getCanonicalNestedNameSpecifier(NestedNameSpecifier *NNS) const
Retrieves the "canonical" nested name specifier for a given nested name specifier.
bool isElidable() const
Whether this construction is elidable.
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
private_copies_range private_copies()
CharacterKind getKind() const
TypeSourceInfo * getScopeTypeInfo() const
Retrieve the scope type in a qualified pseudo-destructor expression.
bool isArgumentType() const
bool isGlobalDelete() const
This represents '#pragma omp for simd' directive.
TypeSourceInfo * getTypeSourceInfo() const
NestedNameSpecifier * getQualifier() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name...
ObjCMethodDecl * getAtIndexMethodDecl() const
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.
Represents Objective-C's @throw statement.
InitListExpr * getSyntacticForm() const
Represents a call to a C++ constructor.
bool hasExplicitTemplateArgs() const
Determines whether this lookup had explicit template arguments.
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent...
This represents 'update' clause in the '#pragma omp atomic' directive.
This represents '#pragma omp parallel for' directive.
Expr * getAsExpr() const
Retrieve the template argument as an expression.
Describes the capture of a variable or of this, or of a C++1y init-capture.
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
unsigned getNumTemplateArgs() const
Expr * getAlignment()
Returns alignment.
IdentType getIdentType() const
void * getAsOpaquePtr() const
This represents 'read' clause in the '#pragma omp atomic' directive.
This represents clause 'private' in the '#pragma omp ...' directives.
This represents 'num_threads' clause in the '#pragma omp ...' directive.
Represents an empty template argument, e.g., one that has not been deduced.
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
UnaryExprOrTypeTrait getKind() const
An implicit indirection through a C++ base class, when the field found is in a base class...
This represents implicit clause 'flush' for the '#pragma omp flush' directive. This clause does not e...
const ParmVarDecl * getParam() const
unsigned getValue() const
A C++ throw-expression (C++ [except.throw]).
ParmVarDecl - Represents a parameter to a function.
Defines the clang::Expr interface and subclasses for C++ expressions.
ArrayTypeTrait getTrait() const
This represents 'safelen' clause in the '#pragma omp ...' directive.
A C++ static_cast expression (C++ [expr.static.cast]).
Represents a C99 designated initializer expression.
Expr * getNumThreads() const
Returns number of threads.
DeclarationName getMemberName() const
Retrieve the name of the member that this expression refers to.
DeclarationName getName() const
getName - Returns the embedded declaration name.
ObjCProtocolDecl * getProtocol() const
This represents '#pragma omp parallel' directive.
unsigned getNumInputs() const
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
unsigned getNumAssocs() const
This represents clause 'lastprivate' in the '#pragma omp ...' directives.
Represents a place-holder for an object not to be initialized by anything.
IdentifierInfo * getFieldName() const
For a field or identifier offsetof node, returns the name of the field.
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...
IdentifierInfo & getAccessor() const
QualType getQueriedType() const
This represents '#pragma omp barrier' directive.
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
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.
const Expr *const * const_semantics_iterator
const VarDecl * getCatchParamDecl() const
Represents Objective-C's @catch statement.
This represents clause 'copyprivate' in the '#pragma omp ...' directives.
ASTTemplateArgumentListInfo & getExplicitTemplateArgs()
Describes an C or C++ initializer list.
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...
Capturing by copy (a.k.a., by value)
bool isSuperReceiver() const
helper_expr_const_range source_exprs() const
semantics_iterator semantics_end()
static Stmt::StmtClass DecodeOperatorCall(const CXXOperatorCallExpr *S, UnaryOperatorKind &UnaryOp, BinaryOperatorKind &BinaryOp)
A builtin binary operation expression such as "x + y" or "x <= y".
Selector getSelector() const
InitializationStyle getInitializationStyle() const
The kind of initializer this new-expression has.
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies this declaration.
This represents '#pragma omp cancellation point' directive.
This represents 'default' clause in the '#pragma omp ...' directive.
QualType getTypeAsWritten() const
This represents 'final' clause in the '#pragma omp ...' directive.
This represents 'mergeable' clause in the '#pragma omp ...' directive.
This represents '#pragma omp teams' directive.
This represents clause 'reduction' in the '#pragma omp ...' directives.
FieldDecl * getField()
Get the field whose initializer will be used.
Represents binding an expression to a temporary.
StringLiteral * getClobberStringLiteral(unsigned i)
CompoundStmt * getBody() const
Retrieve the body of the lambda.
CXXTemporary * getTemporary()
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
Represents a C++ member access expression where the actual member referenced could not be resolved be...
bool isArrow() const
Determine whether this pseudo-destructor expression was written using an '->' (otherwise, it used a '.').
ObjCMethodDecl * setAtIndexMethodDecl() const
A default argument (C++ [dcl.fct.default]).
virtual Decl * getCanonicalDecl()
Retrieves the "canonical" declaration of the given declaration.
ExpressionTrait getTrait() const
NestedNameSpecifier * getQualifier() const
If the name was qualified, retrieves the nested-name-specifier that precedes the name. Otherwise, returns NULL.
Represents the this expression in C++.
MSPropertyDecl * getPropertyDecl() const
QualType getTypeAsWritten() const
Retrieve the type that is being constructed, as specified in the source code.
FunctionDecl * getOperatorDelete() const
llvm::APInt getValue() const
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the member name.
const TemplateArgumentLoc * getTemplateArgs() const
Retrieve the template arguments provided as part of this template-id.
This represents '#pragma omp taskgroup' directive.
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
unsigned getNumExpansions() const
Get the number of parameters in this parameter pack.
This represents clause 'aligned' in the '#pragma omp ...' directives.
Expr * getQueriedExpression() const
A field in a dependent type, known only by its name.
VAArgExpr, used for the builtin function __builtin_va_arg.
FunctionDecl * getOperatorDelete() const
ID
Defines the set of possible language-specific address spaces.
This represents implicit clause 'depend' for the '#pragma omp task' directive.
const ObjCMethodDecl * getMethodDecl() const
designators_iterator designators_begin()
LabelDecl * getDecl() const
This represents 'proc_bind' clause in the '#pragma omp ...' directive.
This represents 'capture' clause in the '#pragma omp atomic' directive.
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
helper_expr_const_range assignment_ops() const
Declaration of a template type parameter.
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "while" statement, if any.
unsigned NumTemplateArgs
The number of template arguments in TemplateArgs. The actual template arguments (if any) are stored a...
Expr * getCondition() const
Returns condition.
Represents a C++ functional cast expression that builds a temporary object.
A C++ const_cast expression (C++ [expr.const.cast]).
bool hasExplicitTemplateArgs() const
Determines whether this member expression actually had a C++ template argument list explicitly specif...
ObjCMethodDecl * getImplicitPropertyGetter() const
ArgKind getKind() const
Return the kind of stored template argument.
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...
Represents an expression that computes the length of a parameter pack.
Represents a C++ template name within the type system.
This represents 'ordered' clause in the '#pragma omp ...' directive.
Selector getSelector() const
NonTypeTemplateParmDecl * getParameterPack() const
Retrieve the non-type template parameter pack being substituted.
QualType getAllocatedType() const
StringRef getInputName(unsigned i) const
This represents '#pragma omp for' directive.
Represents a folding of a pack over an operator.
TemplateName getAsTemplateOrTemplatePattern() const
Retrieve the template argument as a template name; if the argument is a pack expansion, return the pattern as a template name.
An expression that sends a message to the given Objective-C object or class.
unsigned getNumComponents() const
A member reference to an MSPropertyDecl.
TemplateArgumentLoc * getTemplateArgs()
Retrieve the template arguments.
Represents a reference to a non-type template parameter that has been substituted with a template arg...
This represents '#pragma omp cancel' directive.
This represents 'collapse' clause in the '#pragma omp ...' directive.
This represents clause 'firstprivate' in the '#pragma omp ...' directives.
NestedNameSpecifier * getQualifier() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name...
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
This represents '#pragma omp flush' directive.
helper_expr_const_range destination_exprs() const
This represents '#pragma omp parallel for simd' directive.
This represents 'seq_cst' clause in the '#pragma omp atomic' directive.
This represents 'untied' clause in the '#pragma omp ...' directive.
LabelDecl * getLabel() const
unsigned getNumTemplateArgs() const
const TemplateArgumentLoc * getTemplateArgs() const
Retrieve the template arguments provided as part of this template-id.
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
const StringLiteral * getAsmString() const
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr...
This captures a statement into a function. For example, the following pragma annotated compound state...
Expr * getNumForLoops() const
Return the number of associated for-loops.
This represents '#pragma omp single' directive.
TemplateArgumentLoc const * getTemplateArgs() const
helper_expr_const_range reduction_ops() const
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.
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
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.
This represents clause 'shared' in the '#pragma omp ...' directives.
TemplateArgument getArgumentPack() const
Retrieve the template argument pack containing the substituted template arguments.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
This represents '#pragma omp taskwait' directive.
bool isImplicitAccess() const
True if this is an implicit access, i.e. one in which the member being accessed was not written in th...
NamedDecl * getPack() const
Retrieve the parameter pack.
void Profile(llvm::FoldingSetNodeID &ID)
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "switch" statement, if any.
capture_iterator explicit_capture_end() const
Retrieve an iterator pointing past the end of the sequence of explicit lambda captures.
QualType getAssocType(unsigned i) const
ParmVarDecl * getParameterPack() const
Get the parameter pack which this expression refers to.
This represents '#pragma omp target' directive.
TypeTrait getTrait() const
Determine which type trait this expression uses.
bool isTypeDependent() const
StringRef getOutputName(unsigned i) const
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '...
An expression trait intrinsic.
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
This represents '#pragma omp ordered' directive.
const BlockDecl * getBlockDecl() const
bool isParenTypeId() const
QualType getType() const
Return the type wrapped by this type source info.
ValueDecl * getAsDecl() const
Retrieve the declaration for a declaration non-type template argument.
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name...
const OffsetOfNode & getComponent(unsigned Idx) const
A qualified reference to a name whose declaration cannot yet be resolved.
Represents a C11 generic selection.
DeclarationName getDeclName() const
Retrieve the name that this expression refers to.
AddrLabelExpr - The GNU address of label extension, representing &&label.
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers...
ast_type_traits::DynTypedNode Node
Represents a reference to a function parameter pack that has been substituted but not yet expanded...
Represents a template argument.
Expr * getReplacement() const
QualType getAsType() const
Retrieve the type for a type template argument.
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "if" statement, if any.
bool isImplicitProperty() const
const Expr * getAssocExpr(unsigned i) const
helper_expr_const_range rhs_exprs() const
[C99 6.4.2.2] - A predefined identifier such as func.
Represents a delete expression for memory deallocation and destructor calls, e.g. "delete[] pArray"...
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
TemplateArgumentLoc const * getTemplateArgs() const
TemplateName getCanonicalTemplateName(TemplateName Name) const
Retrieves the "canonical" template name that refers to a given template.
This represents '#pragma omp section' directive.
designators_iterator designators_end()
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
This represents '#pragma omp simd' directive.
Kind getKind() const
Determine what kind of offsetof node this is.
const StringLiteral * getOutputConstraintLiteral(unsigned i) const
Represents a C++11 pack expansion that produces a sequence of expressions.
QualType getCaughtType() const
unsigned getNumPlacementArgs() const
StringRef getBytes() const
This represents clause 'linear' in the '#pragma omp ...' directives.
DeclarationNameInfo getDirectiveName() const
Return name of the directive.
StringKind getKind() const
bool isTypeOperand() const
bool usesGNUSyntax() const
Determines whether this designated initializer used the deprecated GNU syntax for designated initiali...
semantics_iterator semantics_begin()
unsigned getNumArgs() const
CanQualType getCanonicalType(QualType T) const
Return the canonical (structural) type corresponding to the specified potentially non-canonical type ...
This represents '#pragma omp atomic' directive.
llvm::APFloat getValue() const
FieldDecl * getField() const
For a field offsetof node, returns the field.
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
Capturing variable-length array type.
Not an overloaded operator.
void * getAsOpaquePtr() const
Expr * getSafelen() const
Return safe iteration space distance.
FunctionDecl * getOperatorNew() const
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
capture_iterator explicit_capture_begin() const
Retrieve an iterator pointing to the first explicit lambda capture.
Represents Objective-C's collection statement.
QualType getIntegralType() const
Retrieve the type of the integral value.
Represents a call to a CUDA kernel function.
CXXConstructorDecl * getConstructor() const
Represents Objective-C's @finally statement.
The template argument is a type.
QualType getSuperReceiverType() const
LabelDecl * getLabel() const
Capturing the this pointer.
This represents 'write' clause in the '#pragma omp atomic' directive.
ObjCPropertyDecl * getExplicitProperty() const
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
A use of a default initializer in a constructor or in aggregate initialization.
QualType getNullPtrType() const
Retrieve the type for null non-type template argument.
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
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
This represents 'nowait' clause in the '#pragma omp ...' directive.
QualType getEncodedType() const
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
NestedNameSpecifier * getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
helper_expr_const_range assignment_ops() const
Represents Objective-C's @try ... @catch ... @finally statement.
DeclarationName getName() const
Gets the name looked up.
Expr * getHelperChunkSize()
Get helper chunk size.
bool isIfExists() const
Determine whether this is an __if_exists statement.
static Decl::Kind getKind(const Decl *D)
Abstract class common to all of the C++ "named"/"keyword" casts.
This represents '#pragma omp sections' directive.
A reference to a declared variable, function, enum, etc. [C99 6.5.1p2].
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
Expr * getChunkSize()
Get chunk size.
BinaryOperatorKind getOperator() const
unsigned getNumClobbers() const
helper_expr_const_range destination_exprs() const
This represents '#pragma omp taskyield' directive.
A boolean literal, per ([C++ lex.bool] Boolean literals).
NestedNameSpecifier * getQualifier() const
Fetches the nested-name qualifier, if one was given.
QualType getDestroyedType() const
Retrieve the type being destroyed.
This represents '#pragma omp parallel sections' directive.
bool isNull() const
isNull - Return true if this QualType doesn't point to a type yet.
bool isTypeOperand() const
Represents Objective-C's @autoreleasepool Statement.
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '...
const CXXDestructorDecl * getDestructor() const
Represents an implicitly-generated value initialization of an object of a given type.
ObjCMethodDecl * getImplicitPropertySetter() const
helper_expr_const_range assignment_ops() const
helper_expr_const_range source_exprs() const
QualType getArgumentType() const