forked from OSchip/llvm-project
Enhance 'diagtool list-warnings' to report number of diagnostics covered directly under -Wpedantic, and enhance warning-flags.c test to test that this set does not grow.
llvm-svn: 159893
This commit is contained in:
parent
b22ea2acea
commit
30105f67b4
|
@ -177,3 +177,8 @@ CHECK-NEXT: warn_use_out_of_scope_declaration
|
|||
CHECK-NEXT: warn_weak_identifier_undeclared
|
||||
CHECK-NEXT: warn_weak_import
|
||||
|
||||
The list of warnings in -Wpedenatic should NEVER grow.
|
||||
|
||||
CHECK: Number in -Wpedantic (not covered by other -W flags): 71
|
||||
|
||||
|
||||
|
|
|
@ -98,6 +98,10 @@ int ListWarnings::run(unsigned int argc, char **argv, llvm::raw_ostream &out) {
|
|||
out << " Average number of diagnostics per flag: "
|
||||
<< llvm::format("%.4g", avgDiagsPerFlag) << '\n';
|
||||
|
||||
out << " Number in -Wpedantic (not covered by other -W flags): "
|
||||
<< flagHistogram.GetOrCreateValue("pedantic").getValue().size()
|
||||
<< '\n';
|
||||
|
||||
out << '\n';
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue