aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AST/Expr.cpp2
-rw-r--r--AST/Stmt.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/AST/Expr.cpp b/AST/Expr.cpp
index e71fcfa792..d5fd241e8a 100644
--- a/AST/Expr.cpp
+++ b/AST/Expr.cpp
@@ -231,6 +231,8 @@ bool Expr::hasLocalSideEffect() const {
}
case BinaryOperatorClass:
return cast<BinaryOperator>(this)->isAssignmentOp();
+ case CompoundAssignOperator:
+ return true;
case MemberExprClass:
case ArraySubscriptExprClass:
diff --git a/AST/Stmt.cpp b/AST/Stmt.cpp
index 58d0eb755c..4aca7a4991 100644
--- a/AST/Stmt.cpp
+++ b/AST/Stmt.cpp
@@ -21,7 +21,7 @@ static struct StmtClassNameTable {
const char *Name;
unsigned Counter;
unsigned Size;
-} StmtClassInfo[Stmt::lastExprConstant];
+} StmtClassInfo[Stmt::lastExprConstant+1];
static StmtClassNameTable &getStmtInfoTableEntry(Stmt::StmtClass E) {
static bool Initialized = false;
@@ -48,13 +48,13 @@ void Stmt::PrintStats() {
unsigned sum = 0;
fprintf(stderr, "*** Stmt/Expr Stats:\n");
- for (int i = 0; i != Stmt::lastExprConstant; i++) {
+ for (int i = 0; i != Stmt::lastExprConstant+1; i++) {
if (StmtClassInfo[i].Name == 0) continue;
sum += StmtClassInfo[i].Counter;
}
fprintf(stderr, " %d stmts/exprs total.\n", sum);
sum = 0;
- for (int i = 0; i != Stmt::lastExprConstant; i++) {
+ for (int i = 0; i != Stmt::lastExprConstant+1; i++) {
if (StmtClassInfo[i].Name == 0) continue;
fprintf(stderr, " %d %s, %d each (%d bytes)\n",
StmtClassInfo[i].Counter, StmtClassInfo[i].Name,