clang-tools  9.0.0svn
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 
33  bool DiagOutput;
35 
36  bool BindRoot;
38  bool Terminate;
39  llvm::StringMap<ast_matchers::dynamic::VariantValue> NamedValues;
40 };
41 
42 } // namespace query
43 } // namespace clang
44 
45 #endif
Represents the state for a particular clang-query session.
Definition: QuerySession.h:23
QuerySession(llvm::ArrayRef< std::unique_ptr< ASTUnit >> ASTs)
Definition: QuerySession.h:25
llvm::ArrayRef< std::unique_ptr< ASTUnit > > ASTs
Definition: QuerySession.h:30
llvm::StringMap< ast_matchers::dynamic::VariantValue > NamedValues
Definition: QuerySession.h:39
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//