summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Driver/Options.td3
-rw-r--r--clang/test/Misc/backend-stack-frame-diagnostics.cpp4
2 files changed, 6 insertions, 1 deletions
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index f9cb6168674..d25aaa6e73c 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -862,10 +862,11 @@ def Wlarge_by_value_copy_def : Flag<["-"], "Wlarge-by-value-copy">,
"in bytes than a given value">, Flags<[HelpHidden]>;
def Wlarge_by_value_copy_EQ : Joined<["-"], "Wlarge-by-value-copy=">, Flags<[CC1Option]>;
+// These "special" warning flags are effectively processed as f_Group flags by the driver:
// Just silence warnings about -Wlarger-than for now.
def Wlarger_than_EQ : Joined<["-"], "Wlarger-than=">, Group<clang_ignored_f_Group>;
def Wlarger_than_ : Joined<["-"], "Wlarger-than-">, Alias<Wlarger_than_EQ>;
-def Wframe_larger_than_EQ : Joined<["-"], "Wframe-larger-than=">, Flags<[DriverOption]>;
+def Wframe_larger_than_EQ : Joined<["-"], "Wframe-larger-than=">, Group<f_Group>, Flags<[DriverOption]>;
def : Flag<["-"], "fterminated-vtables">, Alias<fapple_kext>;
def fthreadsafe_statics : Flag<["-"], "fthreadsafe-statics">, Group<f_Group>;
diff --git a/clang/test/Misc/backend-stack-frame-diagnostics.cpp b/clang/test/Misc/backend-stack-frame-diagnostics.cpp
index 4694299f401..1d865e7646e 100644
--- a/clang/test/Misc/backend-stack-frame-diagnostics.cpp
+++ b/clang/test/Misc/backend-stack-frame-diagnostics.cpp
@@ -6,6 +6,10 @@
// * The driver passes the option through to the backend.
// * The frontend diagnostic handler 'demangles' and resolves the correct function definition.
+// Test that link invocations don't emit an "argument unused during compilation" diagnostic.
+// RUN: touch %t.o
+// RUN: %clang -Werror -Wframe-larger-than=0 %t.o -### 2>&1 | not grep ' error: '
+
// TODO: Support rich backend diagnostics for Objective-C methods.
// Backend diagnostics aren't suppressed in system headers because such results
OpenPOWER on IntegriCloud