class HasDeclarationMatcher
Declaration
template <typename T, typename DeclMatcherT>
class HasDeclarationMatcher { /* full declaration omitted */ };
Description
Matches declarations for QualType and CallExpr. Type argument DeclMatcherT is required by PolymorphicMatcher but not actually used.
Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:990
Templates
- T
- DeclMatcherT
Member Variables
- private clang::ast_matchers::internal::DynTypedMatcher InnerMatcher
Method Overview
- public HasDeclarationMatcher<T, DeclMatcherT>(const Matcher<clang::Decl> & InnerMatcher)
- public bool matches(const T & Node, clang::ast_matchers::internal::ASTMatchFinder * Finder, clang::ast_matchers::internal::BoundNodesTreeBuilder * Builder) const
- private bool matchesDecl(const clang::Decl * Node, clang::ast_matchers::internal::ASTMatchFinder * Finder, clang::ast_matchers::internal::BoundNodesTreeBuilder * Builder) const
- private bool matchesSpecialized(const clang::QualType & Node, clang::ast_matchers::internal::ASTMatchFinder * Finder, clang::ast_matchers::internal::BoundNodesTreeBuilder * Builder) const
- private bool matchesSpecialized(const clang::Type & Node, clang::ast_matchers::internal::ASTMatchFinder * Finder, clang::ast_matchers::internal::BoundNodesTreeBuilder * Builder) const
- private bool matchesSpecialized(const clang::DeclRefExpr & Node, clang::ast_matchers::internal::ASTMatchFinder * Finder, clang::ast_matchers::internal::BoundNodesTreeBuilder * Builder) const
- private bool matchesSpecialized(const clang::CallExpr & Node, clang::ast_matchers::internal::ASTMatchFinder * Finder, clang::ast_matchers::internal::BoundNodesTreeBuilder * Builder) const
- private bool matchesSpecialized(const clang::CXXConstructExpr & Node, clang::ast_matchers::internal::ASTMatchFinder * Finder, clang::ast_matchers::internal::BoundNodesTreeBuilder * Builder) const
- private bool matchesSpecialized(const clang::ObjCIvarRefExpr & Node, clang::ast_matchers::internal::ASTMatchFinder * Finder, clang::ast_matchers::internal::BoundNodesTreeBuilder * Builder) const
- private bool matchesSpecialized(const clang::CXXNewExpr & Node, clang::ast_matchers::internal::ASTMatchFinder * Finder, clang::ast_matchers::internal::BoundNodesTreeBuilder * Builder) const
- private bool matchesSpecialized(const clang::MemberExpr & Node, clang::ast_matchers::internal::ASTMatchFinder * Finder, clang::ast_matchers::internal::BoundNodesTreeBuilder * Builder) const
- private bool matchesSpecialized(const clang::AddrLabelExpr & Node, clang::ast_matchers::internal::ASTMatchFinder * Finder, clang::ast_matchers::internal::BoundNodesTreeBuilder * Builder) const
- private bool matchesSpecialized(const clang::LabelStmt & Node, clang::ast_matchers::internal::ASTMatchFinder * Finder, clang::ast_matchers::internal::BoundNodesTreeBuilder * Builder) const
Methods
¶HasDeclarationMatcher<T, DeclMatcherT>(
const Matcher<clang::Decl>& InnerMatcher)
HasDeclarationMatcher<T, DeclMatcherT>(
const Matcher<clang::Decl>& InnerMatcher)
Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:997
Parameters
- const Matcher<clang::Decl>& InnerMatcher
¶bool matches(
const T& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
bool matches(
const T& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1000
Parameters
- const T& Node
- clang::ast_matchers::internal::ASTMatchFinder* Finder
- clang::ast_matchers::internal:: BoundNodesTreeBuilder* Builder
¶bool matchesDecl(
const clang::Decl* Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
bool matchesDecl(
const clang::Decl* Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
Description
Returns whether the inner matcher \c Node. Returns false if \c Node is \c NULL.
Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1154
Parameters
- const clang::Decl* Node
- clang::ast_matchers::internal::ASTMatchFinder* Finder
- clang::ast_matchers::internal:: BoundNodesTreeBuilder* Builder
¶bool matchesSpecialized(
const clang::QualType& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
bool matchesSpecialized(
const clang::QualType& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
Description
Forwards to matching on the underlying type of the QualType.
Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1007
Parameters
- const clang::QualType& Node
- clang::ast_matchers::internal::ASTMatchFinder* Finder
- clang::ast_matchers::internal:: BoundNodesTreeBuilder* Builder
¶bool matchesSpecialized(
const clang::Type& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
bool matchesSpecialized(
const clang::Type& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
Description
Finds the best declaration for a type and returns whether the inner matcher matches on it.
Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1017
Parameters
- const clang::Type& Node
- clang::ast_matchers::internal::ASTMatchFinder* Finder
- clang::ast_matchers::internal:: BoundNodesTreeBuilder* Builder
¶bool matchesSpecialized(
const clang::DeclRefExpr& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
bool matchesSpecialized(
const clang::DeclRefExpr& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
Description
Extracts the Decl the DeclRefExpr references and returns whether the inner matcher matches on it.
Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1095
Parameters
- const clang::DeclRefExpr& Node
- clang::ast_matchers::internal::ASTMatchFinder* Finder
- clang::ast_matchers::internal:: BoundNodesTreeBuilder* Builder
¶bool matchesSpecialized(
const clang::CallExpr& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
bool matchesSpecialized(
const clang::CallExpr& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
Description
Extracts the Decl of the callee of a CallExpr and returns whether the inner matcher matches on it.
Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1102
Parameters
- const clang::CallExpr& Node
- clang::ast_matchers::internal::ASTMatchFinder* Finder
- clang::ast_matchers::internal:: BoundNodesTreeBuilder* Builder
¶bool matchesSpecialized(
const clang::CXXConstructExpr& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
bool matchesSpecialized(
const clang::CXXConstructExpr& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
Description
Extracts the Decl of the constructor call and returns whether the inner matcher matches on it.
Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1109
Parameters
- const clang::CXXConstructExpr& Node
- clang::ast_matchers::internal::ASTMatchFinder* Finder
- clang::ast_matchers::internal:: BoundNodesTreeBuilder* Builder
¶bool matchesSpecialized(
const clang::ObjCIvarRefExpr& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
bool matchesSpecialized(
const clang::ObjCIvarRefExpr& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1115
Parameters
- const clang::ObjCIvarRefExpr& Node
- clang::ast_matchers::internal::ASTMatchFinder* Finder
- clang::ast_matchers::internal:: BoundNodesTreeBuilder* Builder
¶bool matchesSpecialized(
const clang::CXXNewExpr& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
bool matchesSpecialized(
const clang::CXXNewExpr& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
Description
Extracts the operator new of the new call and returns whether the inner matcher matches on it.
Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1123
Parameters
- const clang::CXXNewExpr& Node
- clang::ast_matchers::internal::ASTMatchFinder* Finder
- clang::ast_matchers::internal:: BoundNodesTreeBuilder* Builder
¶bool matchesSpecialized(
const clang::MemberExpr& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
bool matchesSpecialized(
const clang::MemberExpr& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
Description
Extracts the \c ValueDecl a \c MemberExpr refers to and returns whether the inner matcher matches on it.
Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1131
Parameters
- const clang::MemberExpr& Node
- clang::ast_matchers::internal::ASTMatchFinder* Finder
- clang::ast_matchers::internal:: BoundNodesTreeBuilder* Builder
¶bool matchesSpecialized(
const clang::AddrLabelExpr& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
bool matchesSpecialized(
const clang::AddrLabelExpr& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
Description
Extracts the \c LabelDecl a \c AddrLabelExpr refers to and returns whether the inner matcher matches on it.
Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1139
Parameters
- const clang::AddrLabelExpr& Node
- clang::ast_matchers::internal::ASTMatchFinder* Finder
- clang::ast_matchers::internal:: BoundNodesTreeBuilder* Builder
¶bool matchesSpecialized(
const clang::LabelStmt& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
bool matchesSpecialized(
const clang::LabelStmt& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
Description
Extracts the declaration of a LabelStmt and returns whether the inner matcher matches on it.
Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1147
Parameters
- const clang::LabelStmt& Node
- clang::ast_matchers::internal::ASTMatchFinder* Finder
- clang::ast_matchers::internal:: BoundNodesTreeBuilder* Builder