Fix a couple of bugs found by Neil Booth in the const-ness checking.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51361 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/init.c b/test/Sema/init.c
index 9085dbc..ffe678c 100644
--- a/test/Sema/init.c
+++ b/test/Sema/init.c
@@ -30,3 +30,15 @@
{"OPEN", 1, &cdiff_cmd_open }
};
+// PR2348
+static struct { int z; } s[2];
+int *t = &(*s).z;
+
+// PR2349
+short *a2(void)
+{
+ short int b;
+ static short *bp = &b; // expected-error {{initializer element is not constant}}
+
+ return bp;
+}