clang-tools  8.0.0svn
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), PrintOutput(false), DiagOutput(true),
29  DetailedASTOutput(false), BindRoot(true), PrintMatcher(false),
30  Terminate(false) {}
31 
32  llvm::ArrayRef<std::unique_ptr<ASTUnit>> ASTs;
33 
35  bool DiagOutput;
37 
38  bool BindRoot;
40  bool Terminate;
41  llvm::StringMap<ast_matchers::dynamic::VariantValue> NamedValues;
42 };
43 
44 } // namespace query
45 } // namespace clang
46 
47 #endif
Represents the state for a particular clang-query session.
Definition: QuerySession.h:25
QuerySession(llvm::ArrayRef< std::unique_ptr< ASTUnit >> ASTs)
Definition: QuerySession.h:27
llvm::ArrayRef< std::unique_ptr< ASTUnit > > ASTs
Definition: QuerySession.h:32
llvm::StringMap< ast_matchers::dynamic::VariantValue > NamedValues
Definition: QuerySession.h:41
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//