diff options
author | John McCall <rjmccall@apple.com> | 2010-01-13 22:30:33 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-01-13 22:30:33 +0000 |
commit | cefd3ada97faf5a759dac4705900053d3aa071e9 (patch) | |
tree | 5e98e47b6952e5feff3e9df71237d3f28f9bc0de /lib/Sema | |
parent | 64f7e258e9c43eefb7f82dfcd600abeed48dc395 (diff) |
Don't report ambiguities in the user-defined conversion if we weren't supposed
to be considering user-defined conversions in the first place.
Doug, please review; I'm not sure what we should be doing if we see a real
ambiguity in selecting a copy constructor when otherwise suppressing
user-defined conversions.
Fixes PR6014.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93365 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index ffcf8d4609..5abca99896 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -493,7 +493,7 @@ Sema::TryImplicitConversion(Expr* From, QualType ToType, ICS.setBad(); ICS.Bad.init(BadConversionSequence::suppressed_user, From, ToType); } - } else if (UserDefResult == OR_Ambiguous) { + } else if (UserDefResult == OR_Ambiguous && !SuppressUserConversions) { ICS.setAmbiguous(); ICS.Ambiguous.setFromType(From->getType()); ICS.Ambiguous.setToType(ToType); |