Modified ArraySubscriptExpr to have accessors getLHS and getRHS in addition
to getBase and getIdx. getBase and getIdx now return a "normalized" view
of the expression (e.g., always "A[4]" instead of possibly "4[A]"). getLHS
and getRHS return the expressions with syntactic fidelity to the original
source code.
Also modified client code of ArraySubscriptExpr, including the AST dumper
and pretty printer, the return-stack value checker, and the LLVM code
generator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41180 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/StmtDumper.cpp b/AST/StmtDumper.cpp
index 9f82b0e..7b0d794 100644
--- a/AST/StmtDumper.cpp
+++ b/AST/StmtDumper.cpp
@@ -374,9 +374,9 @@
void StmtDumper::VisitArraySubscriptExpr(ArraySubscriptExpr *Node) {
DumpExpr(Node);
fprintf(F, "\n");
- DumpSubTree(Node->getBase());
+ DumpSubTree(Node->getLHS());
fprintf(F, "\n");
- DumpSubTree(Node->getIdx());
+ DumpSubTree(Node->getRHS());
fprintf(F, ")");
}