Teach CXXUnresolvedConstructExpr when it should be an
lvalue/xvalue/rvalue, rather than just (incorrectly) assuming it's an
lvalue. Fixes PR10285 / <rdar://problem/9743926>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134700 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/unresolved-construct.cpp b/test/SemaTemplate/unresolved-construct.cpp
new file mode 100644
index 0000000..0d1ba17
--- /dev/null
+++ b/test/SemaTemplate/unresolved-construct.cpp
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
+class A
+{
+public:
+ A() {}
+
+ template <class _F>
+ explicit A(_F&& __f);
+
+ A(A&&) {}
+ A& operator=(A&&) {return *this;}
+};
+
+template <class T>
+void f(T t)
+{
+ A a;
+ a = f(t);
+}