Skip to content

Commit 32cbbb0

Browse files
committed
cli: publish the --clang option
1 parent e329169 commit 32cbbb0

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

cli/cmdlineparser.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,7 @@ void CmdLineParser::printHelp()
973973
" analysis is disabled by this flag.\n"
974974
" --check-library Show information messages when library files have\n"
975975
" incomplete info.\n"
976+
" --clang Import Clang AST\n"
976977
" --config-exclude=<dir>\n"
977978
" Path (prefix) to be excluded from configuration\n"
978979
" checking. Preprocessor configurations defined in\n"

man/manual.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ This option is only valid when supplying an input directory. To ignore multiple
108108

109109
cppcheck -isrc/b -isrc/c
110110

111+
### Clang parser
112+
113+
By default Cppcheck uses an internal C/C++ parser. However it is possible to use the Clang parser instead.
114+
115+
Install `clang`. Then use Cppcheck option `--clang`.
116+
117+
Technically, Cppcheck will execute `clang` with its `-ast-dump` option. The Clang output is then imported and converted into our normal Cppcheck format. And then normal Cppcheck analysis is performed on that.
118+
111119
## Severities
112120

113121
The possible severities for messages are:

0 commit comments

Comments
 (0)