From 1d72e96f53abe39dfa4cefce338d2886a9ae0ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez?= Date: Thu, 26 Apr 2012 07:14:01 +0000 Subject: tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Fix comment. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2012-04-26 Manuel López-Ibáñez * tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Fix comment. Delete unused parameter first_exp_point_map. (virt_loc_aware_diagnostic_finalizer): Update call. libcpp/ * line-map.c (linemap_resolve_location): Synchronize comments with those in line-map.h. * include/line-map.h (linemap_resolve_location): Fix spelling in comment. From-SVN: r186860 --- gcc/tree-diagnostic.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'gcc/tree-diagnostic.c') diff --git a/gcc/tree-diagnostic.c b/gcc/tree-diagnostic.c index c811fe9..48c7800 100644 --- a/gcc/tree-diagnostic.c +++ b/gcc/tree-diagnostic.c @@ -95,23 +95,18 @@ DEF_VEC_ALLOC_O (loc_map_pair, heap); test.c:5:3: note: expanded from here test.c:5:14: note: in expansion of macro 'SHIFTL' test.c:8:3: note: expanded from here - test.c:8:3: note: in expansion of macro 'MULT2' + test.c:8:3: note: in expansion of macro 'MULT' test.c:13:3: note: expanded from here The part that goes from the third to the eighth line of this diagnostic (the lines containing the 'note:' string) is called the unwound macro expansion trace. That's the part generated by this - function. - - If FIRST_EXP_POINT_MAP is non-null, *FIRST_EXP_POINT_MAP is set to - the map of the location in the source that first triggered the - macro expansion. This must be an ordinary map. */ + function. */ static void maybe_unwind_expanded_macro_loc (diagnostic_context *context, diagnostic_info *diagnostic, - source_location where, - const struct line_map **first_exp_point_map) + source_location where) { const struct line_map *map; VEC(loc_map_pair,heap) *loc_vec = NULL; @@ -146,8 +141,8 @@ maybe_unwind_expanded_macro_loc (diagnostic_context *context, where = linemap_unwind_toward_expansion (line_table, where, &map); } while (linemap_macro_expansion_map_p (map)); - if (first_exp_point_map) - *first_exp_point_map = map; + /* Now map is set to the map of the location in the source that + first triggered the macro expansion. This must be an ordinary map. */ /* Walk LOC_VEC and print the macro expansion trace, unless the first macro which expansion triggered this trace was expanded @@ -227,8 +222,7 @@ virt_loc_aware_diagnostic_finalizer (diagnostic_context *context, diagnostic_info *diagnostic) { maybe_unwind_expanded_macro_loc (context, diagnostic, - diagnostic->location, - NULL); + diagnostic->location); } /* Default tree printer. Handles declarations only. */ -- cgit v1.1