aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-05-23 22:10:15 +0000
committerDouglas Gregor <dgregor@apple.com>2010-05-23 22:10:15 +0000
commitae65f4bd588f5f5ec26ed188830bf6d14800b09e (patch)
tree5fabb6f523c73c4fe2e72b5d241ea3fc1d3f7ce0 /test
parent88623ade9599d2a2f4e21e80bce00fb4cb9e7d5f (diff)
An identity conversion is better than any non-identity
conversion. Fixes PR7095. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104476 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/SemaCXX/overload-call.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaCXX/overload-call.cpp b/test/SemaCXX/overload-call.cpp
index 79c74cec49..9618ea2249 100644
--- a/test/SemaCXX/overload-call.cpp
+++ b/test/SemaCXX/overload-call.cpp
@@ -430,3 +430,17 @@ namespace PR6177 {
void g() { f(""); } // expected-error{{volatile lvalue reference to type 'bool const volatile' cannot bind to a value of unrelated type 'char const [1]'}}
}
+
+namespace PR7095 {
+ struct X { };
+
+ struct Y {
+ operator const X*();
+
+ private:
+ operator X*();
+ };
+
+ void f(const X *);
+ void g(Y y) { f(y); }
+}