diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-07-08 15:50:43 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-07-08 15:50:43 +0000 |
commit | 6336f296694bc233e899785973f58d4d608b39e8 (patch) | |
tree | 7e57b8e6e842ec076e10a18d69398aa4d406b782 /clang/test/SemaTemplate/unresolved-construct.cpp | |
parent | 2bb8b26aa836aea1f87ef5469aed325c7f202d37 (diff) | |
download | bcm5719-llvm-6336f296694bc233e899785973f58d4d608b39e8.tar.gz bcm5719-llvm-6336f296694bc233e899785973f58d4d608b39e8.zip |
Teach CXXUnresolvedConstructExpr when it should be an
lvalue/xvalue/rvalue, rather than just (incorrectly) assuming it's an
lvalue. Fixes PR10285 / <rdar://problem/9743926>.
llvm-svn: 134700
Diffstat (limited to 'clang/test/SemaTemplate/unresolved-construct.cpp')
-rw-r--r-- | clang/test/SemaTemplate/unresolved-construct.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/unresolved-construct.cpp b/clang/test/SemaTemplate/unresolved-construct.cpp new file mode 100644 index 00000000000..0d1ba17a017 --- /dev/null +++ b/clang/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); +} |