Check the return type of binary operators and the arrow operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84043 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 5a40fc8..8a67d47 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -1993,7 +1993,7 @@
CTypes.insert(Context.getCanonicalType(BaseType));
while (BaseType->isRecordType()) {
- Base = BuildOverloadedArrowExpr(S, move(Base), BaseExpr->getExprLoc());
+ Base = BuildOverloadedArrowExpr(S, move(Base), OpLoc);
BaseExpr = (Expr*)Base.get();
if (BaseExpr == NULL)
return ExprError();