diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2012-04-26 07:14:01 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2012-04-26 07:14:01 +0000 |
commit | 1d72e96f53abe39dfa4cefce338d2886a9ae0ea1 (patch) | |
tree | d3312d2f0112387a0c5c243b879b69fbce449e0f /gcc/tree-diagnostic.c | |
parent | c7121189c39bdda5e94360cf03002c2b2fe865cd (diff) | |
download | gcc-1d72e96f53abe39dfa4cefce338d2886a9ae0ea1.zip gcc-1d72e96f53abe39dfa4cefce338d2886a9ae0ea1.tar.gz gcc-1d72e96f53abe39dfa4cefce338d2886a9ae0ea1.tar.bz2 |
tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Fix comment.
2012-04-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
* 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
Diffstat (limited to 'gcc/tree-diagnostic.c')
-rw-r--r-- | gcc/tree-diagnostic.c | 18 |
1 files changed, 6 insertions, 12 deletions
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. */ |