aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-13 21:11:15 +0000
committerChris Lattner <sabre@nondot.org>2009-01-13 21:11:15 +0000
commit5cd9d6daf3acd4cc87fecebd81d9495b9e4ba9cd (patch)
tree6af5a0d37100ac66d076e5c305d50c19850b1158
parent25d4a8fc3bdef9de2cd94a1a73c4e38ff6399340 (diff)
use a slightly more sensible position for an array ref's "getExprLoc"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62182 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/Expr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h
index d1aac8100d..2f2d4a6e39 100644
--- a/include/clang/AST/Expr.h
+++ b/include/clang/AST/Expr.h
@@ -728,7 +728,7 @@ public:
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;