aboutsummaryrefslogtreecommitdiff
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
commit632d1ece2715b1c8a0c99e1b8b487f4c148c89d5 (patch)
treeca4b0040b6dd826535c87697e39c17b348340de3
parent4726d03ab3abce41911c31d1354a18f1258cae4d (diff)
A test case to test that -warn-dead-stores does not emit a warning for stores to variables marked with '#pragma unused'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67570 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/dead-stores.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Analysis/dead-stores.c b/test/Analysis/dead-stores.c
index 8e44717299..c151057096 100644
--- a/test/Analysis/dead-stores.c
+++ b/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)
+}
+