change all expression and statement pointers to be const (#449)

* change all expression and statement pointers to be const

* const in paren tests
This commit is contained in:
Jeremy G. Siek authored and GitHub committed 2021-04-19 21:47:19 -04:00
1 parent 153d92b390
commit 34f1a03f7b
21 files changed
+258 -229

No files matched your search

+3 -3
View File
@@ -59,7 +59,7 @@ void PrintActList(Stack<Action*> ls, std::ostream& out) {
}
}
auto MakeExpAct(Expression* e) -> Action* {
auto MakeExpAct(const Expression* e) -> Action* {
auto* act = new Action();
act->tag = ActionKind::ExpressionAction;
act->u.exp = e;
@@ -67,7 +67,7 @@ auto MakeExpAct(Expression* e) -> Action* {
return act;
}
auto MakeLvalAct(Expression* e) -> Action* {
auto MakeLvalAct(const Expression* e) -> Action* {
auto* act = new Action();
act->tag = ActionKind::LValAction;
act->u.exp = e;
@@ -75,7 +75,7 @@ auto MakeLvalAct(Expression* e) -> Action* {
return act;
}
auto MakeStmtAct(Statement* s) -> Action* {
auto MakeStmtAct(const Statement* s) -> Action* {
auto* act = new Action();
act->tag = ActionKind::StatementAction;
act->u.stmt = s;