diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-10-07 18:12:21 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-10-07 18:12:21 +0000 |
commit | ed76f4474fcadacdfeeacacc44bbadb1d4faa6ac (patch) | |
tree | cb296ba9a5bfc844f483bfaebf1e375e292d6491 /lib/Sema/SemaExpr.cpp | |
parent | 3552f66f8a42021811e8ab9d4a9dfd337df2f969 (diff) |
Start and end location of a property-dot syntax expression
must match start and end location of the expression
as expected by the rewriter client. Fixes // rdar: // 8520727
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115934 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 9 |
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)); } } |