diff options
| author | Alp Toker <alp@nuanti.com> | 2014-01-17 03:21:54 +0000 |
|---|---|---|
| committer | Alp Toker <alp@nuanti.com> | 2014-01-17 03:21:54 +0000 |
| commit | 810940f3ec030776837dc8b349c18f9f45e4215b (patch) | |
| tree | c89016b8d7212336f4b3d3d99b023560e1902be8 /clang | |
| parent | 372d950a24a4e22b3137c905c94981e50c27d7e4 (diff) | |
| download | bcm5719-llvm-810940f3ec030776837dc8b349c18f9f45e4215b.tar.gz bcm5719-llvm-810940f3ec030776837dc8b349c18f9f45e4215b.zip | |
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
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/include/clang/Driver/CC1Options.td | 2 | ||||
| -rw-r--r-- | clang/include/clang/Driver/Options.td | 2 | ||||
| -rw-r--r-- | clang/test/Misc/driver-verify.c | 6 |
3 files changed, 8 insertions, 2 deletions
diff --git a/clang/include/clang/Driver/CC1Options.td b/clang/include/clang/Driver/CC1Options.td index 97511e560aa..e707cd8e193 100644 --- a/clang/include/clang/Driver/CC1Options.td +++ b/clang/include/clang/Driver/CC1Options.td @@ -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">; diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 48dd69ba241..78d59f0a379 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -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]>; diff --git a/clang/test/Misc/driver-verify.c b/clang/test/Misc/driver-verify.c new file mode 100644 index 00000000000..87b5c951d77 --- /dev/null +++ b/clang/test/Misc/driver-verify.c @@ -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' |

