clang-tools 3.8.0

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

QuerySession.h
Go to the documentation of this file.
1 //===--- QuerySession.h - clang-query ---------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_QUERY_QUERY_SESSION_H
11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_QUERY_QUERY_SESSION_H
12
13 #include "Query.h"
14 #include "clang/ASTMatchers/Dynamic/VariantValue.h"
15 #include "llvm/ADT/ArrayRef.h"
16 #include "llvm/ADT/StringMap.h"
17
18 namespace clang {
19
20 class ASTUnit;
21
22 namespace query {
23
24 /// Represents the state for a particular clang-query session.
25 class QuerySession {
26 public:
27 QuerySession(llvm::ArrayRef<std::unique_ptr<ASTUnit>> ASTs)
28 : ASTs(ASTs), OutKind(OK_Diag), BindRoot(true), Terminate(false) {}
29
30 llvm::ArrayRef<std::unique_ptr<ASTUnit>> ASTs;
31 OutputKind OutKind;
32 bool BindRoot;
33 bool Terminate;
34 llvm::StringMap<ast_matchers::dynamic::VariantValue> NamedValues;
35 };
36
37 } // namespace query
38 } // namespace clang
39
40 #endif
clang::query::QuerySession::BindRoot
bool BindRoot
Definition: QuerySession.h:32
clang::query::QuerySession
Represents the state for a particular clang-query session.
Definition: QuerySession.h:25
clang::query::QuerySession::QuerySession
QuerySession(llvm::ArrayRef< std::unique_ptr< ASTUnit >> ASTs)
Definition: QuerySession.h:27
clang::query::QuerySession::ASTs
llvm::ArrayRef< std::unique_ptr< ASTUnit > > ASTs
Definition: QuerySession.h:30
clang::query::OK_Diag
Definition: Query.h:22
clang::query::QuerySession::Terminate
bool Terminate
Definition: QuerySession.h:33
Query.h
clang::query::QuerySession::NamedValues
llvm::StringMap< ast_matchers::dynamic::VariantValue > NamedValues
Definition: QuerySession.h:34
clang::query::QuerySession::OutKind
OutputKind OutKind
Definition: QuerySession.h:31
clang::query::OutputKind
OutputKind
Definition: Query.h:21