From f1b96af27f9cc38e3470eec1730ca763aa6f9e47 Mon Sep 17 00:00:00 2001 From: dmalcolm Date: Fri, 2 Sep 2016 15:22:21 +0000 Subject: Improvements to typed_splay_tree This patch adds foreach, max and min methods to class typed_splay_tree, along with the start of a selftest suite. gcc/ChangeLog: * Makefile.in (OBJS): Add typed-splay-tree.o. * selftest-run-tests.c (selftest::run_tests): Call typed_splay_tree_c_tests. * selftest.h (typed_splay_tree_c_tests): New decl. * typed-splay-tree.c: New file. * typed-splay-tree.h (typed_splay_tree::foreach_fn): New typedef. (typed_splay_tree::max): New method. (typed_splay_tree::min): New method. (typed_splay_tree::foreach): New method. (typed_splay_tree::closure): New struct. (typed_splay_tree::inner_foreach_fn): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239958 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/selftest-run-tests.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/selftest-run-tests.c') diff --git a/gcc/selftest-run-tests.c b/gcc/selftest-run-tests.c index 6453e314982..e20bbd0f568 100644 --- a/gcc/selftest-run-tests.c +++ b/gcc/selftest-run-tests.c @@ -56,6 +56,7 @@ selftest::run_tests () ggc_tests_c_tests (); sreal_c_tests (); fibonacci_heap_c_tests (); + typed_splay_tree_c_tests (); /* Mid-level data structures. */ input_c_tests (); -- cgit v1.2.1 From fe066ce3d8b45a687ddb9ebba6426a3746f3a8ca Mon Sep 17 00:00:00 2001 From: dmalcolm Date: Fri, 2 Sep 2016 18:00:57 +0000 Subject: 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239963 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/selftest-run-tests.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/selftest-run-tests.c') diff --git a/gcc/selftest-run-tests.c b/gcc/selftest-run-tests.c index e20bbd0f568..d9d3ea13ab6 100644 --- a/gcc/selftest-run-tests.c +++ b/gcc/selftest-run-tests.c @@ -68,6 +68,7 @@ selftest::run_tests () rely on. */ diagnostic_show_locus_c_tests (); diagnostic_c_tests (); + edit_context_c_tests (); fold_const_c_tests (); spellcheck_c_tests (); spellcheck_tree_c_tests (); -- cgit v1.2.1