clang
20.0.0git
include
clang
AST
ASTDumper.h
Go to the documentation of this file.
1
//===--- ASTDumper.h - Dumping implementation for ASTs --------------------===//
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_AST_ASTDUMPER_H
10
#define LLVM_CLANG_AST_ASTDUMPER_H
11
12
#include "
clang/AST/ASTNodeTraverser.h
"
13
#include "
clang/AST/TextNodeDumper.h
"
14
#include "
clang/Basic/SourceManager.h
"
15
16
namespace
clang
{
17
18
class
ASTDumper
:
public
ASTNodeTraverser
<ASTDumper, TextNodeDumper> {
19
20
TextNodeDumper
NodeDumper;
21
22
raw_ostream &OS;
23
24
const
bool
ShowColors;
25
26
public
:
27
ASTDumper
(raw_ostream &OS,
const
ASTContext
&Context,
bool
ShowColors)
28
: NodeDumper(OS, Context,
ShowColors
), OS(OS),
ShowColors
(
ShowColors
) {}
29
30
ASTDumper
(raw_ostream &OS,
bool
ShowColors)
31
: NodeDumper(OS,
ShowColors
), OS(OS),
ShowColors
(
ShowColors
) {}
32
33
TextNodeDumper
&
doGetNodeDelegate
() {
return
NodeDumper; }
34
35
void
dumpInvalidDeclContext
(
const
DeclContext
*DC);
36
void
dumpLookups
(
const
DeclContext
*DC,
bool
DumpDecls);
37
38
template
<
typename
SpecializationDecl>
39
void
dumpTemplateDeclSpecialization
(
const
SpecializationDecl *
D
,
40
bool
DumpExplicitInst,
bool
DumpRefOnly);
41
template
<
typename
TemplateDecl>
42
void
dumpTemplateDecl
(
const
TemplateDecl
*
D
,
bool
DumpExplicitInst);
43
44
void
VisitFunctionTemplateDecl
(
const
FunctionTemplateDecl
*
D
);
45
void
VisitClassTemplateDecl
(
const
ClassTemplateDecl
*
D
);
46
void
VisitVarTemplateDecl
(
const
VarTemplateDecl
*
D
);
47
};
48
49
}
// namespace clang
50
51
#endif
ASTNodeTraverser.h
D
const Decl * D
Definition:
CheckExprLifetime.cpp:200
ShowColors
bool ShowColors
Definition:
Logger.cpp:29
SourceManager.h
Defines the SourceManager interface.
TextNodeDumper.h
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition:
ASTContext.h:187
clang::ASTDumper
Definition:
ASTDumper.h:18
clang::ASTDumper::dumpTemplateDeclSpecialization
void dumpTemplateDeclSpecialization(const SpecializationDecl *D, bool DumpExplicitInst, bool DumpRefOnly)
Definition:
ASTDumper.cpp:113
clang::ASTDumper::dumpLookups
void dumpLookups(const DeclContext *DC, bool DumpDecls)
Definition:
ASTDumper.cpp:53
clang::ASTDumper::ASTDumper
ASTDumper(raw_ostream &OS, bool ShowColors)
Definition:
ASTDumper.h:30
clang::ASTDumper::ASTDumper
ASTDumper(raw_ostream &OS, const ASTContext &Context, bool ShowColors)
Definition:
ASTDumper.h:27
clang::ASTDumper::doGetNodeDelegate
TextNodeDumper & doGetNodeDelegate()
Definition:
ASTDumper.h:33
clang::ASTDumper::dumpTemplateDecl
void dumpTemplateDecl(const TemplateDecl *D, bool DumpExplicitInst)
Definition:
ASTDumper.cpp:147
clang::ASTDumper::dumpInvalidDeclContext
void dumpInvalidDeclContext(const DeclContext *DC)
Definition:
ASTDumper.cpp:26
clang::ASTDumper::VisitVarTemplateDecl
void VisitVarTemplateDecl(const VarTemplateDecl *D)
Definition:
ASTDumper.cpp:170
clang::ASTDumper::VisitClassTemplateDecl
void VisitClassTemplateDecl(const ClassTemplateDecl *D)
Definition:
ASTDumper.cpp:166
clang::ASTDumper::VisitFunctionTemplateDecl
void VisitFunctionTemplateDecl(const FunctionTemplateDecl *D)
Definition:
ASTDumper.cpp:159
clang::ASTNodeTraverser
ASTNodeTraverser traverses the Clang AST for dumping purposes.
Definition:
ASTNodeTraverser.h:73
clang::ClassTemplateDecl
Declaration of a class template.
Definition:
DeclTemplate.h:2231
clang::DeclContext
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition:
DeclBase.h:1436
clang::FunctionTemplateDecl
Declaration of a template function.
Definition:
DeclTemplate.h:957
clang::TemplateDecl
The base class of all kinds of template declarations (e.g., class, function, etc.).
Definition:
DeclTemplate.h:394
clang::TextNodeDumper
Definition:
TextNodeDumper.h:137
clang::VarTemplateDecl
Declaration of a variable template.
Definition:
DeclTemplate.h:2984
clang
The JSON file list parser is used to communicate input to InstallAPI.
Definition:
CalledOnceCheck.h:17
Generated on Fri Nov 22 2024 09:47:00 for clang by
1.9.6