From f87821c086a46411883b385c743996a35cc8e154 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 15 Apr 2008 18:37:29 +0000 Subject: [PATCH] Added test case illustrating the use of '&'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49735 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Analysis/dead-stores.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/Analysis/dead-stores.c b/test/Analysis/dead-stores.c index 338465a4e4..58960605f0 100644 --- a/test/Analysis/dead-stores.c +++ b/test/Analysis/dead-stores.c @@ -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 -- 2.40.0