summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/constructor-init-reference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/constructor-init-reference.cpp')
-rw-r--r--clang/test/CodeGenCXX/constructor-init-reference.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/constructor-init-reference.cpp b/clang/test/CodeGenCXX/constructor-init-reference.cpp
new file mode 100644
index 0000000..5e75159
--- /dev/null
+++ b/clang/test/CodeGenCXX/constructor-init-reference.cpp
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -emit-llvm -o - %s | grep "store i32\* @x, i32\*\*"
+
+int x;
+struct A {
+ int& y;
+ A() : y(x) {}
+};
+A z;
+