[cfe-commits] r51507 - /cfe/trunk/include/clang/AST/Expr.h
Steve Naroff
snaroff at apple.com
Fri May 23 15:00:37 PDT 2008
Author: snaroff
Date: Fri May 23 17:00:37 2008
New Revision: 51507
URL: http://llvm.org/viewvc/llvm-project?rev=51507&view=rev
Log:
Fix range info for explicit ivar refs.
Modified:
cfe/trunk/include/clang/AST/Expr.h
Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=51507&r1=51506&r2=51507&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Fri May 23 17:00:37 2008
@@ -1533,7 +1533,10 @@
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; }
More information about the cfe-commits
mailing list