9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_QUERY_QUERY_H
10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_QUERY_QUERY_H
13#include "clang/ASTMatchers/Dynamic/VariantValue.h"
14#include "llvm/ADT/IntrusiveRefCntPtr.h"
38struct Query : llvm::RefCountedBase<Query> {
51typedef llvm::IntrusiveRefCntPtr<Query>
QueryRef;
90 const ast_matchers::dynamic::DynTypedMatcher &
Matcher)
94 ast_matchers::dynamic::DynTypedMatcher
Matcher;
107 ast_matchers::dynamic::VariantValue
Value;
llvm::raw_string_ostream OS
Represents the state for a particular clang-query session.
llvm::IntrusiveRefCntPtr< Query > QueryRef
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
DisableOutputQuery(bool QuerySession::*Var)
static bool classof(const Query *Q)
EnableOutputQuery(bool QuerySession::*Var)
static bool classof(const Query *Q)
static bool classof(const Query *Q)
Any query which resulted in a parse error. The error message is in ErrStr.
static bool classof(const Query *Q)
InvalidQuery(const Twine &ErrStr)
LetQuery(StringRef Name, const ast_matchers::dynamic::VariantValue &Value)
ast_matchers::dynamic::VariantValue Value
static bool classof(const Query *Q)
Query for "match MATCHER".
MatchQuery(StringRef Source, const ast_matchers::dynamic::DynTypedMatcher &Matcher)
static bool classof(const Query *Q)
ast_matchers::dynamic::DynTypedMatcher Matcher
No-op query (i.e. a blank line).
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.
StringRef RemainingContent
static bool classof(const Query *Q)
SetExclusiveOutputQuery(bool QuerySession::*Var)
static bool classof(const Query *Q)
bool run(llvm::raw_ostream &OS, QuerySession &QS) const override
Perform the query on QS and print output to OS.
SetNonExclusiveOutputQuery(QueryKind Kind, bool QuerySession::*Var, bool Value)
bool run(llvm::raw_ostream &OS, QuerySession &QS) const override
Perform the query on QS and print output to OS.
Query for "set VAR VALUE".
static bool classof(const Query *Q)
bool run(llvm::raw_ostream &OS, QuerySession &QS) const override
Perform the query on QS and print output to OS.
SetQuery(T QuerySession::*Var, T Value)