Make -verify a -cc1 NoDriverOption

'%clang -verify' will now issue an error instead of succeeding without
verification. This should catch flawed tests like r199347.

Followup to r199451.

llvm-svn: 199455
This commit is contained in:
Alp Toker 2014-01-17 03:21:54 +00:00
parent 372d950a24
commit 810940f3ec
3 changed files with 8 additions and 2 deletions

View File

@ -254,6 +254,8 @@ def fconstexpr_backtrace_limit : Separate<["-"], "fconstexpr-backtrace-limit">,
HelpText<"Set the maximum number of entries to print in a constexpr evaluation backtrace (0 = no limit).">;
def fmessage_length : Separate<["-"], "fmessage-length">, MetaVarName<"<N>">,
HelpText<"Format message diagnostics so that they fit within N columns or fewer, when possible.">;
def verify : Flag<["-"], "verify">,
HelpText<"Verify diagnostic output using comment directives">;
def Wno_rewrite_macros : Flag<["-"], "Wno-rewrite-macros">,
HelpText<"Silence ObjC rewriting warnings">;

View File

@ -1295,8 +1295,6 @@ def unexported__symbols__list : Separate<["-"], "unexported_symbols_list">;
def u : JoinedOrSeparate<["-"], "u">, Group<u_Group>;
def v : Flag<["-"], "v">, Flags<[CC1Option]>,
HelpText<"Show commands to run and use verbose output">;
def verify : Flag<["-"], "verify">, Flags<[CC1Option]>,
HelpText<"Verify diagnostic output using comment directives">;
def verify_debug_info : Flag<["--"], "verify-debug-info">, Flags<[DriverOption]>,
HelpText<"Verify the binary representation of debug output">;
def weak_l : Joined<["-"], "weak-l">, Flags<[LinkerInput]>;

View File

@ -0,0 +1,6 @@
// RUN: not %clang %s -verify 2>&1 | FileCheck %s
// RUN: %clang -cc1 -verify %s
// expected-no-diagnostics
// Test that -verify is strictly rejected as unknown by the driver.
// CHECK: unknown argument: '-verify'