From d3f632eda7a81b00a08f9bd0b3eae1133cb5526b Mon Sep 17 00:00:00 2001 From: Steve Naroff Date: Sat, 25 Apr 2009 15:19:54 +0000 Subject: [PATCH] Fix indexing error in PCHStmtReader::VisitArraySubscriptExpr(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70046 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/PCHReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp index 26b915800a..edb17c764c 100644 --- a/lib/Frontend/PCHReader.cpp +++ b/lib/Frontend/PCHReader.cpp @@ -799,7 +799,7 @@ unsigned PCHStmtReader::VisitSizeOfAlignOfExpr(SizeOfAlignOfExpr *E) { unsigned PCHStmtReader::VisitArraySubscriptExpr(ArraySubscriptExpr *E) { VisitExpr(E); E->setLHS(cast(StmtStack[StmtStack.size() - 2])); - E->setRHS(cast(StmtStack[StmtStack.size() - 2])); + E->setRHS(cast(StmtStack[StmtStack.size() - 1])); E->setRBracketLoc(SourceLocation::getFromRawEncoding(Record[Idx++])); return 2; }