clang API Documentation

Classes | Namespaces | Functions | Variables
ASTMatchers.h File Reference
#include "clang/AST/DeclFriend.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/ASTMatchers/ASTMatchersInternal.h"
#include "clang/ASTMatchers/ASTMatchersMacros.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/Regex.h"
#include <iterator>
Include dependency graph for ASTMatchers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  clang::ast_matchers::BoundNodes
 Maps string IDs to AST nodes matched by parts of a matcher. More...

Namespaces

namespace  clang
namespace  clang::ast_matchers

Typedefs

typedef internal::Matcher< Decl > clang::ast_matchers::DeclarationMatcher
 Types of matchers for the top-level classes in the AST class hierarchy.
typedef internal::Matcher< Stmt > clang::ast_matchers::StatementMatcher
typedef internal::Matcher
< QualType > 
clang::ast_matchers::TypeMatcher
typedef internal::Matcher
< TypeLoc > 
clang::ast_matchers::TypeLocMatcher
typedef internal::Matcher
< NestedNameSpecifier > 
clang::ast_matchers::NestedNameSpecifierMatcher
typedef internal::Matcher
< NestedNameSpecifierLoc > 
clang::ast_matchers::NestedNameSpecifierLocMatcher

Functions

template<typename T >
internal::Matcher< T > clang::ast_matchers::id (const std::string &ID, const internal::BindableMatcher< T > &InnerMatcher)
 If the provided matcher matches a node, binds the node to ID.
internal::TrueMatcher clang::ast_matchers::anything ()
 Matches any node.
 clang::ast_matchers::AST_MATCHER (Decl, isPublic)
 Matches public C++ declarations.
 clang::ast_matchers::AST_MATCHER (Decl, isProtected)
 Matches protected C++ declarations.
 clang::ast_matchers::AST_MATCHER (Decl, isPrivate)
 Matches private C++ declarations.
 clang::ast_matchers::AST_MATCHER (Decl, isImplicit)
 Matches a declaration that has been implicitly added by the compiler (eg. implicit default/copy constructors).
 clang::ast_matchers::AST_POLYMORPHIC_MATCHER_P (hasAnyTemplateArgument, AST_POLYMORPHIC_SUPPORTED_TYPES_2(ClassTemplateSpecializationDecl, TemplateSpecializationType), internal::Matcher< TemplateArgument >, InnerMatcher)
 Matches classTemplateSpecializations that have at least one TemplateArgument matching the given InnerMatcher.
 clang::ast_matchers::AST_MATCHER_P (Expr, ignoringImpCasts, internal::Matcher< Expr >, InnerMatcher)
 Matches expressions that match InnerMatcher after any implicit casts are stripped off.
 clang::ast_matchers::AST_MATCHER_P (Expr, ignoringParenCasts, internal::Matcher< Expr >, InnerMatcher)
 Matches expressions that match InnerMatcher after parentheses and casts are stripped off.
 clang::ast_matchers::AST_MATCHER_P (Expr, ignoringParenImpCasts, internal::Matcher< Expr >, InnerMatcher)
 Matches expressions that match InnerMatcher after implicit casts and parentheses are stripped off.
 clang::ast_matchers::AST_POLYMORPHIC_MATCHER_P2 (hasTemplateArgument, AST_POLYMORPHIC_SUPPORTED_TYPES_2(ClassTemplateSpecializationDecl, TemplateSpecializationType), unsigned, N, internal::Matcher< TemplateArgument >, InnerMatcher)
 Matches classTemplateSpecializations where the n'th TemplateArgument matches the given InnerMatcher.
 clang::ast_matchers::AST_POLYMORPHIC_MATCHER_P (templateArgumentCountIs, AST_POLYMORPHIC_SUPPORTED_TYPES_2(ClassTemplateSpecializationDecl, TemplateSpecializationType), unsigned, N)
 Matches if the number of template arguments equals N.
 clang::ast_matchers::AST_MATCHER_P (TemplateArgument, refersToType, internal::Matcher< QualType >, InnerMatcher)
 Matches a TemplateArgument that refers to a certain type.
 clang::ast_matchers::AST_MATCHER_P (TemplateArgument, refersToDeclaration, internal::Matcher< Decl >, InnerMatcher)
 Matches a canonical TemplateArgument that refers to a certain declaration.
 clang::ast_matchers::AST_MATCHER_P (TemplateArgument, isExpr, internal::Matcher< Expr >, InnerMatcher)
 Matches a sugar TemplateArgument that refers to a certain expression.
 clang::ast_matchers::AST_MATCHER (TemplateArgument, isIntegral)
 Matches a TemplateArgument that is an integral value.
 clang::ast_matchers::AST_MATCHER_P (TemplateArgument, refersToIntegralType, internal::Matcher< QualType >, InnerMatcher)
 Matches a TemplateArgument that referes to an integral type.
 clang::ast_matchers::AST_MATCHER_P (TemplateArgument, equalsIntegralValue, std::string, Value)
 Matches a TemplateArgument of integral type with a given value.
 clang::ast_matchers::AST_MATCHER_P (ForStmt, hasIncrement, internal::Matcher< Stmt >, InnerMatcher)
 Matches the increment statement of a for loop.
 clang::ast_matchers::AST_MATCHER_P (ForStmt, hasLoopInit, internal::Matcher< Stmt >, InnerMatcher)
 Matches the initialization statement of a for loop.
 clang::ast_matchers::AST_MATCHER_P (CXXForRangeStmt, hasLoopVariable, internal::Matcher< VarDecl >, InnerMatcher)
 Matches the initialization statement of a for loop.
 clang::ast_matchers::AST_MATCHER_P (CXXForRangeStmt, hasRangeInit, internal::Matcher< Expr >, InnerMatcher)
 Matches the range initialization statement of a for loop.
 clang::ast_matchers::AST_MATCHER_P (UnaryExprOrTypeTraitExpr, hasArgumentOfType, internal::Matcher< QualType >, InnerMatcher)
 Matches unary expressions that have a specific type of argument.
 clang::ast_matchers::AST_MATCHER_P (UnaryExprOrTypeTraitExpr, ofKind, UnaryExprOrTypeTrait, Kind)
 Matches unary expressions of a certain kind.
