Commit b68b6828 by Per Bothner Committed by Per Bothner

cp-tree.h (struct cp_declarator): New id_loc field.


	* cp-tree.h (struct cp_declarator): New id_loc field.
	* cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
	location using c_lex_with_flags, instead of input_location.
	(cp_parser_direct_declarator): Set declarator's id_loc from
	cp_token's id_loc.

From-SVN: r96330
parent 6037d88d
2005-03-11 Per Bothner <per@bothner.com>
* cp-tree.h (struct cp_declarator): New id_loc field.
* cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
location using c_lex_with_flags, instead of input_location.
(cp_parser_direct_declarator): Set declarator's id_loc from
cp_token's id_loc.
2005-03-10 Jakub Jelinek <jakub@redhat.com>
PR c++/18384, c++/18327
......
......@@ -3597,6 +3597,7 @@ struct cp_declarator {
/* For all but cdk_id and cdk_error, the contained declarator. For
cdk_id and cdk_error, guaranteed to be NULL. */
cp_declarator *declarator;
location_t id_loc; /* Currently only set for cdk_id. */
union {
/* For identifiers. */
struct {
......
......@@ -380,8 +380,8 @@ cp_lexer_get_preprocessor_token (cp_lexer *lexer ATTRIBUTE_UNUSED ,
static int is_extern_c = 0;
/* Get a new token from the preprocessor. */
token->type = c_lex_with_flags (&token->value, &token->flags);
token->location = input_location;
token->type
= c_lex_with_flags (&token->value, &token->location, &token->flags);
token->in_system_header = in_system_header;
/* On some systems, some header files are surrounded by an
......@@ -11188,6 +11188,7 @@ cp_parser_direct_declarator (cp_parser* parser,
declarator = make_id_declarator (qualifying_scope,
unqualified_name);
declarator->id_loc = token->location;
if (unqualified_name)
{
tree class_type;
......
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