aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-12-09 06:48:56 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-12-09 06:48:56 +0000
commit2801d9afa1fabbc99b7c1ad9f2f3df0e0b24adb1 (patch)
treee121a4e4db13d808dc836dbb7f1ae8c2e1de610c /lib/Sema/SemaOverload.cpp
parentafee0ff915b87f92e8c07c72d31c3165aacf6fa8 (diff)
Fix overload resolution for the initialization of a multi-dimensional
array from a braced-init-list. There seems to be a core wording wart here (it suggests we should be testing whether the elements of the init list are implicitly convertible to the array element type, not whether there is an implicit conversion sequence) but our prior behavior appears to be a bug, not a deliberate effort to implement the standard as written. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169690 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r--lib/Sema/SemaOverload.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index 57e74d06b9..cfbd33c0d3 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -4377,7 +4377,7 @@ TryListConversion(Sema &S, InitListExpr *From, QualType ToType,
bool toStdInitializerList = false;
QualType X;
if (ToType->isArrayType())
- X = S.Context.getBaseElementType(ToType);
+ X = S.Context.getAsArrayType(ToType)->getElementType();
else
toStdInitializerList = S.isStdInitializerList(ToType, &X);
if (!X.isNull()) {