diff options
author | Steve Naroff <snaroff@apple.com> | 2008-05-23 22:00:37 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-05-23 22:00:37 +0000 |
commit | 8bf3b1d0e75da8b15bc331ebeb44f34b689f03ad (patch) | |
tree | 8ab83c9228674362fdafd5fe55514b36d3d386ba | |
parent | 2d05c088407596c0ddefd023c89ba872220724e2 (diff) |
Fix range info for explicit ivar refs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51507 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/Expr.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index 9760b3652f..0b16732ef6 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -1533,7 +1533,10 @@ public: ObjCIvarDecl *getDecl() { return D; } const ObjCIvarDecl *getDecl() const { return D; } - virtual SourceRange getSourceRange() const { return SourceRange(Loc); } + virtual SourceRange getSourceRange() const { + return isFreeIvar() ? SourceRange(Loc) + : SourceRange(getBase()->getLocStart(), Loc); + } const Expr *getBase() const { return Base; } Expr *getBase() { return Base; } void setBase(Expr * base) { Base = base; } |