clang-tools 22.0.0git
clang::query::MatchQuery Struct Reference

Query for "match MATCHER". More...

#include <Query.h>

Inheritance diagram for clang::query::MatchQuery:
[legend]

Public Member Functions

 MatchQuery (StringRef Source, const ast_matchers::dynamic::DynTypedMatcher &Matcher)
bool run (llvm::raw_ostream &OS, QuerySession &QS) const override
 Perform the query on QS and print output to OS.
Public Member Functions inherited from clang::query::Query
 Query (QueryKind Kind)
virtual ~Query ()

Static Public Member Functions

static bool classof (const Query *Q)

Public Attributes

ast_matchers::dynamic::DynTypedMatcher Matcher
StringRef Source
Public Attributes inherited from clang::query::Query
StringRef RemainingContent
const QueryKind Kind

Detailed Description

Query for "match MATCHER".

Definition at line 89 of file Query.h.

Constructor & Destructor Documentation

◆ MatchQuery()

clang::query::MatchQuery::MatchQuery ( StringRef Source,
const ast_matchers::dynamic::DynTypedMatcher & Matcher )
inline

Definition at line 90 of file Query.h.

References Matcher, clang::query::QK_Match, clang::query::Query::Query(), and Source.

Member Function Documentation

◆ classof()

bool clang::query::MatchQuery::classof ( const Query * Q)
inlinestatic

◆ run()

bool clang::query::MatchQuery::run ( llvm::raw_ostream & OS,
QuerySession & QS ) const
overridevirtual

Member Data Documentation

◆ Matcher

ast_matchers::dynamic::DynTypedMatcher clang::query::MatchQuery::Matcher

Definition at line 95 of file Query.h.

Referenced by MatchQuery(), and run().

◆ Source

StringRef clang::query::MatchQuery::Source

Definition at line 97 of file Query.h.

Referenced by MatchQuery(), and run().


The documentation for this struct was generated from the following files: