aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-10-30 23:17:05 +0000
committerTed Kremenek <kremenek@apple.com>2008-10-30 23:17:05 +0000
commit64cc62d502eca5728de8d9aa431d7e76ce438467 (patch)
treedc3fce4a8e1e39b98ba2db56ca876cc6ab0a11c4
parente1e91af0543577b9891c88731a8ac7ebe5a881bc (diff)
Add missing "expected warning".
Add compound literal with empty initializer (just to test the analyzer handles it). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58470 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/stack-addr-ps.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/Analysis/stack-addr-ps.c b/test/Analysis/stack-addr-ps.c
index 9bf8954110..7eead3bb20 100644
--- a/test/Analysis/stack-addr-ps.c
+++ b/test/Analysis/stack-addr-ps.c
@@ -21,8 +21,9 @@ int* f3(int x, int *y) {
void* compound_literal(int x) {
if (x)
return &(unsigned short){((unsigned short)0x22EF)}; // expected-warning{{Address of stack memory}} expected-warning{{braces around scalar initializer}}
-
+
+ int* array[] = {};
struct s { int z; double y; int w; };
- return &((struct s){ 2, 0.4, 5 * 8 });
+ return &((struct s){ 2, 0.4, 5 * 8 }); // expected-warning{{Address of stack memory}}
}