r_trivial = false;
}
+void ExpressionInliner::visit(TernaryExpression &ternary)
+{
+ visit_and_record(ternary.condition, ternary.oper, false);
+ visit_and_record(ternary.true_expr, ternary.oper, false);
+ visit_and_record(ternary.false_expr, ternary.oper, true);
+ r_oper = ternary.oper;
+ r_trivial = false;
+}
+
void ExpressionInliner::visit(FunctionCall &call)
{
TraversingVisitor::visit(call);
TraversingVisitor::visit(binary);
}
+void UnusedTypeRemover::visit(TernaryExpression &ternary)
+{
+ unused_nodes.erase(ternary.type);
+ TraversingVisitor::visit(ternary);
+}
+
void UnusedTypeRemover::visit(FunctionCall &call)
{
unused_nodes.erase(call.type);