]> granicus.if.org Git - clang/commitdiff
Added test case illustrating the use of '&'.
authorTed Kremenek <kremenek@apple.com>
Tue, 15 Apr 2008 18:37:29 +0000 (18:37 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 15 Apr 2008 18:37:29 +0000 (18:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49735 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/dead-stores.c

index 338465a4e445fc883c3a34123a27da8096b472bf..58960605f0840be02be6e1ab4d4d88833edec077 100644 (file)
@@ -29,3 +29,10 @@ void f4(int k) {
     
   k = 2;  // expected-warning {{value stored to variable is never used}}
 }
+
+void f5() {
+
+  int x = 4; // no-warning
+  int *p = &x; // expected-warning{{value stored to variable is never used}}
+
+}
\ No newline at end of file