Commit 7523ca9b by Prathamesh Kulkarni Committed by Prathamesh Kulkarni

genmatch.c (parser::parse_for): Reject iterator if used as operator-list.

2015-05-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

	* genmatch.c (parser::parse_for): Reject iterator if used as operator-list.

From-SVN: r223610
parent b78be014
2015-05-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* genmatch.c (parser::parse_for): Reject iterator if used as operator-list.
2015-05-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 2015-05-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* genmatch.c (parser::parse_operator_list): Check for CPP_CLOSE_PAREN after end of id-list. * genmatch.c (parser::parse_operator_list): Check for CPP_CLOSE_PAREN after end of id-list.
......
...@@ -3329,8 +3329,13 @@ parser::parse_for (source_location) ...@@ -3329,8 +3329,13 @@ parser::parse_for (source_location)
"others with arity %d", oper, idb->nargs, arity); "others with arity %d", oper, idb->nargs, arity);
user_id *p = dyn_cast<user_id *> (idb); user_id *p = dyn_cast<user_id *> (idb);
if (p && p->is_oper_list) if (p)
op->substitutes.safe_splice (p->substitutes); {
if (p->is_oper_list)
op->substitutes.safe_splice (p->substitutes);
else
fatal_at (token, "iterator cannot be used as operator-list");
}
else else
op->substitutes.safe_push (idb); op->substitutes.safe_push (idb);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment