Make C++ temporary-related expressions provide proper source-range information.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82665 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/references.cpp b/test/SemaCXX/references.cpp
index 9067a86..e03abf4 100644
--- a/test/SemaCXX/references.cpp
+++ b/test/SemaCXX/references.cpp
@@ -87,3 +87,18 @@
typedef intref const intref_c; // okay. FIXME: how do we verify that this is the same type as intref?
}
+
+
+class string {
+ char *Data;
+ unsigned Length;
+public:
+ string();
+ ~string();
+};
+
+string getInput();
+
+void test9() {
+ string &s = getInput(); // expected-error{{lvalue reference}}
+}