diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-23 22:30:58 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-23 22:30:58 +0000 |
commit | af6543455f209aaec6b5061a7c2585a13dda04b5 (patch) | |
tree | e5ae17f2e72e2c67af5e4d70a870fda1c9e23c1c | |
parent | fd14fade2ffc39651ec848acf182fb66330dcb43 (diff) | |
download | bcm5719-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.c | 6 |
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) +} + |