summaryrefslogtreecommitdiffstats
path: root/clang/test/Misc/backend-stack-frame-diagnostics.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-07-10 02:13:29 +0000
committerAlp Toker <alp@nuanti.com>2014-07-10 02:13:29 +0000
commite81b42fde98c5c2fb023d9cca5c79ed10dfde7ef (patch)
tree51bea76bcc533ea9b861e8123882eb3747992042 /clang/test/Misc/backend-stack-frame-diagnostics.cpp
parent677539d0afe90fe8ec6fde19d156c1e2b0d4046a (diff)
downloadbcm5719-llvm-e81b42fde98c5c2fb023d9cca5c79ed10dfde7ef.tar.gz
bcm5719-llvm-e81b42fde98c5c2fb023d9cca5c79ed10dfde7ef.zip
Prevent link warnings due to -Wframe-larger-than=
Although this is nominally a -W option, we actually handle it in the driver exactly as an f-group flag that's translated directly to -mllvm. That means f_Group (and unintuitively, not W_Group) has the semantics we want to make it behave like a standard warning flag: no automatic forwarding, no warning for link invocations and compile-only. Silences diagnostics like: [691/1545] Linking CXX executable bin/llvm-diff clang-3.5: warning: argument unused during compilation: '-Wframe-larger-than=2048' (Hopefully we can move towards handling these in the frontend but that'll require some infrastructure work.) llvm-svn: 212670
Diffstat (limited to 'clang/test/Misc/backend-stack-frame-diagnostics.cpp')
-rw-r--r--clang/test/Misc/backend-stack-frame-diagnostics.cpp4
1 files changed, 4 insertions, 0 deletions
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