summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-11-15 01:35:18 +0000
committerJohn McCall <rjmccall@apple.com>2011-11-15 01:35:18 +0000
commitd5c98ae69523846a921813559533f0175e680f9a (patch)
tree2fb27896c7b91c619a542fed39d4c7cea9750a6b /clang/lib/Sema/SemaExpr.cpp
parent9957e8b7895406301d4545fb2f5749f486020a94 (diff)
downloadbcm5719-llvm-d5c98ae69523846a921813559533f0175e680f9a.tar.gz
bcm5719-llvm-d5c98ae69523846a921813559533f0175e680f9a.zip
Resolve placeholder expressions before trying to deduce
'auto'. Introduce a convenience method to make this a bit easier, and use it elsewhere. llvm-svn: 144605
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 4f2f8c4eafd..cfa5feabb39 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud