aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaInit.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
commit32509f1e60451d86e9fbc473b6e853ba10b5fd1e (patch)
treefb5508ad78d02b807ee47b267d03ec278ad4cead /lib/Sema/SemaInit.cpp
parent02ae32ae110eeb1ef785bf5ad9cdce1c001a5fa1 (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/SemaInit.cpp')
-rw-r--r--lib/Sema/SemaInit.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index c24f8aa5e2..3f91bb53e8 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -3795,17 +3795,14 @@ InitializationSequence::InitializationSequence(Sema &S,
setSequenceKind(NormalSequence);
for (unsigned I = 0; I != NumArgs; ++I)
- if (const BuiltinType *PlaceholderTy
- = Args[I]->getType()->getAsPlaceholderType()) {
+ if (Args[I]->getType()->isNonOverloadPlaceholderType()) {
// FIXME: should we be doing this here?
- if (PlaceholderTy->getKind() != BuiltinType::Overload) {
- ExprResult result = S.CheckPlaceholderExpr(Args[I]);
- if (result.isInvalid()) {
- SetFailed(FK_PlaceholderType);
- return;
- }
- Args[I] = result.take();
+ ExprResult result = S.CheckPlaceholderExpr(Args[I]);
+ if (result.isInvalid()) {
+ SetFailed(FK_PlaceholderType);
+ return;
}
+ Args[I] = result.take();
}