[Driver][Diagnostics] Make 'show option names' default for driver warnings
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 11 Oct 2016 00:01:22 +0000 (00:01 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 11 Oct 2016 00:01:22 +0000 (00:01 +0000)
commit8838db8a9d07f6ce64a0903471643ce74da3a602
treebb7ff7bba8c771ab88600d2d8cba2439819bc9fe
parent4683f9d7dcda211f0d494894b8e3ae4820816fd3
[Driver][Diagnostics] Make 'show option names' default for driver warnings

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: 283827
clang/include/clang/Frontend/CompilerInvocation.h
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/Driver/show-option-names.c [new file with mode: 0644]