diff options
author | John McCall <rjmccall@apple.com> | 2012-04-04 02:40:27 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2012-04-04 02:40:27 +0000 |
commit | b73bc9af60367d5a0b11764082e561fade422194 (patch) | |
tree | 14bfbabfb70fa655a7858457e24c96d1ec465537 /clang/lib/Sema | |
parent | a995a47e38fae9fa60164c6692d8f5c4922fc175 (diff) | |
download | bcm5719-llvm-b73bc9af60367d5a0b11764082e561fade422194.tar.gz bcm5719-llvm-b73bc9af60367d5a0b11764082e561fade422194.zip |
When computing the conversion sequence in overload resolution
for converting an empty list to a scalar, be sure to initialize
the source and destination types so that comparison of conversion
sequences will work in case there are multiple viable candidates.
llvm-svn: 153993
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index 27b04a74272..7afa39f3f3b 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -4433,6 +4433,8 @@ TryListConversion(Sema &S, InitListExpr *From, QualType ToType, else if (NumInits == 0) { Result.setStandard(); Result.Standard.setAsIdentityConversion(); + Result.Standard.setFromType(ToType); + Result.Standard.setAllToTypes(ToType); } Result.setListInitializationSequence(); return Result; |