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 | e8c8cd2a58b609b34359623322d9923737bd64c7 (patch) | |
| tree | 2b358346838c4454abe7998d15fbb91667e20755 /clang/lib/Sema/SemaOverload.cpp | |
| parent | e77d17b73afc18411c4e60c58d74b3c1f5152628 (diff) | |
| download | bcm5719-llvm-e8c8cd2a58b609b34359623322d9923737bd64c7.tar.gz bcm5719-llvm-e8c8cd2a58b609b34359623322d9923737bd64c7.zip | |
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.
llvm-svn: 93365
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index ffcf8d4609a..5abca998968 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/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); |

