llvm-gcc-4.2-2.9/gcc/cp/parser.c
/* Save the tokens that make up the body of a member function defined
   in a class-specifier.  The DECL_SPECIFIERS and DECLARATOR have
   already been parsed.  The ATTRIBUTES are any GNU "__attribute__"
   specifiers applied to the declaration.  Returns the FUNCTION_DECL
   for the member function.  */
Save the tokens that make up the body of a member function defined
in a class-specifier.  The DECL_SPECIFIERS and DECLARATOR have
already been parsed.  The ATTRIBUTES are any GNU "__attribute__"
specifiers applied to the declaration.  Returns the FUNCTION_DECL
for the member function.
Save the tokens that make up the body of a member function defined in a class - specifier . The DECL_SPECIFIERS and DECLARATOR have already been parsed . The ATTRIBUTES are any GNU " __attribute__ " specifiers applied to the declaration . Returns the FUNCTION_DECL for the member function .
static tree
cp_parser_save_member_function_body (cp_parser* parser,
				     cp_decl_specifier_seq *decl_specifiers,
				     cp_declarator *declarator,
				     tree attributes)
{
  cp_token *first;
  cp_token *last;
  tree fn;
  fn = start_method (decl_specifiers, declarator, attributes);
  if (fn == error_mark_node)
    {
      if (cp_parser_token_starts_function_definition_p
	  (cp_lexer_peek_token (parser->lexer)))
	cp_parser_skip_to_end_of_block_or_statement (parser);
      return error_mark_node;
    }
  cp_parser_save_default_args (parser, fn);
  first = parser->lexer->next_token;
  cp_parser_cache_group (parser, CPP_CLOSE_BRACE, 0);
  while (cp_lexer_next_token_is_keyword (parser->lexer, RID_CATCH))
    cp_parser_cache_group (parser, CPP_CLOSE_BRACE, 0);
  last = parser->lexer->next_token;
  DECL_PENDING_INLINE_INFO (fn) = cp_token_cache_new (first, last);
  DECL_PENDING_INLINE_P (fn) = 1;
  DECL_INITIALIZED_IN_CLASS_P (fn) = 1;
  finish_method (fn);
  TREE_VALUE (parser->unparsed_functions_queues)
    = tree_cons (NULL_TREE, fn,
		 TREE_VALUE (parser->unparsed_functions_queues));
  return fn;
}
static tree cp_parser_save_member_function_body ( cp_parser * parser , cp_decl_specifier_seq * decl_specifiers , cp_declarator * declarator , tree attributes ) { cp_token * first ; cp_token * last ; tree fn ; fn = start_method ( decl_specifiers , declarator , attributes ) ; if ( fn == error_mark_node ) { if ( cp_parser_token_starts_function_definition_p ( cp_lexer_peek_token ( parser -> lexer ) ) ) cp_parser_skip_to_end_of_block_or_statement ( parser ) ; return error_mark_node ; } cp_parser_save_default_args ( parser , fn ) ; first = parser -> lexer -> next_token ; cp_parser_cache_group ( parser , CPP_CLOSE_BRACE , 0 ) ; while ( cp_lexer_next_token_is_keyword ( parser -> lexer , RID_CATCH ) ) cp_parser_cache_group ( parser , CPP_CLOSE_BRACE , 0 ) ; last = parser -> lexer -> next_token ; DECL_PENDING_INLINE_INFO ( fn ) = cp_token_cache_new ( first , last ) ; DECL_PENDING_INLINE_P ( fn ) = 1 ; DECL_INITIALIZED_IN_CLASS_P ( fn ) = 1 ; finish_method ( fn ) ; TREE_VALUE ( parser -> unparsed_functions_queues ) = tree_cons ( NULL_TREE , fn , TREE_VALUE ( parser -> unparsed_functions_queues ) ) ; return fn ; }
Save the tokens that make up the body of a member function defined
in a class-specifier.
Save the tokens that make up the body of a member function defined in a class - specifier .
/* Create the function-declaration.  */ /* If something went badly wrong, bail out now.  */ /* If there's a function-body, skip it.  */ /* Remember it, if there default args to post process.  */ /* Save away the tokens that make up the body of the
     function.  */ /*depth=*/ /* Handle function try blocks.  */ /*depth=*/ /* Save away the inline definition; we will process it when the
     class is complete.  */ /* We need to know that this was defined in the class, so that
     friend templates are handled correctly.  */ /* We're done with the inline definition.  */ /* Add FN to the queue of functions to be parsed later.  */