A conversion operator in a base class shouldn't hide another conversion operator
in the same class, even if they convert to the same type. Fixes PR12712.
llvm-svn: 156247
diff --git a/clang/test/SemaCXX/conversion-function.cpp b/clang/test/SemaCXX/conversion-function.cpp
index a7a1782..6fca050 100644
--- a/clang/test/SemaCXX/conversion-function.cpp
+++ b/clang/test/SemaCXX/conversion-function.cpp
@@ -392,3 +392,14 @@
A& a4 = (A&)c;
}
}
+
+namespace PR12712 {
+ struct A {};
+ struct B {
+ operator A();
+ operator A() const;
+ };
+ struct C : B {};
+
+ A f(const C c) { return c; }
+}