summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-03-23 22:30:58 +0000
committerTed Kremenek <kremenek@apple.com>2009-03-23 22:30:58 +0000
commitaf6543455f209aaec6b5061a7c2585a13dda04b5 (patch)
treee5ae17f2e72e2c67af5e4d70a870fda1c9e23c1c
parentfd14fade2ffc39651ec848acf182fb66330dcb43 (diff)
downloadbcm5719-llvm-af6543455f209aaec6b5061a7c2585a13dda04b5.tar.gz
bcm5719-llvm-af6543455f209aaec6b5061a7c2585a13dda04b5.zip
A test case to test that -warn-dead-stores does not emit a warning for stores to variables marked with '#pragma unused'.
llvm-svn: 67570
-rw-r--r--clang/test/Analysis/dead-stores.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Analysis/dead-stores.c b/clang/test/Analysis/dead-stores.c
index 8e447172997..c151057096e 100644
--- a/clang/test/Analysis/dead-stores.c
+++ b/clang/test/Analysis/dead-stores.c
@@ -167,3 +167,9 @@ int f19b(void) { // FIXME: Should this case be considered the same as f19?
x = 1;
return x;
}
+
+void f20(void) {
+ int x = 1; // no-warning
+#pragma unused(x)
+}
+
OpenPOWER on IntegriCloud