internal::Matcher< Stmt > clang::ast_matchers::alignOfExpr (const internal::Matcher< UnaryExprOrTypeTraitExpr > &InnerMatcher)
 Same as unaryExprOrTypeTraitExpr, but only matching alignof.
internal::Matcher< Stmt > clang::ast_matchers::sizeOfExpr (const internal::Matcher< UnaryExprOrTypeTraitExpr > &InnerMatcher)
 Same as unaryExprOrTypeTraitExpr, but only matching sizeof.
internal::Matcher< NamedDecl > clang::ast_matchers::hasName (const std::string &Name)
 Matches NamedDecl nodes that have the specified name.
 clang::ast_matchers::AST_MATCHER_P (NamedDecl, matchesName, std::string, RegExp)
 Matches NamedDecl nodes whose fully qualified names contain a substring matched by the given RegExp.
internal::PolymorphicMatcherWithParam1
< internal::HasOverloadedOperatorNameMatcher,
StringRef,
AST_POLYMORPHIC_SUPPORTED_TYPES_2(CXXOperatorCallExpr,
FunctionDecl)> 
clang::ast_matchers::hasOverloadedOperatorName (StringRef Name)
 Matches overloaded operator names.
 clang::ast_matchers::AST_MATCHER_P (CXXRecordDecl, isDerivedFrom, internal::Matcher< NamedDecl >, Base)
 Matches C++ classes that are directly or indirectly derived from a class matching Base.
 clang::ast_matchers::AST_MATCHER_P_OVERLOAD (CXXRecordDecl, isDerivedFrom, StringRef, BaseName, 1)
 Overloaded method as shortcut for isDerivedFrom(hasName(...)).
 clang::ast_matchers::AST_MATCHER_P_OVERLOAD (CXXRecordDecl, isSameOrDerivedFrom, internal::Matcher< NamedDecl >, Base, 0)
 Similar to isDerivedFrom(), but also matches classes that directly match Base.
 clang::ast_matchers::AST_MATCHER_P_OVERLOAD (CXXRecordDecl, isSameOrDerivedFrom, StringRef, BaseName, 1)
 Overloaded method as shortcut for isSameOrDerivedFrom(hasName(...)).
template<typename T >
internal::Matcher< T > clang::ast_matchers::findAll (const internal::Matcher< T > &Matcher)
 Matches if the node or any descendant matches.
