10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_QUERY_QUERY_H 11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_QUERY_QUERY_H 13 #include "clang/ASTMatchers/Dynamic/VariantValue.h" 14 #include "llvm/ADT/IntrusiveRefCntPtr.h" 15 #include "llvm/ADT/Optional.h" 36 struct Query : llvm::RefCountedBase<Query> {
48 typedef llvm::IntrusiveRefCntPtr<Query>
QueryRef;
86 MatchQuery(
const ast_matchers::dynamic::DynTypedMatcher &Matcher)
90 ast_matchers::dynamic::DynTypedMatcher
Matcher;
96 LetQuery(StringRef
Name,
const ast_matchers::dynamic::VariantValue &Value)
101 ast_matchers::dynamic::VariantValue
Value;
static bool classof(const Query *Q)
No-op query (i.e. a blank line).
static bool classof(const Query *Q)
Represents the state for a particular clang-query session.
SetQuery(T QuerySession::*Var, T Value)
static bool classof(const Query *Q)
virtual bool run(llvm::raw_ostream &OS, QuerySession &QS) const =0
Perform the query on QS and print output to OS.
static bool classof(const Query *Q)
Any query which resulted in a parse error. The error message is in ErrStr.
InvalidQuery(const Twine &ErrStr)
static bool classof(const Query *Q)
llvm::IntrusiveRefCntPtr< Query > QueryRef
Query for "match MATCHER".
static bool classof(const Query *Q)
LetQuery(StringRef Name, const ast_matchers::dynamic::VariantValue &Value)
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
ast_matchers::dynamic::DynTypedMatcher Matcher
Query for "set VAR VALUE".
bool run(llvm::raw_ostream &OS, QuerySession &QS) const override
Perform the query on QS and print output to OS.
static bool classof(const Query *Q)
ast_matchers::dynamic::VariantValue Value
MatchQuery(const ast_matchers::dynamic::DynTypedMatcher &Matcher)