diff options
author | dmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-07-20 21:39:14 +0000 |
---|---|---|
committer | dmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-07-20 21:39:14 +0000 |
commit | 8d3ff4702a33cd7d9aef7ac993e936a16bfd63bc (patch) | |
tree | 702cb60181b1dcfe40bd02920c9fd5ef9833fc15 | |
parent | d9147f5183f9b777973af83ce7cf332fce36a523 (diff) |
libcpp: remove redundant parameter from rich_location::set_range
gcc/c-family/ChangeLog:
* c-common.c (c_cpp_error): Remove redundant "line_table"
parameter from call to rich_location::set_range.
(maybe_suggest_missing_token_insertion): Likewise.
gcc/ChangeLog:
* pretty-print.c (text_info::set_location): Remove redundant
"line_table" parameter from call to rich_location::set_range.
libcpp/ChangeLog:
* include/line-map.h (rich_location::set_range): Remove redundant
line_maps * parameter.
* line-map.c (rich_location::set_range): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262913 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-family/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-family/c-common.c | 4 | ||||
-rw-r--r-- | gcc/pretty-print.c | 2 | ||||
-rw-r--r-- | libcpp/ChangeLog | 6 | ||||
-rw-r--r-- | libcpp/include/line-map.h | 3 | ||||
-rw-r--r-- | libcpp/line-map.c | 4 |
7 files changed, 23 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1b4f28523c1..00c48d1bdaa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-07-20 David Malcolm <dmalcolm@redhat.com> + + * pretty-print.c (text_info::set_location): Remove redundant + "line_table" parameter from call to rich_location::set_range. + 2018-07-20 Martin Sebor <msebor@redhat.com> PR middle-end/82063 diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index de0ee67c6cb..0ae008bc2ca 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2018-07-20 David Malcolm <dmalcolm@redhat.com> + + * c-common.c (c_cpp_error): Remove redundant "line_table" + parameter from call to rich_location::set_range. + (maybe_suggest_missing_token_insertion): Likewise. + 2018-07-20 Martin Sebor <msebor@redhat.com> PR middle-end/82063 diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index f5e1111a772..422d668c294 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -6133,7 +6133,7 @@ c_cpp_error (cpp_reader *pfile ATTRIBUTE_UNUSED, int level, int reason, gcc_unreachable (); } if (done_lexing) - richloc->set_range (line_table, 0, input_location, true); + richloc->set_range (0, input_location, true); diagnostic_set_info_translated (&diagnostic, msg, ap, richloc, dlevel); diagnostic_override_option_index (&diagnostic, @@ -8174,7 +8174,7 @@ maybe_suggest_missing_token_insertion (rich_location *richloc, location_t hint_loc = hint->get_start_loc (); location_t old_loc = richloc->get_loc (); - richloc->set_range (line_table, 0, hint_loc, true); + richloc->set_range (0, hint_loc, true); richloc->add_range (old_loc, false); } } diff --git a/gcc/pretty-print.c b/gcc/pretty-print.c index df3ee811fd5..dc7791afa50 100644 --- a/gcc/pretty-print.c +++ b/gcc/pretty-print.c @@ -699,7 +699,7 @@ void text_info::set_location (unsigned int idx, location_t loc, bool show_caret_p) { gcc_checking_assert (m_richloc); - m_richloc->set_range (line_table, idx, loc, show_caret_p); + m_richloc->set_range (idx, loc, show_caret_p); } location_t diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index c57d546e608..c72804f2cb0 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,9 @@ +2018-07-20 David Malcolm <dmalcolm@redhat.com> + + * include/line-map.h (rich_location::set_range): Remove redundant + line_maps * parameter. + * line-map.c (rich_location::set_range): Likewise. + 2018-07-18 Bernd Edlinger <bernd.edlinger@hotmail.de> PR 69558 diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h index ba1750d3cf1..a4baa492a56 100644 --- a/libcpp/include/line-map.h +++ b/libcpp/include/line-map.h @@ -1639,8 +1639,7 @@ class rich_location add_range (source_location loc, bool show_caret_p); void - set_range (line_maps *set, unsigned int idx, source_location loc, - bool show_caret_p); + set_range (unsigned int idx, source_location loc, bool show_caret_p); unsigned int get_num_locations () const { return m_ranges.count (); } diff --git a/libcpp/line-map.c b/libcpp/line-map.c index 105102268cc..a1a765f14fd 100644 --- a/libcpp/line-map.c +++ b/libcpp/line-map.c @@ -2104,8 +2104,8 @@ rich_location::add_range (source_location loc, bool show_caret_p) - the "%C" and "%L" format codes in the Fortran frontend. */ void -rich_location::set_range (line_maps * /*set*/, unsigned int idx, - source_location loc, bool show_caret_p) +rich_location::set_range (unsigned int idx, source_location loc, + bool show_caret_p) { /* We can either overwrite an existing range, or add one exactly on the end of the array. */ |