internal::PolymorphicMatcherWithParam1
< internal::HasDeclarationMatcher,
internal::Matcher< Decl >
, void(internal::HasDeclarationSupportedTypes)> 
clang::ast_matchers::hasDeclaration (const internal::Matcher< Decl > &InnerMatcher)
 Matches a node if the declaration associated with that node matches the given matcher.
 clang::ast_matchers::AST_MATCHER_P (CXXMemberCallExpr, on, internal::Matcher< Expr >, InnerMatcher)
 Matches on the implicit object argument of a member call expression.
 clang::ast_matchers::AST_MATCHER_P (CallExpr, callee, internal::Matcher< Stmt >, InnerMatcher)
 Matches if the call expression's callee expression matches.
 clang::ast_matchers::AST_MATCHER_P_OVERLOAD (CallExpr, callee, internal::Matcher< Decl >, InnerMatcher, 1)
 Matches if the call expression's callee's declaration matches the given matcher.
 clang::ast_matchers::AST_POLYMORPHIC_MATCHER_P_OVERLOAD (hasType, AST_POLYMORPHIC_SUPPORTED_TYPES_2(Expr, ValueDecl), internal::Matcher< QualType >, InnerMatcher, 0)
 Matches if the expression's or declaration's type matches a type matcher.
 clang::ast_matchers::AST_POLYMORPHIC_MATCHER_P_OVERLOAD (hasType, AST_POLYMORPHIC_SUPPORTED_TYPES_2(Expr, ValueDecl), internal::Matcher< Decl >, InnerMatcher, 1)
 Overloaded to match the declaration of the expression's or value declaration's type.
 clang::ast_matchers::AST_MATCHER_P (DeclaratorDecl, hasTypeLoc, internal::Matcher< TypeLoc >, Inner)
 Matches if the type location of the declarator decl's type matches the inner matcher.
 clang::ast_matchers::AST_MATCHER_P (QualType, asString, std::string, Name)
 Matches if the matched type is represented by the given string.
 clang::ast_matchers::AST_MATCHER_P (QualType, pointsTo, internal::Matcher< QualType >, InnerMatcher)
 Matches if the matched type is a pointer type and the pointee type matches the specified matcher.
 clang::ast_matchers::AST_MATCHER_P_OVERLOAD (QualType, pointsTo, internal::Matcher< Decl >, InnerMatcher, 1)
 Overloaded to match the pointee type's declaration.
 clang::ast_matchers::AST_MATCHER_P (QualType, references, internal::Matcher< QualType >, InnerMatcher)
 Matches if the matched type is a reference type and the referenced type matches the specified matcher.
 clang::ast_matchers::AST_MATCHER_P (DeclRefExpr, to, internal::Matcher< Decl >, InnerMatcher)
 Matches QualTypes whose canonical type matches InnerMatcher.
 clang::ast_matchers::AST_MATCHER_P (DeclRefExpr, throughUsingDecl, internal::Matcher< UsingShadowDecl >, InnerMatcher)
 Matches a DeclRefExpr that refers to a declaration through a specific using shadow declaration.
 clang::ast_matchers::AST_MATCHER_P (DeclStmt, hasSingleDecl, internal::Matcher< Decl >, InnerMatcher)
 Matches the Decl of a DeclStmt which has a single declaration.
 clang::ast_matchers::AST_MATCHER_P (VarDecl, hasInitializer, internal::Matcher< Expr >, InnerMatcher)
 Matches a variable declaration that has an initializer expression that matches the given matcher.
 clang::ast_matchers::AST_MATCHER (VarDecl, hasLocalStorage)
 Matches a variable declaration that has function scope and is a non-static local variable.
 clang::ast_matchers::AST_MATCHER (VarDecl, hasGlobalStorage)
 Matches a variable declaration that does not have local storage.
 clang::ast_matchers::AST_POLYMORPHIC_MATCHER_P (argumentCountIs, AST_POLYMORPHIC_SUPPORTED_TYPES_2(CallExpr, CXXConstructExpr), unsigned, N)
 Checks that a call expression or a constructor call expression has a specific number of arguments (including absent default arguments).
 clang::ast_matchers::AST_POLYMORPHIC_MATCHER_P2 (hasArgument, AST_POLYMORPHIC_SUPPORTED_TYPES_2(CallExpr, CXXConstructExpr), unsigned, N, internal::Matcher< Expr >, InnerMatcher)
 Matches the n'th argument of a call expression or a constructor call expression.
 clang::ast_matchers::AST_MATCHER_P (DeclStmt, declCountIs, unsigned, N)
 Matches declaration statements that contain a specific number of declarations.
 clang::ast_matchers::AST_MATCHER_P2 (DeclStmt, containsDeclaration, unsigned, N, internal::Matcher< Decl >, InnerMatcher)
 Matches the n'th declaration of a declaration statement.
 clang::ast_matchers::AST_MATCHER_P (CXXConstructorDecl, hasAnyConstructorInitializer, internal::Matcher< CXXCtorInitializer >, InnerMatcher)
 Matches a constructor initializer.
 clang::ast_matchers::AST_MATCHER_P (CXXCtorInitializer, forField, internal::Matcher< FieldDecl >, InnerMatcher)
 Matches the field declaration of a constructor initializer.
 clang::ast_matchers::AST_MATCHER_P (CXXCtorInitializer, withInitializer, internal::Matcher< Expr >, InnerMatcher)
 Matches the initializer expression of a constructor initializer.
 clang::ast_matchers::AST_MATCHER (CXXCtorInitializer, isWritten)
 Matches a constructor initializer if it is explicitly written in code (as opposed to implicitly added by the compiler).
 clang::ast_matchers::AST_POLYMORPHIC_MATCHER_P (hasAnyArgument, AST_POLYMORPHIC_SUPPORTED_TYPES_2(CallExpr, CXXConstructExpr), internal::Matcher< Expr >, InnerMatcher)
 Matches any argument of a call expression or a constructor call expression.
 clang::ast_matchers::AST_MATCHER (CXXConstructExpr, isListInitialization)
 Matches a constructor call expression which uses list initialization.
 clang::ast_matchers::AST_MATCHER_P2 (FunctionDecl, hasParameter, unsigned, N, internal::Matcher< ParmVarDecl >, InnerMatcher)
 Matches the n'th parameter of a function declaration.
 clang::ast_matchers::AST_MATCHER_P (FunctionDecl, hasAnyParameter, internal::Matcher< ParmVarDecl >, InnerMatcher)
 Matches any parameter of a function declaration.
 clang::ast_matchers::AST_MATCHER_P (FunctionDecl, parameterCountIs, unsigned, N)
 Matches FunctionDecls that have a specific parameter count.
 clang::ast_matchers::AST_MATCHER_P (FunctionDecl, returns, internal::Matcher< QualType >, InnerMatcher)
 Matches the return type of a function declaration.
 clang::ast_matchers::AST_MATCHER (FunctionDecl, isExternC)
 Matches extern "C" function declarations.
 clang::ast_matchers::AST_MATCHER (FunctionDecl, isDeleted)
 Matches deleted function declarations.
 clang::ast_matchers::AST_POLYMORPHIC_MATCHER_P (hasCondition, AST_POLYMORPHIC_SUPPORTED_TYPES_5(IfStmt, ForStmt, WhileStmt, DoStmt, ConditionalOperator), internal::Matcher< Expr >, InnerMatcher)
 Matches the condition expression of an if statement, for loop, or conditional operator.
 clang::ast_matchers::AST_MATCHER_P (IfStmt, hasThen, internal::Matcher< Stmt >, InnerMatcher)
 Matches the then-statement of an if statement.
 clang::ast_matchers::AST_MATCHER_P (IfStmt, hasElse, internal::Matcher< Stmt >, InnerMatcher)
 Matches the else-statement of an if statement.
 clang::ast_matchers::AST_POLYMORPHIC_MATCHER_P (equalsBoundNode, AST_POLYMORPHIC_SUPPORTED_TYPES_4(Stmt, Decl, Type, QualType), std::string, ID)
 Matches if a node equals a previously bound node.
 clang::ast_matchers::AST_MATCHER_P (IfStmt, hasConditionVariableStatement, internal::Matcher< DeclStmt >, InnerMatcher)
 Matches the condition variable statement in an if statement.
 clang::ast_matchers::AST_MATCHER_P (ArraySubscriptExpr, hasIndex, internal::Matcher< Expr >, InnerMatcher)
 Matches the index expression of an array subscript expression.
 clang::ast_matchers::AST_MATCHER_P (ArraySubscriptExpr, hasBase, internal::Matcher< Expr >, InnerMatcher)
 Matches the base expression of an array subscript expression.
 clang::ast_matchers::AST_POLYMORPHIC_MATCHER_P (hasBody, AST_POLYMORPHIC_SUPPORTED_TYPES_4(DoStmt, ForStmt, WhileStmt, CXXForRangeStmt), internal::Matcher< Stmt >, InnerMatcher)
 Matches a 'for', 'while', or 'do while' statement that has a given body.
 clang::ast_matchers::AST_MATCHER_P (CompoundStmt, hasAnySubstatement, internal::Matcher< Stmt >, InnerMatcher)
 Matches compound statements where at least one substatement matches a given matcher.
 clang::ast_matchers::AST_MATCHER_P (CompoundStmt, statementCountIs, unsigned, N)
 Checks that a compound statement contains a specific number of child statements.
template<typename ValueT >
internal::PolymorphicMatcherWithParam1
< internal::ValueEqualsMatcher,
ValueT > 
clang::ast_matchers::equals (const ValueT &Value)
 Matches literals that are equal to the given value.
 clang::ast_matchers::AST_POLYMORPHIC_MATCHER_P (hasOperatorName, AST_POLYMORPHIC_SUPPORTED_TYPES_2(BinaryOperator, UnaryOperator), std::string, Name)
 Matches the operator Name of operator expressions (binary or unary).
 clang::ast_matchers::AST_MATCHER_P (BinaryOperator, hasLHS, internal::Matcher< Expr >, InnerMatcher)
 Matches the left hand side of binary operator expressions.
 clang::ast_matchers::AST_MATCHER_P (BinaryOperator, hasRHS, internal::Matcher< Expr >, InnerMatcher)
 Matches the right hand side of binary operator expressions.
internal::Matcher< BinaryOperator > clang::ast_matchers::hasEitherOperand (const internal::Matcher< Expr > &InnerMatcher)
 Matches if either the left hand side or the right hand side of a binary operator matches.
 clang::ast_matchers::AST_MATCHER_P (UnaryOperator, hasUnaryOperand, internal::Matcher< Expr >, InnerMatcher)
 Matches if the operand of a unary operator matches.
 clang::ast_matchers::AST_MATCHER_P (ConditionalOperator, hasTrueExpression, internal::Matcher< Expr >, InnerMatcher)
 Matches if the cast's source expression matches the given matcher.
 clang::ast_matchers::AST_MATCHER_P (ConditionalOperator, hasFalseExpression, internal::Matcher< Expr >, InnerMatcher)
 Matches the false branch expression of a conditional operator.
 clang::ast_matchers::AST_POLYMORPHIC_MATCHER (isDefinition, AST_POLYMORPHIC_SUPPORTED_TYPES_3(TagDecl, VarDecl, FunctionDecl))
 Matches if a declaration has a body attached.
 clang::ast_matchers::AST_MATCHER_P (CXXMethodDecl, ofClass, internal::Matcher< CXXRecordDecl >, InnerMatcher)
 Matches the class declaration that the given method declaration belongs to.
 clang::ast_matchers::AST_MATCHER (CXXMethodDecl, isVirtual)
 Matches if the given method declaration is virtual.
 clang::ast_matchers::AST_MATCHER (CXXMethodDecl, isPure)
 Matches if the given method declaration is pure.
 clang::ast_matchers::AST_MATCHER (CXXMethodDecl, isConst)
 Matches if the given method declaration is const.
 clang::ast_matchers::AST_MATCHER (CXXMethodDecl, isOverride)
 Matches if the given method declaration overrides another method.
 clang::ast_matchers::AST_MATCHER (MemberExpr, isArrow)
 Matches member expressions that are called with '->' as opposed to '.'.
 clang::ast_matchers::AST_MATCHER (QualType, isInteger)
 Matches QualType nodes that are of integer type.
 clang::ast_matchers::AST_MATCHER (QualType, isConstQualified)
 Matches QualType nodes that are const-qualified, i.e., that include "top-level" const.
 clang::ast_matchers::AST_MATCHER (QualType, hasLocalQualifiers)
 Matches QualType nodes that have local CV-qualifiers attached to the node, not hidden within a typedef.
 clang::ast_matchers::AST_MATCHER_P (MemberExpr, member, internal::Matcher< ValueDecl >, InnerMatcher)
 Matches a member expression where the member is matched by a given matcher.
 clang::ast_matchers::AST_MATCHER_P (MemberExpr, hasObjectExpression, internal::Matcher< Expr >, InnerMatcher)
 Matches a member expression where the object expression is matched by a given matcher.
 clang::ast_matchers::AST_MATCHER_P (UsingDecl, hasAnyUsingShadowDecl, internal::Matcher< UsingShadowDecl >, InnerMatcher)
 Matches any using shadow declaration.
 clang::ast_matchers::AST_MATCHER_P (UsingShadowDecl, hasTargetDecl, internal::Matcher< NamedDecl >, InnerMatcher)
 Matches a using shadow declaration where the target declaration is matched by the given matcher.
 clang::ast_matchers::AST_POLYMORPHIC_MATCHER (isTemplateInstantiation, AST_POLYMORPHIC_SUPPORTED_TYPES_3(FunctionDecl, VarDecl, CXXRecordDecl))
 Matches template instantiations of function, class, or static member variable template instantiations.
 clang::ast_matchers::AST_MATCHER (Decl, isInstantiated)
 Matches declarations that are template instantiations or are inside template instantiations.
 clang::ast_matchers::AST_MATCHER (Stmt, isInTemplateInstantiation)
 Matches statements inside of a template instantiation.
 clang::ast_matchers::AST_POLYMORPHIC_MATCHER (isExplicitTemplateSpecialization, AST_POLYMORPHIC_SUPPORTED_TYPES_3(FunctionDecl, VarDecl, CXXRecordDecl))
 Matches explicit template specializations of function, class, or static member variable template instantiations.
 clang::ast_matchers::AST_MATCHER_FUNCTION_P_OVERLOAD (internal::BindableMatcher< TypeLoc >, loc, internal::Matcher< QualType >, InnerMatcher, 0)
 Matches TypeLocs for which the given inner QualType-matcher matches.
 clang::ast_matchers::AST_TYPE_MATCHER (BuiltinType, builtinType)
 Matches builtin Types.
 clang::ast_matchers::AST_TYPE_MATCHER (ArrayType, arrayType)
 Matches all kinds of arrays.
 clang::ast_matchers::AST_TYPE_MATCHER (ComplexType, complexType)
 Matches C99 complex types.
 clang::ast_matchers::AST_TYPELOC_TRAVERSE_MATCHER (hasElementType, getElement, AST_POLYMORPHIC_SUPPORTED_TYPES_2(ArrayType, ComplexType))
 Matches arrays and C99 complex types that have a specific element type.
 clang::ast_matchers::AST_TYPE_MATCHER (ConstantArrayType, constantArrayType)
 Matches C arrays with a specified constant size.
 clang::ast_matchers::AST_MATCHER_P (ConstantArrayType, hasSize, unsigned, N)
 Matches ConstantArrayType nodes that have the specified size.
 clang::ast_matchers::AST_TYPE_MATCHER (DependentSizedArrayType, dependentSizedArrayType)
 Matches C++ arrays whose size is a value-dependent expression.
 clang::ast_matchers::AST_TYPE_MATCHER (IncompleteArrayType, incompleteArrayType)
 Matches C arrays with unspecified size.
 clang::ast_matchers::AST_TYPE_MATCHER (VariableArrayType, variableArrayType)
 Matches C arrays with a specified size that is not an integer-constant-expression.
 clang::ast_matchers::AST_MATCHER_P (VariableArrayType, hasSizeExpr, internal::Matcher< Expr >, InnerMatcher)
 Matches VariableArrayType nodes that have a specific size expression.
 clang::ast_matchers::AST_TYPE_MATCHER (AtomicType, atomicType)
 Matches atomic types.
 clang::ast_matchers::AST_TYPELOC_TRAVERSE_MATCHER (hasValueType, getValue, AST_POLYMORPHIC_SUPPORTED_TYPES_1(AtomicType))
 Matches atomic types with a specific value type.
 clang::ast_matchers::AST_TYPE_MATCHER (AutoType, autoType)
 Matches types nodes representing C++11 auto types.
 clang::ast_matchers::AST_TYPE_TRAVERSE_MATCHER (hasDeducedType, getDeducedType, AST_POLYMORPHIC_SUPPORTED_TYPES_1(AutoType))
 Matches AutoType nodes where the deduced type is a specific type.
 clang::ast_matchers::AST_TYPE_MATCHER (FunctionType, functionType)
 Matches FunctionType nodes.
 clang::ast_matchers::AST_TYPE_MATCHER (ParenType, parenType)
 Matches ParenType nodes.
 clang::ast_matchers::AST_TYPE_TRAVERSE_MATCHER (innerType, getInnerType, AST_POLYMORPHIC_SUPPORTED_TYPES_1(ParenType))
 Matches ParenType nodes where the inner type is a specific type.
 clang::ast_matchers::AST_TYPE_MATCHER (BlockPointerType, blockPointerType)
 Matches block pointer types, i.e. types syntactically represented as "void (^)(int)".
 clang::ast_matchers::AST_TYPE_MATCHER (MemberPointerType, memberPointerType)
 Matches member pointer types. Given.
 clang::ast_matchers::AST_TYPE_MATCHER (PointerType, pointerType)
 Matches pointer types.
 clang::ast_matchers::AST_TYPE_MATCHER (ReferenceType, referenceType)
 Matches both lvalue and rvalue reference types.
 clang::ast_matchers::AST_TYPE_MATCHER (LValueReferenceType, lValueReferenceType)
 Matches lvalue reference types.
 clang::ast_matchers::AST_TYPE_MATCHER (RValueReferenceType, rValueReferenceType)
 Matches rvalue reference types.
 clang::ast_matchers::AST_TYPELOC_TRAVERSE_MATCHER (pointee, getPointee, AST_POLYMORPHIC_SUPPORTED_TYPES_4(BlockPointerType, MemberPointerType, PointerType, ReferenceType))
 Narrows PointerType (and similar) matchers to those where the pointee matches a given matcher.
 clang::ast_matchers::AST_TYPE_MATCHER (TypedefType, typedefType)
 Matches typedef types.
 clang::ast_matchers::AST_TYPE_MATCHER (UnaryTransformType, unaryTransformType)
 Matches template specialization types.
 clang::ast_matchers::AST_MATCHER_FUNCTION_P_OVERLOAD (internal::BindableMatcher< NestedNameSpecifierLoc >, loc, internal::Matcher< NestedNameSpecifier >, InnerMatcher, 1)
 Matches NestedNameSpecifierLocs for which the given inner NestedNameSpecifier-matcher matches.
 clang::ast_matchers::AST_MATCHER_P (NestedNameSpecifier, specifiesType, internal::Matcher< QualType >, InnerMatcher)
 Matches nested name specifiers that specify a type matching the given QualType matcher without qualifiers.
 clang::ast_matchers::AST_MATCHER_P (NestedNameSpecifierLoc, specifiesTypeLoc, internal::Matcher< TypeLoc >, InnerMatcher)
 Matches nested name specifier locs that specify a type matching the given TypeLoc.
 clang::ast_matchers::AST_MATCHER_P_OVERLOAD (NestedNameSpecifier, hasPrefix, internal::Matcher< NestedNameSpecifier >, InnerMatcher, 0)
 Matches on the prefix of a NestedNameSpecifier.
 clang::ast_matchers::AST_MATCHER_P_OVERLOAD (NestedNameSpecifierLoc, hasPrefix, internal::Matcher< NestedNameSpecifierLoc >, InnerMatcher, 1)
 Matches on the prefix of a NestedNameSpecifierLoc.
 clang::ast_matchers::AST_MATCHER_P (NestedNameSpecifier, specifiesNamespace, internal::Matcher< NamespaceDecl >, InnerMatcher)
 Matches nested name specifiers that specify a namespace matching the given namespace matcher.
 clang::ast_matchers::AST_MATCHER_P (SwitchStmt, forEachSwitchCase, internal::Matcher< SwitchCase >, InnerMatcher)
 Matches each case or default statement belonging to the given switch statement. This matcher may produce multiple matches.
 clang::ast_matchers::AST_MATCHER_P (CXXConstructorDecl, forEachConstructorInitializer, internal::Matcher< CXXCtorInitializer >, InnerMatcher)
 Matches each constructor initializer in a constructor definition.
 clang::ast_matchers::AST_MATCHER_P (CaseStmt, hasCaseConstant, internal::Matcher< Expr >, InnerMatcher)
 If the given case statement does not use the GNU case range extension, matches the constant given in the statement.
 clang::ast_matchers::AST_MATCHER_P (Decl, hasAttr, attr::Kind, AttrKind)
 Matches declaration that has a given attribute.
 clang::ast_matchers::AST_MATCHER_P_OVERLOAD (Decl, equalsNode, const Decl *, Other, 0)
 Overloads for the equalsNode matcher. FIXME: Implement for other node types.
 clang::ast_matchers::AST_MATCHER_P_OVERLOAD (Stmt, equalsNode, const Stmt *, Other, 1)
 Matches if a node equals another node.

