diff options
author | David Malcolm <dmalcolm@redhat.com> | 2015-09-15 16:53:01 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2015-09-15 16:53:01 +0000 |
commit | 31bdd08a9d21a2fd7019bbd7b178c8911a7d2e41 (patch) | |
tree | b8835d6ddb4631db4e8d4f261d3286ea4d207b80 /gcc/c-family | |
parent | c55721c0dfee6d4de107cab63bfe0d1ebf5bdfde (diff) | |
download | gcc-31bdd08a9d21a2fd7019bbd7b178c8911a7d2e41.zip gcc-31bdd08a9d21a2fd7019bbd7b178c8911a7d2e41.tar.gz gcc-31bdd08a9d21a2fd7019bbd7b178c8911a7d2e41.tar.bz2 |
Change of location_get_source_line signature
gcc/ChangeLog:
* input.h (location_get_source_line): Drop "expanded_location"
param in favor of a file and line number.
* input.c (location_get_source_line): Likewise.
(dump_location_info): Update for change in signature of
location_get_source_line.
* diagnostic.c (diagnostic_print_caret_line): Likewise.
gcc/c-family/ChangeLog:
* c-format.c (location_from_offset): Update for change in
signature of location_get_source_line.
* c-indentation.c (get_visual_column): Likewise.
(line_contains_hash_if): Likewise.
From-SVN: r227800
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/c-family/c-format.c | 2 | ||||
-rw-r--r-- | gcc/c-family/c-indentation.c | 10 |
3 files changed, 11 insertions, 8 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 888c28f..140cda5 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,10 @@ +2015-09-15 David Malcolm <dmalcolm@redhat.com> + + * c-format.c (location_from_offset): Update for change in + signature of location_get_source_line. + * c-indentation.c (get_visual_column): Likewise. + (line_contains_hash_if): Likewise. + 2015-09-14 Marek Polacek <polacek@redhat.com> * c-opts.c (c_common_post_options): Set C++ standard earlier, before diff --git a/gcc/c-family/c-format.c b/gcc/c-family/c-format.c index 2940f92..ab58076 100644 --- a/gcc/c-family/c-format.c +++ b/gcc/c-family/c-format.c @@ -132,7 +132,7 @@ location_from_offset (location_t loc, int offset) expanded_location s = expand_location_to_spelling_point (loc); int line_width; - const char *line = location_get_source_line (s, &line_width); + const char *line = location_get_source_line (s.file, s.line, &line_width); if (line == NULL) return loc; line += s.column - 1 ; diff --git a/gcc/c-family/c-indentation.c b/gcc/c-family/c-indentation.c index fdfe0a9..dd35223 100644 --- a/gcc/c-family/c-indentation.c +++ b/gcc/c-family/c-indentation.c @@ -45,7 +45,8 @@ get_visual_column (expanded_location exploc, unsigned int *first_nws = NULL) { int line_len; - const char *line = location_get_source_line (exploc, &line_len); + const char *line = location_get_source_line (exploc.file, exploc.line, + &line_len); if (!line) return false; unsigned int vis_column = 0; @@ -84,13 +85,8 @@ get_visual_column (expanded_location exploc, static bool line_contains_hash_if (const char *file, int line_num) { - expanded_location exploc; - exploc.file = file; - exploc.line = line_num; - exploc.column = 1; - int line_len; - const char *line = location_get_source_line (exploc, &line_len); + const char *line = location_get_source_line (file, line_num, &line_len); if (!line) return false; |