From: Ted Kremenek Date: Mon, 27 Oct 2008 21:57:17 +0000 (+0000) Subject: Added compound literal test case. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=194aade5a0378afd1e669305fa3dc284eb4f5ec8;p=clang Added compound literal test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58279 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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}} +}