From d4a2b4862344454ab42a57a6a4b50461d1fa6f81 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 6 Apr 2010 17:13:07 -0400 Subject: parser.c (cp_parser_class_specifier): Set class location to that of IDENTIFIER_NODE instead of '{' when possible. * parser.c (cp_parser_class_specifier): Set class location to that of IDENTIFIER_NODE instead of '{' when possible. * semantics.c (begin_class_definition): Do not overide locations with less precise ones. From-SVN: r158030 --- gcc/cp/parser.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/cp/parser.c') diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 8a1bb9f..e25c280 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -16395,6 +16395,9 @@ cp_parser_class_head (cp_parser* parser, end_specialization (); --parser->num_template_parameter_lists; } + + if (type) + DECL_SOURCE_LOCATION (TYPE_NAME (type)) = type_start_token->location; *attributes_p = attributes; return type; } -- cgit v1.1