[cfe-commits] r62182 - /cfe/trunk/include/clang/AST/Expr.h

Chris Lattner sabre at nondot.org
Tue Jan 13 13:11:15 PST 2009


Author: lattner
Date: Tue Jan 13 15:11:15 2009
New Revision: 62182

URL: http://llvm.org/viewvc/llvm-project?rev=62182&view=rev
Log:
use a slightly more sensible position for an array ref's "getExprLoc"

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=62182&r1=62181&r2=62182&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Tue Jan 13 15:11:15 2009
@@ -728,7 +728,7 @@
     return SourceRange(getLHS()->getLocStart(), RBracketLoc);
   }
   
-  virtual SourceLocation getExprLoc() const { return RBracketLoc; }
+  virtual SourceLocation getExprLoc() const { return getBase()->getExprLoc(); }
 
   static bool classof(const Stmt *T) { 
     return T->getStmtClass() == ArraySubscriptExprClass; 





More information about the cfe-commits mailing list