[cfe-commits] r58470 - /cfe/trunk/test/Analysis/stack-addr-ps.c
Ted Kremenek
kremenek at apple.com
Thu Oct 30 16:17:05 PDT 2008
Author: kremenek
Date: Thu Oct 30 18:17:05 2008
New Revision: 58470
URL: http://llvm.org/viewvc/llvm-project?rev=58470&view=rev
Log:
Add missing "expected warning".
Add compound literal with empty initializer (just to test the analyzer handles it).
Modified:
cfe/trunk/test/Analysis/stack-addr-ps.c
Modified: cfe/trunk/test/Analysis/stack-addr-ps.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/stack-addr-ps.c?rev=58470&r1=58469&r2=58470&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/stack-addr-ps.c (original)
+++ cfe/trunk/test/Analysis/stack-addr-ps.c Thu Oct 30 18:17:05 2008
@@ -21,8 +21,9 @@
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}}
}
More information about the cfe-commits
mailing list