45 #ifndef LLVM_CLANG_ASTMATCHERS_ASTMATCHERS_H
46 #define LLVM_CLANG_ASTMATCHERS_ASTMATCHERS_H
54 #include "llvm/ADT/Twine.h"
55 #include "llvm/Support/Regex.h"
59 namespace ast_matchers {
76 return MyBoundNodes.getNodeAs<T>(
ID);
83 return getNodeAs<T>(
ID);
87 return getNodeAs<T>(
ID);
98 return MyBoundNodes.getMap();
103 BoundNodes(internal::BoundNodesMap &MyBoundNodes)
104 : MyBoundNodes(MyBoundNodes) {}
106 internal::BoundNodesMap MyBoundNodes;
114 template <
typename T>
115 internal::Matcher<T>
id(StringRef
ID,
117 return InnerMatcher.bind(ID);
145 inline internal::TrueMatcher
anything() {
return internal::TrueMatcher(); }
158 const internal::VariadicDynCastAllOfMatcher<Decl, TranslationUnitDecl>
169 const internal::VariadicDynCastAllOfMatcher<Decl, TypedefDecl>
typedefDecl;
210 if (ExpansionLoc.isInvalid()) {
233 std::string, RegExp) {
236 if (ExpansionLoc.isInvalid()) {
246 llvm::Regex RE(RegExp);
259 const internal::VariadicAllOfMatcher<Decl>
decl;
269 const internal::VariadicDynCastAllOfMatcher<Decl, LinkageSpecDecl>
283 const internal::VariadicDynCastAllOfMatcher<Decl, NamedDecl>
namedDecl;
294 const internal::VariadicDynCastAllOfMatcher<Decl, NamespaceDecl>
namespaceDecl;
305 const internal::VariadicDynCastAllOfMatcher<Decl, NamespaceAliasDecl>
317 const internal::VariadicDynCastAllOfMatcher<
328 const internal::VariadicDynCastAllOfMatcher<
338 const internal::VariadicDynCastAllOfMatcher<
352 const internal::VariadicDynCastAllOfMatcher<
365 const internal::VariadicDynCastAllOfMatcher<Decl, DeclaratorDecl>
376 const internal::VariadicDynCastAllOfMatcher<Decl, ParmVarDecl>
parmVarDecl;
389 const internal::VariadicDynCastAllOfMatcher<
423 const internal::VariadicDynCastAllOfMatcher<
435 const internal::VariadicDynCastAllOfMatcher<
490 return Node.isImplicit();
506 hasAnyTemplateArgument,
511 internal::getTemplateSpecializationArgs(
Node);
609 unsigned, N, internal::Matcher<TemplateArgument>,
InnerMatcher) {
611 internal::getTemplateSpecializationArgs(
Node);
612 if (List.size() <= N)
627 templateArgumentCountIs,
631 return internal::getTemplateSpecializationArgs(
Node).size() == N;
737 std::string,
Value) {
740 return Node.getAsIntegral().toString(10) ==
Value;
750 const internal::VariadicDynCastAllOfMatcher<Decl, ValueDecl>
valueDecl;
763 const internal::VariadicDynCastAllOfMatcher<
776 const internal::VariadicDynCastAllOfMatcher<
788 const internal::VariadicDynCastAllOfMatcher<Decl, EnumDecl>
enumDecl;
798 const internal::VariadicDynCastAllOfMatcher<
808 const internal::VariadicDynCastAllOfMatcher<Decl, CXXMethodDecl>
cxxMethodDecl;
816 const internal::VariadicDynCastAllOfMatcher<Decl, CXXConversionDecl>
828 const internal::VariadicDynCastAllOfMatcher<Decl, VarDecl>
varDecl;
838 const internal::VariadicDynCastAllOfMatcher<Decl, FieldDecl>
fieldDecl;
846 const internal::VariadicDynCastAllOfMatcher<Decl, FunctionDecl>
functionDecl;
854 const internal::VariadicDynCastAllOfMatcher<
866 const internal::VariadicDynCastAllOfMatcher<Decl, FriendDecl>
friendDecl;
876 const internal::VariadicAllOfMatcher<Stmt>
stmt;
886 const internal::VariadicDynCastAllOfMatcher<
901 const internal::VariadicDynCastAllOfMatcher<Stmt, MemberExpr>
memberExpr;
911 const internal::VariadicDynCastAllOfMatcher<Stmt, CallExpr>
callExpr;
919 const internal::VariadicDynCastAllOfMatcher<Stmt, LambdaExpr>
lambdaExpr;
928 const internal::VariadicDynCastAllOfMatcher<
941 const internal::VariadicDynCastAllOfMatcher<
952 const internal::VariadicDynCastAllOfMatcher<
963 const internal::VariadicDynCastAllOfMatcher<
977 const internal::VariadicDynCastAllOfMatcher<Stmt, InitListExpr>
initListExpr;
989 const internal::VariadicDynCastAllOfMatcher<
1002 const internal::VariadicDynCastAllOfMatcher<Decl, UsingDecl>
usingDecl;
1013 const internal::VariadicDynCastAllOfMatcher<
1028 const internal::VariadicDynCastAllOfMatcher<
1047 const internal::VariadicDynCastAllOfMatcher<
1061 const internal::VariadicDynCastAllOfMatcher<
1073 const internal::VariadicDynCastAllOfMatcher<
1087 const internal::VariadicDynCastAllOfMatcher<Stmt, CXXThisExpr>
cxxThisExpr;
1097 const internal::VariadicDynCastAllOfMatcher<
1119 const internal::VariadicDynCastAllOfMatcher<
1131 const internal::VariadicDynCastAllOfMatcher<Stmt, CXXNewExpr>
cxxNewExpr;
1151 const internal::VariadicDynCastAllOfMatcher<
1164 const internal::VariadicDynCastAllOfMatcher<
1182 const internal::VariadicDynCastAllOfMatcher<
1192 const internal::VariadicDynCastAllOfMatcher<Stmt, Expr>
expr;
1201 const internal::VariadicDynCastAllOfMatcher<Stmt, DeclRefExpr>
declRefExpr;
1209 const internal::VariadicDynCastAllOfMatcher<Stmt, IfStmt>
ifStmt;
1218 const internal::VariadicDynCastAllOfMatcher<Stmt, ForStmt>
forStmt;
1230 const Stmt *
const Increment =
Node.getInc();
1231 return (Increment !=
nullptr &&
1245 const Stmt *
const Init =
Node.getInit();
1256 const internal::VariadicDynCastAllOfMatcher<
1270 const VarDecl *
const Var =
Node.getLoopVariable();
1284 const Expr *
const Init =
Node.getRangeInit();
1296 const internal::VariadicDynCastAllOfMatcher<Stmt, WhileStmt>
whileStmt;
1306 const internal::VariadicDynCastAllOfMatcher<Stmt, DoStmt>
doStmt;
1316 const internal::VariadicDynCastAllOfMatcher<Stmt, BreakStmt>
breakStmt;
1326 const internal::VariadicDynCastAllOfMatcher<Stmt, ContinueStmt>
continueStmt;
1336 const internal::VariadicDynCastAllOfMatcher<Stmt, ReturnStmt>
returnStmt;
1347 const internal::VariadicDynCastAllOfMatcher<Stmt, GotoStmt>
gotoStmt;
1358 const internal::VariadicDynCastAllOfMatcher<Stmt, LabelStmt>
labelStmt;
1368 const internal::VariadicDynCastAllOfMatcher<Stmt, SwitchStmt>
switchStmt;
1378 const internal::VariadicDynCastAllOfMatcher<Stmt, SwitchCase>
switchCase;
1388 const internal::VariadicDynCastAllOfMatcher<Stmt, CaseStmt>
caseStmt;
1398 const internal::VariadicDynCastAllOfMatcher<Stmt, DefaultStmt>
defaultStmt;
1406 const internal::VariadicDynCastAllOfMatcher<Stmt, CompoundStmt>
compoundStmt;
1415 const internal::VariadicDynCastAllOfMatcher<Stmt, CXXCatchStmt>
cxxCatchStmt;
1424 const internal::VariadicDynCastAllOfMatcher<Stmt, CXXTryStmt>
cxxTryStmt;
1433 const internal::VariadicDynCastAllOfMatcher<Stmt, CXXThrowExpr>
cxxThrowExpr;
1442 const internal::VariadicDynCastAllOfMatcher<Stmt, NullStmt>
nullStmt;
1452 const internal::VariadicDynCastAllOfMatcher<Stmt, AsmStmt>
asmStmt;
1460 const internal::VariadicDynCastAllOfMatcher<
1470 const internal::VariadicDynCastAllOfMatcher<
1483 const internal::VariadicDynCastAllOfMatcher<
1491 const internal::VariadicDynCastAllOfMatcher<
1502 const internal::VariadicDynCastAllOfMatcher<
1509 const internal::VariadicDynCastAllOfMatcher<
1519 const internal::VariadicDynCastAllOfMatcher<
1524 const internal::VariadicDynCastAllOfMatcher<
1529 const internal::VariadicDynCastAllOfMatcher<
1539 const internal::VariadicDynCastAllOfMatcher<
1549 const internal::VariadicDynCastAllOfMatcher<
1559 const internal::VariadicDynCastAllOfMatcher<
1576 const internal::VariadicDynCastAllOfMatcher<
1590 const internal::VariadicDynCastAllOfMatcher<
1607 const internal::VariadicDynCastAllOfMatcher<
1623 const internal::VariadicDynCastAllOfMatcher<
1635 const internal::VariadicDynCastAllOfMatcher<
1645 const internal::VariadicDynCastAllOfMatcher<
1670 const internal::VariadicDynCastAllOfMatcher<
1678 const internal::VariadicDynCastAllOfMatcher<
1695 const internal::VariadicDynCastAllOfMatcher<Stmt, CastExpr>
castExpr;
1705 const internal::VariadicDynCastAllOfMatcher<
1715 const internal::VariadicDynCastAllOfMatcher<
1720 const internal::VariadicAllOfMatcher<QualType>
qualType;
1723 const internal::VariadicAllOfMatcher<Type>
type;
1726 const internal::VariadicAllOfMatcher<TypeLoc>
typeLoc;
1747 const internal::VariadicOperatorMatcherFunc<2, UINT_MAX>
eachOf = {
1748 internal::DynTypedMatcher::VO_EachOf
1754 const internal::VariadicOperatorMatcherFunc<2, UINT_MAX>
anyOf = {
1755 internal::DynTypedMatcher::VO_AnyOf
1761 const internal::VariadicOperatorMatcherFunc<2, UINT_MAX>
allOf = {
1762 internal::DynTypedMatcher::VO_AllOf
1774 const internal::VariadicDynCastAllOfMatcher<
1788 const QualType ArgumentType =
Node.getTypeOfArgument();
1808 const internal::Matcher<UnaryExprOrTypeTraitExpr> &
InnerMatcher) {
1816 const internal::Matcher<UnaryExprOrTypeTraitExpr> &
InnerMatcher) {
1836 inline internal::Matcher<NamedDecl>
hasName(
const std::string &
Name) {
1837 return internal::Matcher<NamedDecl>(
new internal::HasNameMatcher(Name));
1857 assert(!RegExp.empty());
1858 std::string FullNameString =
"::" +
Node.getQualifiedNameAsString();
1859 llvm::Regex RE(RegExp);
1860 return RE.match(FullNameString);
1882 inline internal::PolymorphicMatcherWithParam1<
1883 internal::HasOverloadedOperatorNameMatcher, StringRef,
1886 return internal::PolymorphicMatcherWithParam1<
1887 internal::HasOverloadedOperatorNameMatcher, StringRef,
1913 internal::Matcher<NamedDecl>,
Base) {
1919 assert(!BaseName.empty());
1926 internal::Matcher<NamedDecl>,
Base, 0) {
1927 return Matcher<CXXRecordDecl>(
anyOf(
Base, isDerivedFrom(
Base)))
1935 assert(!BaseName.empty());
1970 const internal::ArgumentAdaptingMatcherFunc<internal::HasMatcher>
1971 LLVM_ATTRIBUTE_UNUSED
has = {};
1987 const internal::ArgumentAdaptingMatcherFunc<internal::HasDescendantMatcher>
2007 const internal::ArgumentAdaptingMatcherFunc<internal::ForEachMatcher>
2036 const internal::ArgumentAdaptingMatcherFunc<internal::ForEachDescendantMatcher>
2055 template <
typename T>
2070 const internal::ArgumentAdaptingMatcherFunc<
2071 internal::HasParentMatcher,
2072 internal::TypeList<Decl, NestedNameSpecifierLoc, Stmt, TypeLoc>,
2073 internal::TypeList<Decl, NestedNameSpecifierLoc, Stmt, TypeLoc>>
2087 const internal::ArgumentAdaptingMatcherFunc<
2088 internal::HasAncestorMatcher,
2089 internal::TypeList<Decl, NestedNameSpecifierLoc, Stmt, TypeLoc>,
2090 internal::TypeList<Decl, NestedNameSpecifierLoc, Stmt, TypeLoc>>
2102 const internal::VariadicOperatorMatcherFunc<1, 1>
unless = {
2103 internal::DynTypedMatcher::VO_UnaryNot
2124 inline internal::PolymorphicMatcherWithParam1<
2125 internal::HasDeclarationMatcher, internal::Matcher<Decl>,
2126 void(internal::HasDeclarationSupportedTypes)>
2128 return internal::PolymorphicMatcherWithParam1<
2129 internal::HasDeclarationMatcher, internal::Matcher<Decl>,
2130 void(internal::HasDeclarationSupportedTypes)>(
InnerMatcher);
2145 const Expr *ExprNode =
Node.getImplicitObjectArgument()
2146 ->IgnoreParenImpCasts();
2147 return (ExprNode !=
nullptr &&
2191 assert(!RegExp.empty());
2192 std::string SelectorString =
Node.getSelector().getAsString();
2193 llvm::Regex RE(RegExp);
2194 return RE.match(SelectorString);
2202 return Node.getSelector().isNull();
2214 return Node.getSelector().isUnarySelector();
2230 return Node.getSelector().isKeywordSelector();
2245 return Node.getSelector().getNumArgs() == N;
2266 const Expr *ExprNode =
Node.getCallee();
2267 return (ExprNode !=
nullptr &&
2335 if (!
Node.getTypeSourceInfo())
2365 QualType, pointsTo, internal::Matcher<QualType>,
2367 return (!
Node.isNull() &&
Node->isAnyPointerType() &&
2393 return (!
Node.isNull() &&
Node->isReferenceType() &&
2425 const Expr *ExprNode =
Node.getImplicitObjectArgument();
2426 return (ExprNode !=
nullptr &&
2434 return onImplicitObjectArgument(
2442 return onImplicitObjectArgument(
2458 const Decl *DeclNode =
Node.getDecl();
2459 return (DeclNode !=
nullptr &&
2495 if (
Node.isSingleDecl()) {
2496 const Decl *FoundDecl =
Node.getSingleDecl();
2511 VarDecl, hasInitializer, internal::Matcher<Expr>,
2513 const Expr *Initializer =
Node.getAnyInitializer();
2514 return (Initializer !=
nullptr &&
2530 return Node.hasLocalStorage();
2544 return Node.hasGlobalStorage();
2607 return Node.isExceptionVariable();
2623 return Node.getNumArgs() == N;
2639 return (N <
Node.getNumArgs() &&
2680 const unsigned NumDecls = std::distance(
Node.decl_begin(),
Node.decl_end());
2684 std::advance(Iterator, N);
2702 return Node.getExceptionDecl() ==
nullptr;
2740 return (NodeAsDecl !=
nullptr &&
2759 const Expr* NodeAsExpr =
Node.getInit();
2760 return (NodeAsExpr !=
nullptr &&
2778 return Node.isWritten();
2798 return Node.isBaseInitializer();
2818 return Node.isMemberInitializer();
2841 for (
const Expr *Arg :
Node.arguments()) {
2853 return Node.isListInitialization();
2867 unsigned, N, internal::Matcher<ParmVarDecl>,
2869 return (N <
Node.getNumParams() &&
2902 return Node.getNumParams() == N;
2929 return Node.isExternC();
2942 return Node.isDeleted();
2987 return Node.isConstexpr();
3002 const Expr *
const Condition =
Node.getCond();
3003 return (Condition !=
nullptr &&
3015 const Stmt *
const Then =
Node.getThen();
3027 const Stmt *
const Else =
Node.getElse();
3062 internal::NotEqualsBoundNodePredicate Predicate;
3065 return Builder->removeBindings(Predicate);
3078 const DeclStmt*
const DeclarationStatement =
3079 Node.getConditionVariableDeclStmt();
3080 return DeclarationStatement !=
nullptr &&
3095 if (
const Expr* Expression =
Node.getIdx())
3112 if (
const Expr* Expression =
Node.getBase())
3133 const Stmt *
const Statement =
Node.getBody();
3134 return (Statement !=
nullptr &&
3166 return Node.size() == N;
3178 template <
typename ValueT>
3179 internal::PolymorphicMatcherWithParam1<internal::ValueEqualsMatcher, ValueT>
3181 return internal::PolymorphicMatcherWithParam1<
3182 internal::ValueEqualsMatcher,
3196 std::string,
Name) {
3210 const Expr *LeftHandSide =
Node.getLHS();
3211 return (LeftHandSide !=
nullptr &&
3225 const Expr *RightHandSide =
Node.getRHS();
3226 return (RightHandSide !=
nullptr &&
3234 return anyOf(hasLHS(InnerMatcher), hasRHS(InnerMatcher));
3246 const Expr *
const Operand =
Node.getSubExpr();
3247 return (Operand !=
nullptr &&
3261 const Expr*
const SubExpression =
Node.getSubExpr();
3262 return (SubExpression !=
nullptr &&
3294 return Node.isStruct();
3306 return Node.isUnion();
3318 return Node.isClass();
3329 const Expr *Expression =
Node.getTrueExpr();
3330 return (Expression !=
nullptr &&
3342 const Expr *Expression =
Node.getFalseExpr();
3343 return (Expression !=
nullptr &&
3363 return Node.isThisDeclarationADefinition();
3377 return Node.isVariadic();
3400 return (Parent !=
nullptr &&
3415 return Node.isVirtual();
3436 return Node.template hasAttr<FinalAttr>();
3450 return Node.isPure();
3465 return Node.isConst();
3482 return Node.isCopyAssignmentOperator();
3500 return Node.size_overridden_methods() > 0 ||
Node.hasAttr<OverrideAttr>();
3519 return Node.isArrow();
3533 return Node->isIntegerType();
3547 return Node->isAnyCharacterType();
3566 return Node.isConstQualified();
3585 return Node.isVolatileQualified();
3602 return Node.hasLocalQualifiers();
3698 Node.getTemplateSpecializationKind() ==
3761 return internal::BindableMatcher<TypeLoc>(
3774 return Node.isBooleanType();
3786 return Node.isVoidType();
3867 return Node.getSize() == N;
4222 internal::Matcher<NestedNameSpecifier>,
InnerMatcher) {
4318 if (!DC)
return false;
4338 const internal::VariadicAllOfMatcher<
4344 internal::BindableMatcher<NestedNameSpecifierLoc>, loc,
4345 internal::Matcher<NestedNameSpecifier>,
InnerMatcher, 1) {
4346 return internal::BindableMatcher<NestedNameSpecifierLoc>(
4347 new internal::LocMatcher<NestedNameSpecifierLoc, NestedNameSpecifier>(
4365 if (!
Node.getAsType())
4414 internal::Matcher<NestedNameSpecifierLoc>,
InnerMatcher,
4434 if (!
Node.getAsNamespace())
4447 return &
Node == Other;
4453 return &
Node == Other;
4459 return &
Node == Other;
4477 BoundNodesTreeBuilder
Result;
4482 bool Matched =
false;
4484 SC = SC->getNextSwitchCase()) {
4485 BoundNodesTreeBuilder CaseBuilder(*
Builder);
4489 Result.addMatch(CaseBuilder);
4508 BoundNodesTreeBuilder
Result;
4509 bool Matched =
false;
4510 for (
const auto *
I :
Node.inits()) {
4511 BoundNodesTreeBuilder InitBuilder(*
Builder);
4514 Result.addMatch(InitBuilder);
4533 return Node.isCopyConstructor();
4548 return Node.isMoveConstructor();
4563 return Node.isDefaultConstructor();
4583 return Node.isExplicit();
4604 if (
const auto *FD = dyn_cast<FunctionDecl>(&
Node))
4605 return FD->isInlineSpecified();
4606 else if (
const auto *NSD = dyn_cast<NamespaceDecl>(&
Node))
4607 return NSD->isInline();
4608 llvm_unreachable(
"Not a valid polymorphic type");
4621 return Node.isAnonymousNamespace();
4651 for (
const auto *
Attr :
Node.attrs()) {
4664 const internal::VariadicDynCastAllOfMatcher<
A call to an overloaded operator written using operator syntax.
internal::TrueMatcher anything()
Matches any node.
Defines the clang::ASTContext interface.
Represents a type that was referred to using an elaborated type keyword, e.g., struct S...
const T * getStmtAs(StringRef ID) const
The null pointer literal (C++11 [lex.nullptr])
FunctionDecl - An instance of this class is created to represent a function declaration or definition...
const internal::ArgumentAdaptingMatcherFunc< internal::HasParentMatcher, internal::TypeList< Decl, NestedNameSpecifierLoc, Stmt, TypeLoc >, internal::TypeList< Decl, NestedNameSpecifierLoc, Stmt, TypeLoc > > LLVM_ATTRIBUTE_UNUSED hasParent
Matches AST nodes that have a parent that matches the provided matcher.
const internal::VariadicDynCastAllOfMatcher< Stmt, Expr > expr
Matches expressions.
const internal::ArgumentAdaptingMatcherFunc< internal::HasAncestorMatcher, internal::TypeList< Decl, NestedNameSpecifierLoc, Stmt, TypeLoc >, internal::TypeList< Decl, NestedNameSpecifierLoc, Stmt, TypeLoc > > LLVM_ATTRIBUTE_UNUSED hasAncestor
Matches AST nodes that have an ancestor that matches the provided matcher.
const internal::VariadicDynCastAllOfMatcher< Stmt, BreakStmt > breakStmt
Matches break statements.
Smart pointer class that efficiently represents Objective-C method names.
const internal::VariadicDynCastAllOfMatcher< Stmt, DoStmt > doStmt
Matches do statements.
PointerType - C99 6.7.5.1 - Pointer Declarators.
A (possibly-)qualified type.
const internal::ArgumentAdaptingMatcherFunc< internal::HasDescendantMatcher > LLVM_ATTRIBUTE_UNUSED hasDescendant
Matches AST nodes that have descendant AST nodes that match the provided matcher. ...
static Decl * castFromDeclContext(const DeclContext *)
FunctionType - C99 6.7.5.3 - Function Declarators.
const internal::VariadicAllOfMatcher< Stmt > stmt
Matches statements.
IfStmt - This represents an if/then/else.
internal::PolymorphicMatcherWithParam1< internal::HasDeclarationMatcher, internal::Matcher< Decl >, void(internal::HasDeclarationSupportedTypes)> hasDeclaration(const internal::Matcher< Decl > &InnerMatcher)
Matches a node if the declaration associated with that node matches the given matcher.
const internal::VariadicDynCastAllOfMatcher< Decl, CXXMethodDecl > cxxMethodDecl
Matches method declarations.
EnumConstantDecl - An instance of this object exists for each enum constant that is defined...
The template argument is an expression, and we've not resolved it to one of the other forms yet...
const internal::VariadicDynCastAllOfMatcher< Decl, LinkageSpecDecl > linkageSpecDecl
Matches a declaration of a linkage specification.
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXNullPtrLiteralExpr > cxxNullPtrLiteralExpr
Matches nullptr literal.
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXDynamicCastExpr > cxxDynamicCastExpr
Matches a dynamic_cast expression.
Decl - This represents one declaration (or definition), e.g.
Defines the C++ template declaration subclasses.
Represents a C++11 auto or C++14 decltype(auto) type.
const internal::ArgumentAdaptingMatcherFunc< internal::ForEachMatcher > LLVM_ATTRIBUTE_UNUSED forEach
Matches AST nodes that have child AST nodes that match the provided matcher.
const internal::VariadicDynCastAllOfMatcher< Stmt, LabelStmt > labelStmt
Matches label statements.
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXThisExpr > cxxThisExpr
Matches implicit and explicit this expressions.
internal::Matcher< Decl > DeclarationMatcher
Types of matchers for the top-level classes in the AST class hierarchy.
TemplateSpecializationType(TemplateName T, const TemplateArgument *Args, unsigned NumArgs, QualType Canon, QualType Aliased)
The base class of the type hierarchy.
Represents an array type, per C99 6.7.5.2 - Array Declarators.
The template argument is a declaration that was provided for a pointer, reference, or pointer to member non-type template parameter.
NamespaceDecl - Represent a C++ namespace.
Represents a call to a C++ constructor.
Represents a C++ constructor within a class.
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
const internal::VariadicDynCastAllOfMatcher< Decl, UsingDecl > usingDecl
Matches using declarations.
const internal::VariadicDynCastAllOfMatcher< Decl, ValueDecl > valueDecl
Matches any value declaration.
const internal::VariadicDynCastAllOfMatcher< Decl, ClassTemplateDecl > classTemplateDecl
Matches C++ class template declarations.
const internal::VariadicDynCastAllOfMatcher< Decl, EnumConstantDecl > enumConstantDecl
Matches enum constants.
VarDecl - An instance of this class is created to represent a variable declaration or definition...
const DynTypedMatcher *const Matcher
CompoundLiteralExpr - [C99 6.5.2.5].
AST_MATCHER(Decl, isPublic)
Matches public C++ declarations.
internal::PolymorphicMatcherWithParam1< internal::ValueEqualsMatcher, ValueT > equals(const ValueT &Value)
Matches literals that are equal to the given value.
const internal::VariadicDynCastAllOfMatcher< Decl, VarDecl > varDecl
Matches variable declarations.
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
Represents the result of substituting a type for a template type parameter.
const internal::VariadicDynCastAllOfMatcher< Stmt, AsmStmt > asmStmt
Matches asm statements.
A C++ static_cast expression (C++ [expr.static.cast]).
Base wrapper for a particular "section" of type source info.
RecordDecl - Represents a struct/union/class.
const internal::VariadicDynCastAllOfMatcher< Stmt, ConditionalOperator > conditionalOperator
Matches conditional operator expressions.
const internal::VariadicDynCastAllOfMatcher< Stmt, UnaryExprOrTypeTraitExpr > unaryExprOrTypeTraitExpr
Matches sizeof (C99), alignof (C++11) and vec_step (OpenCL)
Represents a class template specialization, which refers to a class template with a given set of temp...
const internal::VariadicAllOfMatcher< QualType > qualType
Matches QualTypes in the clang AST.
const internal::VariadicDynCastAllOfMatcher< Stmt, CaseStmt > caseStmt
Matches case statements inside switch statements.
class LLVM_ALIGNAS(8) DependentTemplateSpecializationType const IdentifierInfo * Name
Represents a template specialization type whose template cannot be resolved, e.g. ...
A C++ nested-name-specifier augmented with source location information.
The template argument is an integral value stored in an llvm::APSInt that was provided for an integra...
AST_MATCHER_P(Expr, ignoringImpCasts, internal::Matcher< Expr >, InnerMatcher)
Matches expressions that match InnerMatcher after any implicit casts are stripped off...
const internal::VariadicDynCastAllOfMatcher< Stmt, GNUNullExpr > gnuNullExpr
Matches GNU __null expression.
FieldDecl - An instance of this class is created by Sema::ActOnField to represent a member of a struc...
UnaryExprOrTypeTrait
Names for the "expression or type" traits.
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
const internal::VariadicDynCastAllOfMatcher< Stmt, ObjCMessageExpr > objcMessageExpr
Matches ObjectiveC Message invocation expressions.
const internal::VariadicDynCastAllOfMatcher< Decl, CXXDestructorDecl > cxxDestructorDecl
Matches explicit C++ destructor declarations.
const internal::VariadicDynCastAllOfMatcher< Stmt, WhileStmt > whileStmt
Matches while statements.
Represents an access specifier followed by colon ':'.
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXTryStmt > cxxTryStmt
Matches try statements.
const internal::VariadicDynCastAllOfMatcher< Stmt, CompoundLiteralExpr > compoundLiteralExpr
Matches compound (i.e.
Represents a C++ using-declaration.
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXReinterpretCastExpr > cxxReinterpretCastExpr
Matches a reinterpret_cast expression.
An rvalue reference type, per C++11 [dcl.ref].
const internal::VariadicDynCastAllOfMatcher< Stmt, NullStmt > nullStmt
Matches null statements.
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXNewExpr > cxxNewExpr
Matches new expressions.
ForStmt - This represents a 'for (init;cond;inc)' stmt.
const internal::VariadicDynCastAllOfMatcher< Decl, NamedDecl > namedDecl
Matches a declaration of anything that could have a name.
const internal::VariadicDynCastAllOfMatcher< Decl, TypedefDecl > typedefDecl
Matches typedef declarations.
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXMemberCallExpr > cxxMemberCallExpr
Matches member call expressions.
const internal::VariadicOperatorMatcherFunc< 2, UINT_MAX > eachOf
Matches if any of the given matchers matches.
AST_MATCHER_FUNCTION(internal::Matcher< Decl >, isInstantiated)
Matches declarations that are template instantiations or are inside template instantiations.
const internal::VariadicDynCastAllOfMatcher< Stmt, DefaultStmt > defaultStmt
Matches default statements inside switch statements.
const internal::VariadicDynCastAllOfMatcher< Stmt, ExprWithCleanups > exprWithCleanups
Matches expressions that introduce cleanups to be run at the end of the sub-expression's evaluation...
const internal::VariadicDynCastAllOfMatcher< Stmt, CompoundStmt > compoundStmt
Matches compound statements.
TypeDecl - Represents a declaration of a type.
const internal::VariadicDynCastAllOfMatcher< Decl, ParmVarDecl > parmVarDecl
Matches parameter variable declarations.
A builtin binary operation expression such as "x + y" or "x <= y".
const IntrusiveRefCntPtr< DynMatcherInterface > InnerMatcher
const internal::VariadicDynCastAllOfMatcher< Stmt, ReturnStmt > returnStmt
Matches return statements.
CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for statement, represented as 'for (ra...
const internal::VariadicDynCastAllOfMatcher< Decl, TranslationUnitDecl > translationUnitDecl
Matches the top declaration context.
const internal::VariadicDynCastAllOfMatcher< Decl, FriendDecl > friendDecl
Matches friend declarations.
internal::Matcher< Stmt > sizeOfExpr(const internal::Matcher< UnaryExprOrTypeTraitExpr > &InnerMatcher)
Same as unaryExprOrTypeTraitExpr, but only matching sizeof.
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
const internal::VariadicDynCastAllOfMatcher< Decl, StaticAssertDecl > staticAssertDecl
Matches a C++ static_assert declaration.
Represents binding an expression to a temporary.
const internal::VariadicDynCastAllOfMatcher< Stmt, DeclStmt > declStmt
Matches declaration statements.
internal::PolymorphicMatcherWithParam1< internal::HasOverloadedOperatorNameMatcher, StringRef, AST_POLYMORPHIC_SUPPORTED_TYPES(CXXOperatorCallExpr, FunctionDecl)> hasOverloadedOperatorName(StringRef Name)
Matches overloaded operator names.
Represents an ObjC class declaration.
internal::Matcher< T > findAll(const internal::Matcher< T > &Matcher)
Matches if the node or any descendant matches.
internal::Matcher< Stmt > StatementMatcher
detail::InMemoryDirectory::const_iterator I
A default argument (C++ [dcl.fct.default]).
const internal::VariadicDynCastAllOfMatcher< Stmt, UnaryOperator > unaryOperator
Matches unary operator expressions.
const internal::VariadicDynCastAllOfMatcher< Stmt, MemberExpr > memberExpr
Matches member expressions.
const internal::VariadicDynCastAllOfMatcher< Stmt, InitListExpr > initListExpr
Matches init list expressions.
ConditionalOperator - The ?: ternary operator.
const internal::VariadicOperatorMatcherFunc< 2, UINT_MAX > allOf
Matches if all given matchers match.
CompoundStmt - This represents a group of statements like { stmt stmt }.
const FileEntry * getFileEntryForID(FileID FID) const
Returns the FileEntry record for the provided FileID.
Represents a prototype with parameter type info, e.g.
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXFunctionalCastExpr > cxxFunctionalCastExpr
Matches functional cast expressions.
FileID getFileID(SourceLocation SpellingLoc) const
Return the FileID for a SourceLocation.
Represents a ValueDecl that came out of a declarator.
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
const internal::VariadicDynCastAllOfMatcher< Stmt, ArraySubscriptExpr > arraySubscriptExpr
Matches array subscript expressions.
ID
Defines the set of possible language-specific address spaces.
internal::Matcher< NestedNameSpecifierLoc > NestedNameSpecifierLocMatcher
const internal::VariadicDynCastAllOfMatcher< Stmt, LambdaExpr > lambdaExpr
Matches lambda expressions.
const internal::VariadicDynCastAllOfMatcher< Stmt, BinaryOperator > binaryOperator
Matches binary operator expressions.
Represents an array type in C++ whose size is a value-dependent expression.
const internal::VariadicAllOfMatcher< NestedNameSpecifier > nestedNameSpecifier
Matches nested name specifiers.
const internal::ArgumentAdaptingMatcherFunc< internal::ForEachDescendantMatcher > LLVM_ATTRIBUTE_UNUSED forEachDescendant
Matches AST nodes that have descendant AST nodes that match the provided matcher. ...
ValueDecl - Represent the declaration of a variable (in which case it is an lvalue) a function (in wh...
Expr - This represents one expression.
const internal::VariadicDynCastAllOfMatcher< Stmt, IntegerLiteral > integerLiteral
Matches integer literals of all sizes / encodings, e.g.
const internal::VariadicDynCastAllOfMatcher< Stmt, ForStmt > forStmt
Matches for statements.
Declaration of a template type parameter.
const internal::VariadicOperatorMatcherFunc< 1, 1 > unless
Matches if the provided matcher does not match.
Represents a C++ functional cast expression that builds a temporary object.
A C++ const_cast expression (C++ [expr.const.cast]).
Represents a C++ destructor within a class.
const internal::VariadicAllOfMatcher< NestedNameSpecifierLoc > nestedNameSpecifierLoc
Same as nestedNameSpecifier but matches NestedNameSpecifierLoc.
const internal::VariadicDynCastAllOfMatcher< Stmt, GotoStmt > gotoStmt
Matches goto statements.
const internal::VariadicDynCastAllOfMatcher< Decl, RecordDecl > recordDecl
Matches class, struct, and union declarations.
internal::Matcher< T > id(StringRef ID, const internal::BindableMatcher< T > &InnerMatcher)
If the provided matcher matches a node, binds the node to ID.
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
bool isInSystemHeader(SourceLocation Loc) const
Returns if a SourceLocation is in a system header.
static SVal getValue(SVal val, SValBuilder &svalBuilder)
internal::BoundNodesMap::IDToNodeMap IDToNodeMap
Type of mapping from binding identifiers to bound nodes.
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXTemporaryObjectExpr > cxxTemporaryObjectExpr
Matches functional cast expressions having N != 1 arguments.
const internal::VariadicDynCastAllOfMatcher< Stmt, MaterializeTemporaryExpr > materializeTemporaryExpr
Matches nodes where temporaries are materialized.
An expression that sends a message to the given Objective-C object or class.
UnaryOperator - This represents the unary-expression's (except sizeof and alignof), the postinc/postdec operators from postfix-expression, and various extensions.
AST_TYPE_TRAVERSE_MATCHER(hasDeducedType, getDeducedType, AST_POLYMORPHIC_SUPPORTED_TYPES(AutoType))
Matches AutoType nodes where the deduced type is a specific type.
An lvalue reference type, per C++11 [dcl.ref].
Represents a reference to a non-type template parameter that has been substituted with a template arg...
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXForRangeStmt > cxxForRangeStmt
Matches range-based for statements.
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXStaticCastExpr > cxxStaticCastExpr
Matches a C++ static_cast expression.
Represents a C++ conversion function within a class.
The result type of a method or function.
This template specialization was implicitly instantiated from a template.
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.
bool isTemplateInstantiation(TemplateSpecializationKind Kind)
Determine whether this template specialization kind refers to an instantiation of an entity (as oppos...
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXDeleteExpr > cxxDeleteExpr
Matches delete expressions.
const internal::VariadicDynCastAllOfMatcher< Stmt, SwitchCase > switchCase
Matches case and default statements inside switch statements.
DoStmt - This represents a 'do/while' stmt.
AST_MATCHER_P2(DeclStmt, containsDeclaration, unsigned, N, internal::Matcher< Decl >, InnerMatcher)
Matches the n'th declaration of a declaration statement.
const internal::VariadicDynCastAllOfMatcher< Decl, ObjCInterfaceDecl > objcInterfaceDecl
Matches Objective-C interface declarations.
bool isNothrow(const ASTContext &Ctx, bool ResultIfDependent=false) const
Determine whether this function type has a non-throwing exception specification.
const internal::VariadicAllOfMatcher< TypeLoc > typeLoc
Matches TypeLocs in the clang AST.
bool isInMainFile(SourceLocation Loc) const
Returns whether the PresumedLoc for a given SourceLocation is in the main file.
Maps string IDs to AST nodes matched by parts of a matcher.
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
ASTMatchFinder *const Finder
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXBindTemporaryExpr > cxxBindTemporaryExpr
Matches nodes where temporaries are created.
friend class internal::BoundNodesTreeBuilder
const T * getDeclAs(StringRef ID) const
Deprecated.
const internal::VariadicDynCastAllOfMatcher< Decl, UnresolvedUsingValueDecl > unresolvedUsingValueDecl
Matches unresolved using value declarations.
AST_MATCHER_FUNCTION_P_OVERLOAD(internal::BindableMatcher< TypeLoc >, loc, internal::Matcher< QualType >, InnerMatcher, 0)
Matches TypeLocs for which the given inner QualType-matcher matches.
const internal::VariadicDynCastAllOfMatcher< Stmt, CharacterLiteral > characterLiteral
Matches character literals (also matches wchar_t).
const internal::VariadicDynCastAllOfMatcher< Stmt, DeclRefExpr > declRefExpr
Matches expressions that refer to declarations.
const char * getName() const
const internal::VariadicAllOfMatcher< CXXCtorInitializer > cxxCtorInitializer
Matches constructor initializers.
Sugar for parentheses used when specifying types.
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXThrowExpr > cxxThrowExpr
Matches throw expressions.
const internal::VariadicDynCastAllOfMatcher< Stmt, ImplicitCastExpr > implicitCastExpr
Matches the implicit cast nodes of Clang's AST.
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit...
const internal::ArgumentAdaptingMatcherFunc< internal::HasMatcher > LLVM_ATTRIBUTE_UNUSED has
Matches AST nodes that have child AST nodes that match the provided matcher.
TagDecl - Represents the declaration of a struct/union/class/enum.
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXOperatorCallExpr > cxxOperatorCallExpr
Matches overloaded operator calls.
Represents a call to a member function that may be written either with member call syntax (e...
DeclStmt - Adaptor class for mixing declarations with statements and expressions. ...
Represents a dependent using declaration which was not marked with typename.
Cached information about one file (either on disk or in the virtual file system). ...
const internal::VariadicDynCastAllOfMatcher< Decl, ClassTemplateSpecializationDecl > classTemplateSpecializationDecl
Matches C++ class template specializations.
AST_POLYMORPHIC_MATCHER_P(isExpansionInFileMatching, AST_POLYMORPHIC_SUPPORTED_TYPES(Decl, Stmt, TypeLoc), std::string, RegExp)
Matches AST nodes that were expanded within files whose name is partially matching a given regex...
AST_POLYMORPHIC_MATCHER_P_OVERLOAD(hasType, AST_POLYMORPHIC_SUPPORTED_TYPES(Expr, ValueDecl), internal::Matcher< QualType >, InnerMatcher, 0)
Matches if the expression's or declaration's type matches a type matcher.
Represents a static or instance method of a struct/union/class.
internal::Matcher< Stmt > alignOfExpr(const internal::Matcher< UnaryExprOrTypeTraitExpr > &InnerMatcher)
Same as unaryExprOrTypeTraitExpr, but only matching alignof.
const internal::VariadicDynCastAllOfMatcher< Decl, FunctionDecl > functionDecl
Matches function declarations.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
AST_POLYMORPHIC_MATCHER_P2(hasTemplateArgument, AST_POLYMORPHIC_SUPPORTED_TYPES(ClassTemplateSpecializationDecl, TemplateSpecializationType), unsigned, N, internal::Matcher< TemplateArgument >, InnerMatcher)
Matches classTemplateSpecializations where the n'th TemplateArgument matches the given InnerMatcher...
internal::Matcher< TypeLoc > TypeLocMatcher
const IDToNodeMap & getMap() const
Retrieve mapping from binding identifiers to bound nodes.
const internal::VariadicDynCastAllOfMatcher< Decl, CXXConstructorDecl > cxxConstructorDecl
Matches C++ constructor declarations.
const internal::VariadicDynCastAllOfMatcher< Decl, AccessSpecDecl > accessSpecDecl
Matches C++ access specifier declarations.
std::string getAsString() const
Derive the full selector name (e.g.
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
#define AST_POLYMORPHIC_SUPPORTED_TYPES(...)
Construct a type-list to be passed to the AST_POLYMORPHIC_MATCHER* macros.
This template specialization was instantiated from a template due to an explicit instantiation defini...
Represents a C++11 static_assert declaration.
const internal::VariadicDynCastAllOfMatcher< Stmt, ExplicitCastExpr > explicitCastExpr
Matches explicit cast expressions.
static DynTypedNode create(const T &Node)
Creates a DynTypedNode from Node.
const internal::VariadicDynCastAllOfMatcher< Stmt, SubstNonTypeTemplateParmExpr > substNonTypeTemplateParmExpr
Matches substitutions of non-type template parameters.
Represents a pointer type decayed from an array or function type.
The injected class name of a C++ class template or class template partial specialization.
const internal::VariadicDynCastAllOfMatcher< Stmt, StringLiteral > stringLiteral
Matches string literals (also matches wide string literals).
AST_TYPELOC_TRAVERSE_MATCHER(hasElementType, getElement, AST_POLYMORPHIC_SUPPORTED_TYPES(ArrayType, ComplexType))
Matches arrays and C99 complex types that have a specific element type.
attr::Kind getKind() const
ast_type_traits::DynTypedNode Node
Represents a template argument.
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXDefaultArgExpr > cxxDefaultArgExpr
Matches the value of a default argument at the call site.
internal::Matcher< NestedNameSpecifier > NestedNameSpecifierMatcher
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXConstCastExpr > cxxConstCastExpr
Matches a const_cast expression.
const T * getNodeAs(StringRef ID) const
Returns the AST node bound to ID.
const internal::VariadicDynCastAllOfMatcher< Decl, FunctionTemplateDecl > functionTemplateDecl
Matches C++ function template declarations.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
const internal::VariadicDynCastAllOfMatcher< Decl, EnumDecl > enumDecl
Matches enum declarations.
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
const internal::VariadicDynCastAllOfMatcher< Decl, TemplateTypeParmDecl > templateTypeParmDecl
Matches template type parameter declarations.
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
Represents a dependent using declaration which was marked with typename.
A pointer to member type per C++ 8.3.3 - Pointers to members.
ExplicitCastExpr - An explicit cast written in the source code.
const internal::VariadicDynCastAllOfMatcher< Stmt, CUDAKernelCallExpr > cudaKernelCallExpr
Matches CUDA kernel call expression.
Represents a pointer to an Objective C object.
SwitchStmt - This represents a 'switch' stmt.
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXUnresolvedConstructExpr > cxxUnresolvedConstructExpr
Matches unresolved constructor call expressions.
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
Complex values, per C99 6.2.5p11.
const internal::VariadicDynCastAllOfMatcher< Decl, UsingDirectiveDecl > usingDirectiveDecl
Matches using namespace declarations.
const internal::VariadicDynCastAllOfMatcher< Stmt, CStyleCastExpr > cStyleCastExpr
Matches a C-style cast expression.
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
const internal::VariadicDynCastAllOfMatcher< Decl, UnresolvedUsingTypenameDecl > unresolvedUsingTypenameDecl
Matches unresolved using value declarations that involve the typename.
Represents a C++ base or member initializer.
This template specialization was declared or defined by an explicit specialization (C++ [temp...
AST_MATCHER_P_OVERLOAD(CXXRecordDecl, isDerivedFrom, std::string, BaseName, 1)
Overloaded method as shortcut for isDerivedFrom(hasName(...)).
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXConstructExpr > cxxConstructExpr
Matches constructor call expressions (including implicit ones).
Represents a call to a CUDA kernel function.
const internal::VariadicDynCastAllOfMatcher< Stmt, FloatingLiteral > floatLiteral
Matches float literals of all sizes / encodings, e.g.
DeclGroupRef::const_iterator const_decl_iterator
const internal::VariadicDynCastAllOfMatcher< Stmt, IfStmt > ifStmt
Matches if statements.
Base for LValueReferenceType and RValueReferenceType.
const internal::VariadicDynCastAllOfMatcher< Stmt, CallExpr > callExpr
Matches call expressions.
The template argument is a type.
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXCatchStmt > cxxCatchStmt
Matches catch statements.
AST_POLYMORPHIC_MATCHER(isExpansionInMainFile, AST_POLYMORPHIC_SUPPORTED_TYPES(Decl, Stmt, TypeLoc))
Matches AST nodes that were expanded within the main-file.
internal::Matcher< QualType > TypeMatcher
internal::Matcher< BinaryOperator > hasEitherOperand(const internal::Matcher< Expr > &InnerMatcher)
Matches if either the left hand side or the right hand side of a binary operator matches.
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
__PTRDIFF_TYPE__ ptrdiff_t
const internal::VariadicOperatorMatcherFunc< 2, UINT_MAX > anyOf
Matches if any of the given matchers matches.
const internal::VariadicDynCastAllOfMatcher< Stmt, ContinueStmt > continueStmt
Matches continue statements.
const internal::VariadicAllOfMatcher< TemplateArgument > templateArgument
Matches template arguments.
const internal::VariadicDynCastAllOfMatcher< Stmt, CastExpr > castExpr
Matches any cast nodes of Clang's AST.
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
const internal::VariadicDynCastAllOfMatcher< Decl, NonTypeTemplateParmDecl > nonTypeTemplateParmDecl
Matches non-type template parameter declarations.
Represents a C++ struct/union/class.
BoundNodesTreeBuilder *const Builder
Represents a C array with an unspecified size.
CXXCatchStmt - This represents a C++ catch block.
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
WhileStmt - This represents a 'while' stmt.
internal::Matcher< NamedDecl > hasName(const std::string &Name)
Matches NamedDecl nodes that have the specified name.
Declaration of a class template.
This class is used for builtin types like 'int'.
StringLiteral - This represents a string literal expression, e.g.
const internal::VariadicDynCastAllOfMatcher< Decl, CXXConversionDecl > cxxConversionDecl
Matches conversion operator declarations.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
const internal::VariadicDynCastAllOfMatcher< Decl, NamespaceDecl > namespaceDecl
Matches a declaration of a namespace.
const internal::VariadicDynCastAllOfMatcher< Stmt, UserDefinedLiteral > userDefinedLiteral
Matches user defined literal operator call.
const internal::VariadicDynCastAllOfMatcher< Stmt, SwitchStmt > switchStmt
Matches switch statements.
const internal::VariadicDynCastAllOfMatcher< Stmt, CXXBoolLiteralExpr > cxxBoolLiteral
Matches bool literals.
const internal::VariadicDynCastAllOfMatcher< Decl, FieldDecl > fieldDecl
Matches field declarations.
A reference to a declared variable, function, enum, etc.
const internal::VariadicDynCastAllOfMatcher< Decl, NamespaceAliasDecl > namespaceAliasDecl
Matches a declaration of a namespace alias.
bool matches(const til::SExpr *E1, const til::SExpr *E2)
const internal::VariadicDynCastAllOfMatcher< Decl, CXXRecordDecl > cxxRecordDecl
Matches C++ class declarations.
bool isUnresolvedExceptionSpec(ExceptionSpecificationType ESpecType)
NamedDecl - This represents a decl with a name.
A boolean literal, per ([C++ lex.bool] Boolean literals).
Represents a C array with a specified size that is not an integer-constant-expression.
SourceLocation getExpansionLoc(SourceLocation Loc) const
Given a SourceLocation object Loc, return the expansion location referenced by the ID...
Automatic storage duration (most local variables).
Represents C++ using-directive.
const internal::VariadicDynCastAllOfMatcher< Decl, DeclaratorDecl > declaratorDecl
Matches declarator declarations (field, variable, function and non-type template parameter declaratio...
Represents the canonical version of C arrays with a specified constant size.
This class handles loading and caching of source files into memory.
Declaration of a template function.
Attr - This represents one attribute.
Represents a shadow declaration introduced into a scope by a (resolved) using declaration.
AST_TYPE_MATCHER(BuiltinType, builtinType)
Matches builtin Types.
static bool isExternC(const NamedDecl *ND)