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/SemaPseudoObject.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/SemaPseudoObject.cpp')
-rw-r--r-- | lib/Sema/SemaPseudoObject.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/Sema/SemaPseudoObject.cpp b/lib/Sema/SemaPseudoObject.cpp index b70c4ca811..3bd671d10c 100644 --- a/lib/Sema/SemaPseudoObject.cpp +++ b/lib/Sema/SemaPseudoObject.cpp @@ -775,12 +775,10 @@ ExprResult Sema::checkPseudoObjectAssignment(Scope *S, SourceLocation opcLoc, VK_RValue, OK_Ordinary, opcLoc); // Filter out non-overload placeholder types in the RHS. - if (const BuiltinType *PTy = RHS->getType()->getAsPlaceholderType()) { - if (PTy->getKind() != BuiltinType::Overload) { - ExprResult result = CheckPlaceholderExpr(RHS); - if (result.isInvalid()) return ExprError(); - RHS = result.take(); - } + if (RHS->getType()->isNonOverloadPlaceholderType()) { + ExprResult result = CheckPlaceholderExpr(RHS); + if (result.isInvalid()) return ExprError(); + RHS = result.take(); } Expr *opaqueRef = LHS->IgnoreParens(); |