aboutsummaryrefslogtreecommitdiff
path: root/gcc/input.h
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2016-09-02 18:00:57 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2016-09-02 18:00:57 +0000
commitc65236d682789b6a33510aaebfd7e83fe0f30d1a (patch)
tree796b73d02c02186aeafa76ffa1d0047c651425fa /gcc/input.h
parentbad9b2889af54110857416e4f9e65f4032f2f5f4 (diff)
downloadgcc-c65236d682789b6a33510aaebfd7e83fe0f30d1a.zip
gcc-c65236d682789b6a33510aaebfd7e83fe0f30d1a.tar.gz
gcc-c65236d682789b6a33510aaebfd7e83fe0f30d1a.tar.bz2
Introduce class edit_context
gcc/ChangeLog: * Makefile.in (OBJS-libcommon): Add edit-context.o. * diagnostic-color.c (color_dict): Add "diff-filename", "diff-hunk", "diff-delete", and "diff-insert". (parse_gcc_colors): Update default value of GCC_COLORS in comment to reflect above changes. * doc/invoke.texi (-fdiagnostics-color): Update description of default GCC_COLORS, and of the supported capabilities. * edit-context.c: New file. * edit-context.h: New file. * input.c (struct fcache): Add field "missing_trailing_newline". (diagnostics_file_cache_forcibly_evict_file): Initialize it to true. (add_file_to_cache_tab): Likewise. (fcache::fcache): Likewise. (get_next_line): Update c->missing_trailing_newline. (location_missing_trailing_newline): New function. * input.h (location_missing_trailing_newline): New decl. * selftest-run-tests.c (selftest::run_tests): Call edit_context_c_tests. * selftest.h (edit_context_c_tests): New decl. libcpp/ChangeLog: * include/line-map.h (rich_location::seen_impossible_fixit_p): New accessor. From-SVN: r239963
Diffstat (limited to 'gcc/input.h')
-rw-r--r--gcc/input.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/input.h b/gcc/input.h
index fd21f34..e95bd3c 100644
--- a/gcc/input.h
+++ b/gcc/input.h
@@ -41,6 +41,7 @@ extern bool is_location_from_builtin_token (source_location);
extern expanded_location expand_location (source_location);
extern const char *location_get_source_line (const char *file_path, int line,
int *line_size);
+extern bool location_missing_trailing_newline (const char *file_path);
extern expanded_location expand_location_to_spelling_point (source_location);
extern source_location expansion_point_location_if_in_system_header (source_location);
extern source_location expansion_point_location (source_location);