clang-tools  8.0.0
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 "clang/ASTMatchers/Dynamic/VariantValue.h"
14 #include "llvm/ADT/ArrayRef.h"
15 #include "llvm/ADT/StringMap.h"
16 
17 namespace clang {
18 
19 class ASTUnit;
20 
21 namespace query {
22 
23 /// Represents the state for a particular clang-query session.
24 class QuerySession {
25 public:
26  QuerySession(llvm::ArrayRef<std::unique_ptr<ASTUnit>> ASTs)
27  : ASTs(ASTs), PrintOutput(false), DiagOutput(true),
28  DetailedASTOutput(false), BindRoot(true), PrintMatcher(false),
29  Terminate(false) {}
30 
31  llvm::ArrayRef<std::unique_ptr<ASTUnit>> ASTs;
32 
34  bool DiagOutput;
36 
37  bool BindRoot;
39  bool Terminate;
40  llvm::StringMap<ast_matchers::dynamic::VariantValue> NamedValues;
41 };
42 
43 } // namespace query
44 } // namespace clang
45 
46 #endif
Represents the state for a particular clang-query session.
Definition: QuerySession.h:24
QuerySession(llvm::ArrayRef< std::unique_ptr< ASTUnit >> ASTs)
Definition: QuerySession.h:26
llvm::ArrayRef< std::unique_ptr< ASTUnit > > ASTs
Definition: QuerySession.h:31
llvm::StringMap< ast_matchers::dynamic::VariantValue > NamedValues
Definition: QuerySession.h:40
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//