From 92c612fd22be24207d9886213972f071a2a77673 Mon Sep 17 00:00:00 2001 From: Julian Ste <31321934+julian-st@users.noreply.github.com> Date: Thu, 9 Oct 2025 20:50:40 +0200 Subject: [PATCH] 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> --- pages/common/clang-check.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 pages/common/clang-check.md diff --git a/pages/common/clang-check.md b/pages/common/clang-check.md new file mode 100644 index 0000000000..3767741d72 --- /dev/null +++ b/pages/common/clang-check.md @@ -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: . + +- 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 --`