summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/reference-field.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-05-30 21:09:44 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-05-30 21:09:44 +0000
commit2be586108bb401019647791feca19ea03fd477ce (patch)
tree752f18ffc17cae9ae92ad8508c3e0a6ff55d5baa /test/CodeGenCXX/reference-field.cpp
parentff6b3d64c9f07155f1414411b8451d7bf8937c62 (diff)
Some small fixes for fields of reference type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72636 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/reference-field.cpp')
-rw-r--r--test/CodeGenCXX/reference-field.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/CodeGenCXX/reference-field.cpp b/test/CodeGenCXX/reference-field.cpp
new file mode 100644
index 0000000000..88d4c1f37e
--- /dev/null
+++ b/test/CodeGenCXX/reference-field.cpp
@@ -0,0 +1,6 @@
+// RUN: clang-cc -emit-llvm -o - %s -O2 | grep "@_Z1bv"
+
+// Make sure the call to b() doesn't get optimized out.
+extern struct x {char& x,y;}y;
+int b();
+int a() { if (!&y.x) b(); }