[cfe-dev] RFC: Adding diagtool to the install target

Jonas Devlieghere via cfe-dev cfe-dev at lists.llvm.org
Mon May 14 03:32:05 PDT 2018


Hi cfe-dev,

I’d like to propose adding clang’s diagtool to the install target. I’ve found it to be very useful and I think there’s value is shipping it as part of our installation. 

For those who haven’t used it before, it’s essentially a collection of 4 small tools to deal with diagnostics in clang. 

Particularly useful are the “tree” and “show-enabled” commands: 

 - The former prints the hierarchy of diagnostic (warning) flags and which of them are enabled by default. 
 - The latter can be used to replace an invocation to clang and will print which diagnostics are disabled, warnings or errors.  
   For instance: `diagtool show-enabled -Wall -Werror /tmp/test.c` will print that -Wunused-variable (warn_unused_variable) will be treated as an error. 

Please let me know what you think!

Cheers,
Jonas

PS: I created a differential to make this happen here: https://reviews.llvm.org/D46694


More information about the cfe-dev mailing list