summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/conditional-expr.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-09-07 02:14:33 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-09-07 02:14:33 +0000
commit7c2bcc9eb038df5fa238276749a88f289e9861ae (patch)
treefec04fe63bc882c0526a4301ac9fede9009c8656 /clang/test/SemaCXX/conditional-expr.cpp
parentc1d527d3d832cac86eb9461dcef978011ef8caeb (diff)
downloadbcm5719-llvm-7c2bcc9eb038df5fa238276749a88f289e9861ae.tar.gz
bcm5719-llvm-7c2bcc9eb038df5fa238276749a88f289e9861ae.zip
Fix clang's handling of the copy performed in the second phase of class
copy-initialization. We previously got this wrong in a couple of ways: - we only looked for copy / move constructors and constructor templates for this copy, and thus would fail to copy in cases where doing so should use some other constructor (but see core issue 670), - we mishandled the special case for disabling user-defined conversions that blocks infinite recursion through repeated application of a copy constructor (applying it in slightly too many cases) -- though as far as I can tell, this does not ever actually affect the result of overload resolution, and - we misapplied the special-case rules for constructors taking a parameter whose type is a (reference to) the same class type by incorrectly assuming that only happens for copy/move constructors (it also happens for constructors instantiated from templates and those inherited from base classes). These changes should only affect strange corner cases (for instance, where the copy constructor exists but has a non-const-qualified parameter type), so for the most part it only causes us to produce more 'candidate' notes, but see the test changes for other cases whose behavior is affected. llvm-svn: 280776
Diffstat (limited to 'clang/test/SemaCXX/conditional-expr.cpp')
-rw-r--r--clang/test/SemaCXX/conditional-expr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/conditional-expr.cpp b/clang/test/SemaCXX/conditional-expr.cpp
index c12efc0be7e..5025990cfd3 100644
--- a/clang/test/SemaCXX/conditional-expr.cpp
+++ b/clang/test/SemaCXX/conditional-expr.cpp
@@ -262,7 +262,7 @@ namespace PR6757 {
struct Foo2 { };
struct Foo3 {
- Foo3();
+ Foo3(); // expected-note{{requires 0 arguments}}
Foo3(Foo3&); // expected-note{{would lose const qualifier}}
};
OpenPOWER on IntegriCloud