diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 882ba033b..60aaaccbc 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -973,6 +973,7 @@ void CmdLineParser::printHelp() " analysis is disabled by this flag.\n" " --check-library Show information messages when library files have\n" " incomplete info.\n" + " --clang Import Clang AST\n" " --config-exclude=\n" " Path (prefix) to be excluded from configuration\n" " checking. Preprocessor configurations defined in\n" diff --git a/man/manual.md b/man/manual.md index 2b54c96c9..6dd164cde 100644 --- a/man/manual.md +++ b/man/manual.md @@ -108,6 +108,14 @@ This option is only valid when supplying an input directory. To ignore multiple cppcheck -isrc/b -isrc/c +### Clang parser + +By default Cppcheck uses an internal C/C++ parser. However it is possible to use the Clang parser instead. + +Install `clang`. Then use Cppcheck option `--clang`. + +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. + ## Severities The possible severities for messages are: