diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-05-06 00:04:32 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-05-06 00:04:32 +0000 |
commit | f108c63ccc576fe6a3ca08399dbcec574b089ea8 (patch) | |
tree | db3a3b60d2983c976505fdd1865204598b4efcdb /test/SemaCXX/conversion-function.cpp | |
parent | 86b32fd702d794bb655c59a1238bf7422869f506 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156247 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/conversion-function.cpp')
-rw-r--r-- | test/SemaCXX/conversion-function.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/conversion-function.cpp b/test/SemaCXX/conversion-function.cpp index a7a178244c..6fca0503ba 100644 --- a/test/SemaCXX/conversion-function.cpp +++ b/test/SemaCXX/conversion-function.cpp @@ -392,3 +392,14 @@ namespace PR8800 { 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; } +} |