clang-tools 20.0.0git
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/AST/ASTTypeTraits.h"
13#include "clang/ASTMatchers/Dynamic/VariantValue.h"
14#include "llvm/ADT/ArrayRef.h"
15#include "llvm/ADT/StringMap.h"
16
17namespace clang {
18
19class ASTUnit;
20
21namespace query {
22
23/// Represents the state for a particular clang-query session.
25public:
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), TK(TK_AsIs) {}
30
31 llvm::ArrayRef<std::unique_ptr<ASTUnit>> ASTs;
32
36
40
41 TraversalKind TK;
42 llvm::StringMap<ast_matchers::dynamic::VariantValue> NamedValues;
43};
44
45} // namespace query
46} // namespace clang
47
48#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::StringMap< ast_matchers::dynamic::VariantValue > NamedValues
Definition: QuerySession.h:42
llvm::ArrayRef< std::unique_ptr< ASTUnit > > ASTs
Definition: QuerySession.h:31
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//