Variables

const
internal::VariadicAllOfMatcher
< Decl > 
clang::ast_matchers::decl
 Matches declarations.
const
internal::VariadicDynCastAllOfMatcher
< Decl, LinkageSpecDecl > 
clang::ast_matchers::linkageSpecDecl
 Matches a declaration of a linkage specification.
const
internal::VariadicDynCastAllOfMatcher
< Decl, NamedDecl > 
clang::ast_matchers::namedDecl
 Matches a declaration of anything that could have a name.
const
internal::VariadicDynCastAllOfMatcher
< Decl, NamespaceDecl > 
clang::ast_matchers::namespaceDecl
 Matches a declaration of a namespace.
const
internal::VariadicDynCastAllOfMatcher
< Decl, CXXRecordDecl > 
clang::ast_matchers::recordDecl
 Matches C++ class declarations.
const
internal::VariadicDynCastAllOfMatcher
< Decl, ClassTemplateDecl > 
clang::ast_matchers::classTemplateDecl
 Matches C++ class template declarations.
const
internal::VariadicDynCastAllOfMatcher
< Decl,
ClassTemplateSpecializationDecl > 
clang::ast_matchers::classTemplateSpecializationDecl
 Matches C++ class template specializations.
const
internal::VariadicDynCastAllOfMatcher
< Decl, DeclaratorDecl > 
clang::ast_matchers::declaratorDecl
 Matches declarator declarations (field, variable, function and non-type template parameter declarations).
