aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/empty-struct-init-list.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/empty-struct-init-list.cpp')
-rw-r--r--test/CodeGenCXX/empty-struct-init-list.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGenCXX/empty-struct-init-list.cpp b/test/CodeGenCXX/empty-struct-init-list.cpp
new file mode 100644
index 000000000000..33f52ba7032d
--- /dev/null
+++ b/test/CodeGenCXX/empty-struct-init-list.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -std=c++11 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++14 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++17 -emit-llvm -o - %s | FileCheck %s
+
+// CHECK: struct.a
+typedef struct { } a;
+typedef struct {
+ a b[];
+} c;
+
+// CHECK: {{(dso_local )?}}global %struct.c{{.*}}zeroinitializer
+c d{ };