aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-07-13 22:53:21 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-07-13 22:53:21 +0000
commit87c1f1f7c400deb2eb40d4599a40006072fb948c (patch)
tree32b90473a01a202e41f4be5d31304cbe020c8f9c /lib/Sema/SemaOverload.cpp
parentb8981df0ed2886dfa221f2fad6d86872c39d3549 (diff)
PR8800: When building a conversion to A& using a member operatorA&(), do not require A to be a complete type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135101 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r--lib/Sema/SemaOverload.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index b6045123fe..b95b886efb 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -4535,19 +4535,19 @@ Sema::AddConversionCandidate(CXXConversionDecl *Conversion,
CK_FunctionToPointerDecay,
&ConversionRef, VK_RValue);
- QualType CallResultType
- = Conversion->getConversionType().getNonLValueExprType(Context);
- if (RequireCompleteType(From->getLocStart(), CallResultType, 0)) {
+ QualType ConversionType = Conversion->getConversionType();
+ if (RequireCompleteType(From->getLocStart(), ConversionType, 0)) {
Candidate.Viable = false;
Candidate.FailureKind = ovl_fail_bad_final_conversion;
return;
}
- ExprValueKind VK = Expr::getValueKindForType(Conversion->getConversionType());
+ ExprValueKind VK = Expr::getValueKindForType(ConversionType);
// Note that it is safe to allocate CallExpr on the stack here because
// there are 0 arguments (i.e., nothing is allocated using ASTContext's
// allocator).
+ QualType CallResultType = ConversionType.getNonLValueExprType(Context);
CallExpr Call(Context, &ConversionFn, 0, 0, CallResultType, VK,
From->getLocStart());
ImplicitConversionSequence ICS =