r199455 - Make -verify a -cc1 NoDriverOption
Alp Toker
alp at nuanti.com
Thu Jan 16 19:21:54 PST 2014
Author: alp
Date: Thu Jan 16 21:21:54 2014
New Revision: 199455
URL: http://llvm.org/viewvc/llvm-project?rev=199455&view=rev
Log:
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.
Added:
cfe/trunk/test/Misc/driver-verify.c
Modified:
cfe/trunk/include/clang/Driver/CC1Options.td
cfe/trunk/include/clang/Driver/Options.td
Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=199455&r1=199454&r2=199455&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Thu Jan 16 21:21:54 2014
@@ -254,6 +254,8 @@ def fconstexpr_backtrace_limit : Separat
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">;
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=199455&r1=199454&r2=199455&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Thu Jan 16 21:21:54 2014
@@ -1295,8 +1295,6 @@ def unexported__symbols__list : Separate
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]>;
Added: cfe/trunk/test/Misc/driver-verify.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/driver-verify.c?rev=199455&view=auto
==============================================================================
--- cfe/trunk/test/Misc/driver-verify.c (added)
+++ cfe/trunk/test/Misc/driver-verify.c Thu Jan 16 21:21:54 2014
@@ -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'
More information about the cfe-commits
mailing list