Reapply [Driver][Diagnostics] Make 'show option names' default for driver warnings
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 11 Oct 2016 18:21:26 +0000 (18:21 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 11 Oct 2016 18:21:26 +0000 (18:21 +0000)
commit76952a76e5ff7958f6108b8d2c5d1a78c3169180
treed058012f4f3470db1a1bc6a7a54222ed52a09ca4
parent76e007e7e388ba700b3adc1551d88f1ba442a30f
Reapply [Driver][Diagnostics] Make 'show option names' default for driver warnings

Reapply r283827 by fixing the tests to not be target specific

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.

Differential Revision: https://reviews.llvm.org/D24516

rdar://problem/27300909

llvm-svn: 283913
clang/include/clang/Frontend/CompilerInvocation.h
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/Driver/show-option-names.c [new file with mode: 0644]