summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-08-19 00:52:13 +0000
committerTed Kremenek <kremenek@apple.com>2010-08-19 00:52:13 +0000
commit50e0105f1c11c00f26528d58480228c66c7ab270 (patch)
treefa0e5ff6dcf42a9dddc36462cd18d71169c55a18 /clang/test/Analysis
parent5295ce8120b978e931b2084416ccd0f4222fb79e (diff)
downloadbcm5719-llvm-50e0105f1c11c00f26528d58480228c66c7ab270.tar.gz
bcm5719-llvm-50e0105f1c11c00f26528d58480228c66c7ab270.zip
Add warning for functions/blocks that have attribute 'noreturn' but return a non-void result. (<rdar://problem/7562925>)
llvm-svn: 111492
Diffstat (limited to 'clang/test/Analysis')
-rw-r--r--clang/test/Analysis/misc-ps.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/Analysis/misc-ps.m b/clang/test/Analysis/misc-ps.m
index f6a92831d73..b4fa77ef3e7 100644
--- a/clang/test/Analysis/misc-ps.m
+++ b/clang/test/Analysis/misc-ps.m
@@ -323,7 +323,7 @@ int test_invalidate_by_ref() {
// was the block containing the merge for '?', which would trigger an
// assertion failure.
int rdar_7027684_aux();
-int rdar_7027684_aux_2() __attribute__((noreturn));
+int rdar_7027684_aux_2() __attribute__((noreturn)); // expected-warning{{functions declared 'noreturn' should have a 'void' result type}}
void rdar_7027684(int x, int y) {
{}; // this empty compound statement is critical.
(rdar_7027684_aux() ? rdar_7027684_aux_2() : (void) 0);
OpenPOWER on IntegriCloud