]> granicus.if.org Git - clang/commitdiff
Added compound literal test case.
authorTed Kremenek <kremenek@apple.com>
Mon, 27 Oct 2008 21:57:17 +0000 (21:57 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 27 Oct 2008 21:57:17 +0000 (21:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58279 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/stack-addr-ps.c

index 8e2a0c06af47b1fd58392707a1b9e3101626130b..9a8a8f78e9d9158f7cc9c8218e6cfe7749e4fca4 100644 (file)
@@ -18,4 +18,7 @@ int* f3(int x, int *y) {
   return y; // expected-warning{{Address of stack memory associated with local variable 'w' returned.}}
 }
 
+unsigned short* compound_literal() {
+  return &(unsigned short){((unsigned short)0x22EF)}; // expected-warning{{Address of stack memory}}
+}