mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-28 20:11:19 +08:00
clang-check: add page (#18515)
Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> Co-authored-by: Dylan <145150333+dmmqz@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# clang-check
|
||||
|
||||
> Check basic errors and work with Clang's Abstract Syntax Tree (AST).
|
||||
> Part of Clang's LibTooling and is useful for debugging and analyzing C/C++ code.
|
||||
> More information: <https://manned.org/clang-check>.
|
||||
|
||||
- Run default checks on a source file:
|
||||
|
||||
`clang-check {{path/to/file.cpp}} --`
|
||||
|
||||
- Dump the Abstract Syntax Tree for debugging:
|
||||
|
||||
`clang-check {{path/to/file.cpp}} -ast-dump --`
|
||||
|
||||
- Filter AST by Name:
|
||||
|
||||
`clang-check {{path/to/file.cpp}} -ast-dump -ast-dump-filter FunctionName`
|
||||
|
||||
- Pretty-Print AST:
|
||||
|
||||
`clang-check {{path/to/file.cpp}} -ast-print --`
|
||||
Reference in New Issue
Block a user