annotate clang-tools-extra/clang-query/QuerySession.h @ 256:7d9b19ec7a62

cbclang output is still wrong
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 18 Aug 2023 18:48:47 +0900
parents 2e18cbf3894f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 //===--- QuerySession.h - clang-query ---------------------------*- C++ -*-===//
anatofuz
parents:
diff changeset
2 //
anatofuz
parents:
diff changeset
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
anatofuz
parents:
diff changeset
4 // See https://llvm.org/LICENSE.txt for license information.
anatofuz
parents:
diff changeset
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
anatofuz
parents:
diff changeset
6 //
anatofuz
parents:
diff changeset
7 //===----------------------------------------------------------------------===//
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_QUERY_QUERY_SESSION_H
anatofuz
parents:
diff changeset
10 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_QUERY_QUERY_SESSION_H
anatofuz
parents:
diff changeset
11
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
12 #include "clang/AST/ASTTypeTraits.h"
150
anatofuz
parents:
diff changeset
13 #include "clang/ASTMatchers/Dynamic/VariantValue.h"
anatofuz
parents:
diff changeset
14 #include "llvm/ADT/ArrayRef.h"
anatofuz
parents:
diff changeset
15 #include "llvm/ADT/StringMap.h"
anatofuz
parents:
diff changeset
16
anatofuz
parents:
diff changeset
17 namespace clang {
anatofuz
parents:
diff changeset
18
anatofuz
parents:
diff changeset
19 class ASTUnit;
anatofuz
parents:
diff changeset
20
anatofuz
parents:
diff changeset
21 namespace query {
anatofuz
parents:
diff changeset
22
anatofuz
parents:
diff changeset
23 /// Represents the state for a particular clang-query session.
anatofuz
parents:
diff changeset
24 class QuerySession {
anatofuz
parents:
diff changeset
25 public:
anatofuz
parents:
diff changeset
26 QuerySession(llvm::ArrayRef<std::unique_ptr<ASTUnit>> ASTs)
anatofuz
parents:
diff changeset
27 : ASTs(ASTs), PrintOutput(false), DiagOutput(true),
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
28 DetailedASTOutput(false), SrcLocOutput(false), BindRoot(true),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
29 PrintMatcher(false), Terminate(false), TK(TK_AsIs) {}
150
anatofuz
parents:
diff changeset
30
anatofuz
parents:
diff changeset
31 llvm::ArrayRef<std::unique_ptr<ASTUnit>> ASTs;
anatofuz
parents:
diff changeset
32
anatofuz
parents:
diff changeset
33 bool PrintOutput;
anatofuz
parents:
diff changeset
34 bool DiagOutput;
anatofuz
parents:
diff changeset
35 bool DetailedASTOutput;
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
36 bool SrcLocOutput;
150
anatofuz
parents:
diff changeset
37
anatofuz
parents:
diff changeset
38 bool BindRoot;
anatofuz
parents:
diff changeset
39 bool PrintMatcher;
anatofuz
parents:
diff changeset
40 bool Terminate;
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
41
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
42 TraversalKind TK;
150
anatofuz
parents:
diff changeset
43 llvm::StringMap<ast_matchers::dynamic::VariantValue> NamedValues;
anatofuz
parents:
diff changeset
44 };
anatofuz
parents:
diff changeset
45
anatofuz
parents:
diff changeset
46 } // namespace query
anatofuz
parents:
diff changeset
47 } // namespace clang
anatofuz
parents:
diff changeset
48
anatofuz
parents:
diff changeset
49 #endif