Currently, driver level warnings do not show option names (e.g. warning: complain about foo [-Woption-name]) in a diagnostic unless -fdiagnostics-show-option is explictly specified. OTOH, the driver by default turn this option on for CC1. Change the logic to show option names by default in the driver as well.
Details
- Reviewers
vsk rsmith - Commits
- rG76952a76e5ff: Reapply [Driver][Diagnostics] Make 'show option names' default for driver…
rG8838db8a9d07: [Driver][Diagnostics] Make 'show option names' default for driver warnings
rC283913: Reapply [Driver][Diagnostics] Make 'show option names' default for driver…
rC283827: [Driver][Diagnostics] Make 'show option names' default for driver warnings
Diff Detail
Event Timeline
lib/Frontend/CompilerInvocation.cpp | ||
---|---|---|
965 | Does it make sense to use: hasFlag (OptSpecifier Pos, OptSpecifier Neg, bool Default=DefaultShowOpt) ? This might take care of an edge case where both show_option and no_show_option are specified -- the last flag passed should win out. | |
test/Driver/show-option-names.c | ||
4 | Can you split this into two checks? One to check that the warning appear, and another to check that the option isn't printed. |
Lgtm, with one potential nit.
test/Driver/show-option-names.c | ||
---|---|---|
4 | Argh, I suppose there's no "CHECK-SAME-NOT" functionality in FileCheck. If you want to shave off a compiler invocation, maybe you could write: CHECK: ... {{$}} |
Committed r283827
test/Driver/show-option-names.c | ||
---|---|---|
4 | The "-NOT" functionality is there, but doesn't help in this case. The {{$}} worked well enough though! Thanks |
Does it make sense to use: hasFlag (OptSpecifier Pos, OptSpecifier Neg, bool Default=DefaultShowOpt) ? This might take care of an edge case where both show_option and no_show_option are specified -- the last flag passed should win out.