Skip to content

A list of clang compiler warning flags for different clang versions

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

sammyj85/compiler-warnings

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clang warning flags collection and parser

This project includes tools and lists to figure out all warning flags that clang compiler has:

Requirements

This uses ANTLR as a parser generator to parse clang's diagnostic groups definitions.

Usage

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.

About

A list of clang compiler warning flags for different clang versions

Resources

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE
GPL-3.0
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 75.1%
  • ANTLR 24.4%
  • Makefile 0.5%