aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema')
-rw-r--r--lib/Sema/SemaExpr.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index f6dc441bff..9a3cb442a7 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -3289,11 +3289,14 @@ Sema::LookupMemberExpr(LookupResult &R, Expr *&BaseExpr,
// Check the use of this method.
if (DiagnoseUseOfDecl(OMD, MemberLoc))
return ExprError();
-
+ // It is important that start and end position is the first character
+ // and last character position of the property-dot syntax expression.
+ SourceLocation MemberEndLoc = PP.getLocForEndOfToken(MemberLoc, 1);
return Owned(ObjCMessageExpr::Create(Context,
OMD->getSendResultType(),
- OpLoc, BaseExpr, Sel,
- OMD, NULL, 0, MemberLoc));
+ BaseExpr->getExprLoc(),
+ BaseExpr, Sel,
+ OMD, NULL, 0, MemberEndLoc));
}
}