Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
llvm-epi
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Roger Ferrer
llvm-epi
Commits
64361e3c
Commit
64361e3c
authored
12 years ago
by
Alexander Kornienko
Browse files
Options
Downloads
Patches
Plain Diff
Added description of clang-check -ast-dump* options.
llvm-svn: 161861
parent
925a281b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
clang/docs/HowToSetupToolingForLLVM.html
+36
-0
36 additions, 0 deletions
clang/docs/HowToSetupToolingForLLVM.html
with
36 additions
and
0 deletions
clang/docs/HowToSetupToolingForLLVM.html
+
36
−
0
View file @
64361e3c
...
...
@@ -84,6 +84,42 @@ into your .vimrc:</p>
<p>
When editing C++ code, hit F5 to reparse the current buffer. The output will
go into the error window, which you can enable with
<code>
:cope
</code>
.
</p>
<p>
Other
<code>
clang-check
</code>
options that can be useful when working with
clang AST:
</p>
<ul>
<li><code>
-ast-print
</code>
- Build ASTs and then pretty-print them.
</li>
<li><code>
-ast-dump
</code>
- Build ASTs and then debug dump them.
</li>
<li><code>
-ast-dump-filter=
<
string
>
</code>
- Use with
<code>
-ast-dump
</code>
or
<code>
-ast-print
</code>
to dump/print
only AST declaration nodes having a certain substring in a qualified name.
Use
<code>
-ast-list
</code>
to list all filterable declaration node
names.
</li>
<li><code>
-ast-list
</code>
- Build ASTs and print the list of declaration
node qualified names.
</li>
</ul>
<p>
Examples:
</p>
<pre>
<b>
$ clang-check tools/clang/tools/clang-check/ClangCheck.cpp -ast-dump -ast-dump-filter ActionFactory::newASTConsumer
</b>
Processing: tools/clang/tools/clang-check/ClangCheck.cpp.
Dumping
<anonymous
namespace
>
::ActionFactory::newASTConsumer:
clang::ASTConsumer *newASTConsumer() (CompoundStmt 0x44da290
<
/home/alexfh/local/llvm/tools/clang/tools/clang-check/ClangCheck.cpp:64:40, line:72:3
>
(IfStmt 0x44d97c8
<
line:65:5, line:66:45
>
<<<
NULL
>>>
(ImplicitCastExpr 0x44d96d0
<
line:65:9
>
'_Bool':'_Bool'
<
UserDefinedConversion
>
...
<b>
$ clang-check tools/clang/tools/clang-check/ClangCheck.cpp -ast-print -ast-dump-filter ActionFactory::newASTConsumer
</b>
Processing: tools/clang/tools/clang-check/ClangCheck.cpp.
Printing
<
anonymous namespace
>
::ActionFactory::newASTConsumer:
clang::ASTConsumer *newASTConsumer() {
if (this-
>
ASTList.operator _Bool())
return clang::CreateASTDeclNodeLister();
if (this-
>
ASTDump.operator _Bool())
return clang::CreateASTDumper(this-
>
ASTDumpFilter);
if (this-
>
ASTPrint.operator _Bool())
return clang::CreateASTPrinter(
&
llvm::outs(), this-
>
ASTDumpFilter);
return new clang::ASTConsumer();
}
</pre>
<!-- ======================================================================= -->
<h2><a
name=
"using-ninja"
>
(Experimental) Using Ninja Build System
</a></h2>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment