aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-10-27 21:57:17 +0000
committerTed Kremenek <kremenek@apple.com>2008-10-27 21:57:17 +0000
commit194aade5a0378afd1e669305fa3dc284eb4f5ec8 (patch)
tree74dbf0b199db4071b3e3ab22b61c15052c1eff56
parent4f09027385466f1f4c382c80ca77157e2aef97d9 (diff)
Added compound literal test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58279 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/stack-addr-ps.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Analysis/stack-addr-ps.c b/test/Analysis/stack-addr-ps.c
index 8e2a0c06af..9a8a8f78e9 100644
--- a/test/Analysis/stack-addr-ps.c
+++ b/test/Analysis/stack-addr-ps.c
@@ -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}}
+}