diff options
author | John McCall <rjmccall@apple.com> | 2011-11-15 01:35:18 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-11-15 01:35:18 +0000 |
commit | 32509f1e60451d86e9fbc473b6e853ba10b5fd1e (patch) | |
tree | fb5508ad78d02b807ee47b267d03ec278ad4cead /lib/Sema/SemaExpr.cpp | |
parent | 02ae32ae110eeb1ef785bf5ad9cdce1c001a5fa1 (diff) |
Resolve placeholder expressions before trying to deduce
'auto'. Introduce a convenience method to make this a bit
easier, and use it elsewhere.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144605 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 4f2f8c4eaf..cfa5feabb3 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -3976,10 +3976,7 @@ Sema::ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, // Immediately handle non-overload placeholders. Overloads can be // resolved contextually, but everything else here can't. for (unsigned I = 0; I != NumInit; ++I) { - if (const BuiltinType *pty - = InitList[I]->getType()->getAsPlaceholderType()) { - if (pty->getKind() == BuiltinType::Overload) continue; - + if (InitList[I]->getType()->isNonOverloadPlaceholderType()) { ExprResult result = CheckPlaceholderExpr(InitList[I]); // Ignore failures; dropping the entire initializer list because |