const
internal::VariadicDynCastAllOfMatcher
< Decl, ParmVarDecl > 
clang::ast_matchers::parmVarDecl
 Matches parameter variable declarations.
const
internal::VariadicDynCastAllOfMatcher
< Decl, AccessSpecDecl > 
clang::ast_matchers::accessSpecDecl
 Matches C++ access specifier declarations.
const
internal::VariadicAllOfMatcher
< CXXCtorInitializer > 
clang::ast_matchers::ctorInitializer
 Matches constructor initializers.
const
internal::VariadicAllOfMatcher
< TemplateArgument > 
clang::ast_matchers::templateArgument
 Matches template arguments.
const
internal::VariadicDynCastAllOfMatcher
< Decl, ValueDecl > 
clang::ast_matchers::valueDecl
 Matches any value declaration.
const
internal::VariadicDynCastAllOfMatcher
< Decl, CXXConstructorDecl > 
clang::ast_matchers::constructorDecl
 Matches C++ constructor declarations.
const
internal::VariadicDynCastAllOfMatcher
< Decl, CXXDestructorDecl > 
clang::ast_matchers::destructorDecl
 Matches explicit C++ destructor declarations.
const
internal::VariadicDynCastAllOfMatcher
< Decl, EnumDecl > 
clang::ast_matchers::enumDecl
 Matches enum declarations.
const
internal::VariadicDynCastAllOfMatcher
< Decl, EnumConstantDecl > 
clang::ast_matchers::enumConstantDecl
 Matches enum constants.
const
internal::VariadicDynCastAllOfMatcher
< Decl, CXXMethodDecl > 
clang::ast_matchers::methodDecl
 Matches method declarations.
const
internal::VariadicDynCastAllOfMatcher
< Decl, VarDecl > 
clang::ast_matchers::varDecl
 Matches variable declarations.
const
internal::VariadicDynCastAllOfMatcher
< Decl, FieldDecl > 
clang::ast_matchers::fieldDecl
 Matches field declarations.
const
internal::VariadicDynCastAllOfMatcher
< Decl, FunctionDecl > 
clang::ast_matchers::functionDecl
 Matches function declarations.
const
internal::VariadicDynCastAllOfMatcher
< Decl, FunctionTemplateDecl > 
clang::ast_matchers::functionTemplateDecl
 Matches C++ function template declarations.
