]> granicus.if.org Git - clang/commitdiff
clang-cl: support -fmacro-backtrace-limit
authorHans Wennborg <hans@hanshq.net>
Sat, 11 Apr 2015 11:44:44 +0000 (11:44 +0000)
committerHans Wennborg <hans@hanshq.net>
Sat, 11 Apr 2015 11:44:44 +0000 (11:44 +0000)
Also fix the test for "core options" to actually fail
in case an option isn't supported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234684 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Options.td
test/Driver/cl-options.c

index 0992e9e509fc526af3ae74fa9cfce414ea6a38ff..bc23b9a7e03c6d6610594efa150673d03ef4b0a4 100644 (file)
@@ -627,7 +627,7 @@ def flto_EQ : Joined<["-"], "flto=">, Group<clang_ignored_gcc_optimization_f_Gro
 def flto : Flag<["-"], "flto">, Group<f_Group>;
 def fno_lto : Flag<["-"], "fno-lto">, Group<f_Group>;
 def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">,
-                                Group<f_Group>;
+                                Group<f_Group>, Flags<[DriverOption, CoreOption]>;
 def fmerge_all_constants : Flag<["-"], "fmerge-all-constants">, Group<f_Group>;
 def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group<f_Group>;
 def fms_extensions : Flag<["-"], "fms-extensions">, Group<f_Group>, Flags<[CC1Option]>,
index 4a82544d9e4dcc5b1895a4eaeaab43b4c67efb8d..d3f0f7ab586824b00229a5d9281cd957da5c4241 100644 (file)
 // ThreadSafeStatics-NOT: "-fno-threadsafe-statics"
 
 // Accept "core" clang options.
-// (/Zs is for syntax-only)
+// (/Zs is for syntax-only, -Werror makes it fail hard on unknown options)
 // RUN: %clang_cl \
 // RUN:     --driver-mode=cl \
 // RUN:     -ferror-limit=10 \
 // RUN:     -fno-strict-aliasing \
 // RUN:     -fstrict-aliasing \
 // RUN:     -mllvm -disable-llvm-optzns \
-// RUN:     -Wunused-variables \
-// RUN:     /Zs -- %s 2>&1
+// RUN:     -Wunused-variable \
+// RUN:     -fmacro-backtrace-limit=0 \
+// RUN:     -Werror /Zs -- %s 2>&1
 
 
 void f() { }