summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/references.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/references.cpp')
-rw-r--r--clang/test/CodeGenCXX/references.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/references.cpp b/clang/test/CodeGenCXX/references.cpp
new file mode 100644
index 00000000000..26d7157e1cb
--- /dev/null
+++ b/clang/test/CodeGenCXX/references.cpp
@@ -0,0 +1,16 @@
+// RUN: clang-cc -verify -emit-llvm -o %t %s
+
+void t1() {
+ extern int& a;
+ int b = a;
+}
+
+void t2(int& a) {
+ int b = a;
+}
+
+int g;
+int& gr = g;
+void t3() {
+ int b = gr;
+}
OpenPOWER on IntegriCloud