summaryrefslogtreecommitdiffstats
path: root/clang
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
commit6675aed5597e11b4e3378b0e680b797c6ca06992 (patch)
treedc5f1dcdf475b8ef5efca5fa2692995d6215c2fe /clang
parent3ff18a5119d63cc97a478c3c069bef10c2f95837 (diff)
downloadbcm5719-llvm-6675aed5597e11b4e3378b0e680b797c6ca06992.tar.gz
bcm5719-llvm-6675aed5597e11b4e3378b0e680b797c6ca06992.zip
use a slightly more sensible position for an array ref's "getExprLoc"
llvm-svn: 62182
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/AST/Expr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h
index d1aac8100d9..2f2d4a6e39a 100644
--- a/clang/include/clang/AST/Expr.h
+++ b/clang/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;
OpenPOWER on IntegriCloud