On 06/21/2013 03:38 PM, Andrew Sutton wrote:
+  tree parms = cp_parser_parameter_declaration_clause (parser);

Calling this will push the parameter declarations into the current binding level; you will want to add the begin_scope/leave_scope and pop_binding that cp_parser_direct_declarator does around its call to the above function.

+  if (req == error_mark_node)
+    cp_parser_abort_tentative_parse (parser);
+  else
+    cp_parser_commit_to_tentative_parse (parser);
+
+  // If that failed, then we must have a simple requirement.
+  if (req == error_mark_node)
+    req = cp_parser_simple_requirement (parser);

The usual pattern would be

if (!cp_parser_parse_definitely (parser))
  req = cp_parser_simple_requirement (parser);

+      type = cp_parser_type_id (parser);

Not cp_parser_trailing_type_id?

Jason

Reply via email to