diff options
Diffstat (limited to 'contrib/llvm-project/clang/lib/AST/ExprObjC.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/AST/ExprObjC.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/contrib/llvm-project/clang/lib/AST/ExprObjC.cpp b/contrib/llvm-project/clang/lib/AST/ExprObjC.cpp index 7d932c8b059d..a3222c2da24f 100644 --- a/contrib/llvm-project/clang/lib/AST/ExprObjC.cpp +++ b/contrib/llvm-project/clang/lib/AST/ExprObjC.cpp @@ -271,20 +271,7 @@ QualType ObjCMessageExpr::getCallReturnType(ASTContext &Ctx) const { } return QT; } - - // Expression type might be different from an expected call return type, - // as expression type would never be a reference even if call returns a - // reference. Reconstruct the original expression type. - QualType QT = getType(); - switch (getValueKind()) { - case VK_LValue: - return Ctx.getLValueReferenceType(QT); - case VK_XValue: - return Ctx.getRValueReferenceType(QT); - case VK_PRValue: - return QT; - } - llvm_unreachable("Unsupported ExprValueKind"); + return Ctx.getReferenceQualifiedType(this); } SourceRange ObjCMessageExpr::getReceiverRange() const { |