Correctly handle constants that refer to enums.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46481 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/globalinit.c b/test/CodeGen/globalinit.c
index 13a9e93..f868feb 100644
--- a/test/CodeGen/globalinit.c
+++ b/test/CodeGen/globalinit.c
@@ -32,6 +32,12 @@
static _Bool booltest3 = 4;
}
-// Braces in a scalar
-int a = { 1 };
-int b = { 1, 2 };
+// Scalars in braces.
+static int a = { 1 };
+static int b = { 1, 2 };
+
+enum {
+ EnumA, EnumB
+};
+
+int c[] = { EnumA, EnumB };
diff --git a/test/CodeGen/init.c b/test/CodeGen/init.c
index 77a85fa..24f8874 100644
--- a/test/CodeGen/init.c
+++ b/test/CodeGen/init.c
@@ -1,7 +1,7 @@
// RUN: clang -emit-llvm %s
void f1()
{
- // Braces in a scalar
+ // Scalars in braces.
int a = { 1 };
int b = { 1, 2 };
-}
\ No newline at end of file
+}