const
internal::VariadicDynCastAllOfMatcher
< Decl, FriendDecl > 
clang::ast_matchers::friendDecl
 Matches friend declarations.
const
internal::VariadicAllOfMatcher
< Stmt > 
clang::ast_matchers::stmt
 Matches statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, DeclStmt > 
clang::ast_matchers::declStmt
 Matches declaration statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, MemberExpr > 
clang::ast_matchers::memberExpr
 Matches member expressions.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CallExpr > 
clang::ast_matchers::callExpr
 Matches call expressions.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, LambdaExpr > 
clang::ast_matchers::lambdaExpr
 Matches lambda expressions.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXMemberCallExpr > 
clang::ast_matchers::memberCallExpr
 Matches member call expressions.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, ExprWithCleanups > 
clang::ast_matchers::exprWithCleanups
 Matches expressions that introduce cleanups to be run at the end of the sub-expression's evaluation.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, InitListExpr > 
clang::ast_matchers::initListExpr
 Matches init list expressions.
const
internal::VariadicDynCastAllOfMatcher
< Stmt,
SubstNonTypeTemplateParmExpr > 
clang::ast_matchers::substNonTypeTemplateParmExpr
 Matches substitutions of non-type template parameters.
const
internal::VariadicDynCastAllOfMatcher
< Decl, UsingDecl > 
clang::ast_matchers::usingDecl
 Matches using declarations.
const
internal::VariadicDynCastAllOfMatcher
< Decl, UsingDirectiveDecl > 
clang::ast_matchers::usingDirectiveDecl
 Matches using namespace declarations.
const
internal::VariadicDynCastAllOfMatcher
< Decl,
UnresolvedUsingValueDecl > 
clang::ast_matchers::unresolvedUsingValueDecl
 Matches unresolved using value declarations.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXConstructExpr > 
clang::ast_matchers::constructExpr
 Matches constructor call expressions (including implicit ones).
const
internal::VariadicDynCastAllOfMatcher
< Stmt,
CXXUnresolvedConstructExpr > 
clang::ast_matchers::unresolvedConstructExpr
 Matches unresolved constructor call expressions.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXThisExpr > 
clang::ast_matchers::thisExpr
 Matches implicit and explicit this expressions.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXBindTemporaryExpr > 
clang::ast_matchers::bindTemporaryExpr
 Matches nodes where temporaries are created.
const
internal::VariadicDynCastAllOfMatcher
< Stmt,
MaterializeTemporaryExpr > 
clang::ast_matchers::materializeTemporaryExpr
 Matches nodes where temporaries are materialized.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXNewExpr > 
clang::ast_matchers::newExpr
 Matches new expressions.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXDeleteExpr > 
clang::ast_matchers::deleteExpr
 Matches delete expressions.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, ArraySubscriptExpr > 
clang::ast_matchers::arraySubscriptExpr
 Matches array subscript expressions.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXDefaultArgExpr > 
clang::ast_matchers::defaultArgExpr
 Matches the value of a default argument at the call site.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXOperatorCallExpr > 
clang::ast_matchers::operatorCallExpr
 Matches overloaded operator calls.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, Expr > 
clang::ast_matchers::expr
 Matches expressions.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, DeclRefExpr > 
clang::ast_matchers::declRefExpr
 Matches expressions that refer to declarations.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, IfStmt > 
clang::ast_matchers::ifStmt
 Matches if statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, ForStmt > 
clang::ast_matchers::forStmt
 Matches for statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXForRangeStmt > 
clang::ast_matchers::forRangeStmt
 Matches range-based for statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, WhileStmt > 
clang::ast_matchers::whileStmt
 Matches while statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, DoStmt > 
clang::ast_matchers::doStmt
 Matches do statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, BreakStmt > 
clang::ast_matchers::breakStmt
 Matches break statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, ContinueStmt > 
clang::ast_matchers::continueStmt
 Matches continue statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, ReturnStmt > 
clang::ast_matchers::returnStmt
 Matches return statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, GotoStmt > 
clang::ast_matchers::gotoStmt
 Matches goto statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, LabelStmt > 
clang::ast_matchers::labelStmt
 Matches label statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, SwitchStmt > 
clang::ast_matchers::switchStmt
 Matches switch statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, SwitchCase > 
clang::ast_matchers::switchCase
 Matches case and default statements inside switch statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CaseStmt > 
clang::ast_matchers::caseStmt
 Matches case statements inside switch statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, DefaultStmt > 
clang::ast_matchers::defaultStmt
 Matches default statements inside switch statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CompoundStmt > 
clang::ast_matchers::compoundStmt
 Matches compound statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXCatchStmt > 
clang::ast_matchers::catchStmt
 Matches catch statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXTryStmt > 
clang::ast_matchers::tryStmt
 Matches try statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXThrowExpr > 
clang::ast_matchers::throwExpr
 Matches throw expressions.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, NullStmt > 
clang::ast_matchers::nullStmt
 Matches null statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, AsmStmt > 
clang::ast_matchers::asmStmt
 Matches asm statements.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXBoolLiteralExpr > 
clang::ast_matchers::boolLiteral
 Matches bool literals.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, StringLiteral > 
clang::ast_matchers::stringLiteral
 Matches string literals (also matches wide string literals).
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CharacterLiteral > 
clang::ast_matchers::characterLiteral
 Matches character literals (also matches wchar_t).
const
internal::VariadicDynCastAllOfMatcher
< Stmt, IntegerLiteral > 
clang::ast_matchers::integerLiteral
 Matches integer literals of all sizes / encodings, e.g. 1, 1L, 0x1 and 1U.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, FloatingLiteral > 
