* 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
+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
/* 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 {
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
declarator = make_id_declarator (qualifying_scope,
unqualified_name);
+ declarator->id_loc = token->location;
if (unqualified_name)
{
tree class_type;