This project includes tools and lists to figure out all warning flags that clang compiler has:
- clang 3.2 warnings
- clang 3.3 warnings
- clang 3.4 warnings
- clang 3.5 warnings
- clang 3.6 warnings
- clang 3.7 warnings
This uses ANTLR as a parser generator to parse clang's diagnostic groups definitions.
After you have installed all the requirements and are able to run
ANTLR with antlr4
command, just use following commands:
make
./parse-clang-diagnostic-groups.py <path-to-clang-source>/include/clang/Basic/DiagnosticGroups.td [--top-nodes-only] [--show-class]
And you'll get the list of all individual warning flags and their dependencies that are in the requested clang version.
Using the --top-nodes-only flag will only show top level nodes that have no parent node. In other words it cuts out the duplication of the nested diagnostic nodes and makes the list shorter. For example, a diagnostic indented to the third level would normally be displayed three times in the full list, and a top level/first level diagnostic would be displayed just once.
Using the --show-class flag displays the diagnostic class name next to the diagnostic switch flag name, which is useful for seeing which flags have no associated class name ("None") and thus have no effect in themselves (though their children may). Such flags may exist to have command line compatibility with GCC.