clang-tools 10.0.0

QuerySession.h
Go to the documentation of this file.
1 //===--- QuerySession.h - clang-query ---------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_QUERY_QUERY_SESSION_H
10 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_QUERY_QUERY_SESSION_H
11
12 #include "clang/ASTMatchers/Dynamic/VariantValue.h"
13 #include "llvm/ADT/ArrayRef.h"
14 #include "llvm/ADT/StringMap.h"
15
16 namespace clang {
17
18 class ASTUnit;
19
20 namespace query {
21
22 /// Represents the state for a particular clang-query session.
23 class QuerySession {
24 public:
25 QuerySession(llvm::ArrayRef<std::unique_ptr<ASTUnit>> ASTs)
26 : ASTs(ASTs), PrintOutput(false), DiagOutput(true),
27 DetailedASTOutput(false), BindRoot(true), PrintMatcher(false),
28 Terminate(false) {}
29
30 llvm::ArrayRef<std::unique_ptr<ASTUnit>> ASTs;
31
32 bool PrintOutput;
33 bool DiagOutput;
34 bool DetailedASTOutput;
35
36 bool BindRoot;
37 bool PrintMatcher;
38 bool Terminate;
39 llvm::StringMap<ast_matchers::dynamic::VariantValue> NamedValues;
40 };
41
42 } // namespace query
43 } // namespace clang
44
45 #endif
clang::query::QuerySession::BindRoot
bool BindRoot
Definition: QuerySession.h:36
clang::query::QuerySession
Represents the state for a particular clang-query session.
Definition: QuerySession.h:23
clang::query::QuerySession::QuerySession
QuerySession(llvm::ArrayRef< std::unique_ptr< ASTUnit >> ASTs)
Definition: QuerySession.h:25
clang::query::QuerySession::ASTs
llvm::ArrayRef< std::unique_ptr< ASTUnit > > ASTs
Definition: QuerySession.h:30
clang::query::QuerySession::Terminate
bool Terminate
Definition: QuerySession.h:38
clang::query::QuerySession::NamedValues
llvm::StringMap< ast_matchers::dynamic::VariantValue > NamedValues
Definition: QuerySession.h:39
clang::query::QuerySession::DiagOutput
bool DiagOutput
Definition: QuerySession.h:33
clang::query::QuerySession::DetailedASTOutput
bool DetailedASTOutput
Definition: QuerySession.h:34
clang::query::QuerySession::PrintOutput
bool PrintOutput
Definition: QuerySession.h:32
clang
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Definition: ApplyReplacements.h:27
clang::query::QuerySession::PrintMatcher
bool PrintMatcher
Definition: QuerySession.h:37