clang::ast_matchers::floatLiteral
 Matches float literals of all sizes / encodings, e.g. 1.0, 1.0f, 1.0L and 1e10.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, UserDefinedLiteral > 
clang::ast_matchers::userDefinedLiteral
 Matches user defined literal operator call.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CompoundLiteralExpr > 
clang::ast_matchers::compoundLiteralExpr
 Matches compound (i.e. non-scalar) literals.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXNullPtrLiteralExpr > 
clang::ast_matchers::nullPtrLiteralExpr
 Matches nullptr literal.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, BinaryOperator > 
clang::ast_matchers::binaryOperator
 Matches binary operator expressions.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, UnaryOperator > 
clang::ast_matchers::unaryOperator
 Matches unary operator expressions.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, ConditionalOperator > 
clang::ast_matchers::conditionalOperator
 Matches conditional operator expressions.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXReinterpretCastExpr > 
clang::ast_matchers::reinterpretCastExpr
 Matches a reinterpret_cast expression.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXStaticCastExpr > 
clang::ast_matchers::staticCastExpr
 Matches a C++ static_cast expression.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXDynamicCastExpr > 
clang::ast_matchers::dynamicCastExpr
 Matches a dynamic_cast expression.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXConstCastExpr > 
clang::ast_matchers::constCastExpr
 Matches a const_cast expression.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CStyleCastExpr > 
clang::ast_matchers::cStyleCastExpr
 Matches a C-style cast expression.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, ExplicitCastExpr > 
clang::ast_matchers::explicitCastExpr
 Matches explicit cast expressions.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, ImplicitCastExpr > 
clang::ast_matchers::implicitCastExpr
 Matches the implicit cast nodes of Clang's AST.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CastExpr > 
clang::ast_matchers::castExpr
 Matches any cast nodes of Clang's AST.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXFunctionalCastExpr > 
clang::ast_matchers::functionalCastExpr
 Matches functional cast expressions.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CXXTemporaryObjectExpr > 
clang::ast_matchers::temporaryObjectExpr
 Matches functional cast expressions having N != 1 arguments.
const
internal::VariadicAllOfMatcher
< QualType > 
clang::ast_matchers::qualType
 Matches QualTypes in the clang AST.
const
internal::VariadicAllOfMatcher
< Type > 
clang::ast_matchers::type
 Matches Types in the clang AST.
const
internal::VariadicAllOfMatcher
< TypeLoc > 
clang::ast_matchers::typeLoc
 Matches TypeLocs in the clang AST.
const
internal::VariadicOperatorMatcherFunc
< 2, UINT_MAX
clang::ast_matchers::eachOf
 Matches if any of the given matchers matches.
const
internal::VariadicOperatorMatcherFunc
< 2, UINT_MAX
clang::ast_matchers::anyOf
 Matches if any of the given matchers matches.
const
internal::VariadicOperatorMatcherFunc
< 2, UINT_MAX
clang::ast_matchers::allOf
 Matches if all given matchers match.
const
internal::VariadicDynCastAllOfMatcher
< Stmt,
UnaryExprOrTypeTraitExpr > 
clang::ast_matchers::unaryExprOrTypeTraitExpr
 Matches sizeof (C99), alignof (C++11) and vec_step (OpenCL)
const
internal::ArgumentAdaptingMatcherFunc
< internal::HasMatcher >
LLVM_ATTRIBUTE_UNUSED 
clang::ast_matchers::has = {}
 Matches the first method of a class or struct that satisfies InnerMatcher.
const
internal::ArgumentAdaptingMatcherFunc
< internal::HasDescendantMatcher >
LLVM_ATTRIBUTE_UNUSED 
clang::ast_matchers::hasDescendant = {}
 Matches AST nodes that have descendant AST nodes that match the provided matcher.
const
internal::ArgumentAdaptingMatcherFunc
< internal::ForEachMatcher >
LLVM_ATTRIBUTE_UNUSED 
clang::ast_matchers::forEach = {}
 Matches AST nodes that have child AST nodes that match the provided matcher.
const
internal::ArgumentAdaptingMatcherFunc
< internal::ForEachDescendantMatcher >
LLVM_ATTRIBUTE_UNUSED 
clang::ast_matchers::forEachDescendant = {}
 Matches AST nodes that have descendant AST nodes that match the provided matcher.
const
internal::ArgumentAdaptingMatcherFunc
< internal::HasParentMatcher,
internal::TypeList< Decl, Stmt >
, internal::TypeList< Decl,
Stmt > > LLVM_ATTRIBUTE_UNUSED 
clang::ast_matchers::hasParent = {}
 Matches AST nodes that have a parent that matches the provided matcher.
const
internal::ArgumentAdaptingMatcherFunc
< internal::HasAncestorMatcher,
internal::TypeList< Decl, Stmt >
, internal::TypeList< Decl,
Stmt > > LLVM_ATTRIBUTE_UNUSED 
clang::ast_matchers::hasAncestor = {}
 Matches AST nodes that have an ancestor that matches the provided matcher.
const
internal::VariadicOperatorMatcherFunc< 1, 1 > 
clang::ast_matchers::unless
 Matches if the provided matcher does not match.
const
internal::VariadicAllOfMatcher
< NestedNameSpecifier > 
clang::ast_matchers::nestedNameSpecifier
 Matches record types (e.g. structs, classes).
const
internal::VariadicAllOfMatcher
< NestedNameSpecifierLoc > 
clang::ast_matchers::nestedNameSpecifierLoc
 Same as nestedNameSpecifier but matches NestedNameSpecifierLoc.
const
internal::VariadicDynCastAllOfMatcher
< Stmt, CUDAKernelCallExpr > 
clang::ast_matchers::CUDAKernelCallExpr
 Matches CUDA kernel call expression.