diff options
author | David Malcolm <dmalcolm@redhat.com> | 2017-05-30 20:38:14 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2017-05-30 20:38:14 +0000 |
commit | f012c8ef4b35dcee9b5a3807868d050812d5b3b9 (patch) | |
tree | 02e8550289f6ec4b17f911b6571757f54cfb3e19 /gcc/c/c-objc-common.c | |
parent | 3f8efe25d65ce84369573301df1520ba589a5faa (diff) | |
download | gcc-f012c8ef4b35dcee9b5a3807868d050812d5b3b9.zip gcc-f012c8ef4b35dcee9b5a3807868d050812d5b3b9.tar.gz gcc-f012c8ef4b35dcee9b5a3807868d050812d5b3b9.tar.bz2 |
C++ template type diff printing
gcc/ChangeLog:
* diagnostic-color.c (color_dict): Add "type-diff".
(parse_gcc_colors): Update comment.
* doc/invoke.texi (Diagnostic Message Formatting Options): Add
-fdiagnostics-show-template-tree and -fno-elide-type.
(GCC_COLORS): Add type-diff to example.
(type-diff=): New.
(-fdiagnostics-show-template-tree): New.
(-fno-elide-type): New.
* pretty-print.c (pp_format): Pass quote and formatters[argno] to
the pp_format_decoder callback. Call any m_format_postprocessor's
"handle" method.
(pretty_printer::pretty_printer): Initialize
m_format_postprocessor.
(pretty_printer::~pretty_printer): Delete any
m_format_postprocessor.
* pretty-print.h (printer_fn): Add bool and const char **
parameters.
(class format_postprocessor): New class.
(struct pretty_printer::format_decoder): Document the new
parameters.
(struct pretty_printer::m_format_postprocessor): New field.
* tree-diagnostic.c (default_tree_printer): Update for new
bool and const char ** params.
* tree-diagnostic.h (default_tree_printer): Likewise.
gcc/c/ChangeLog:
* c-objc-common.c (c_tree_printer): Gain bool and const char **
parameters.
gcc/c-family/ChangeLog:
* c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
format_chars.
* c.opt (fdiagnostics-show-template-tree): New option.
(felide-type): New option.
gcc/cp/ChangeLog:
* call.c (perform_implicit_conversion_flags): Convert
"from %qT to %qT" to "from %qH to %qI" in diagnostic.
(print_conversion_rejection): Replace pairs of %qT with
%qH and %qI in various places.
(build_user_type_conversion_1): Likewise.
(build_integral_nontype_arg_conv): Likewise.
(build_conditional_expr_1): Likewise.
(convert_like_real): Likewise.
(convert_arg_to_ellipsis): Likewise.
(joust): Likewise.
(initialize_reference): Likewise.
* cvt.c (cp_convert_to_pointer): Likewise.
(cp_convert_to_pointer): Likewise.
(convert_to_reference): Likewise.
(ocp_convert): Likewise.
* error.c (cp_printer): Gain bool and const char ** parameters.
(struct deferred_printed_type): New struct.
(class cxx_format_postprocessor): New class.
(cxx_initialize_diagnostics): Wire up a cxx_format_postprocessor
to pp->m_format_postprocessor.
(comparable_template_types_p): New function.
(newline_and_indent): New function.
(arg_to_string): New function.
(print_nonequal_arg): New function.
(print_template_differences): New function.
(type_to_string_with_compare): New function.
(print_template_tree_comparison): New function.
(append_formatted_chunk): New function.
(add_quotes): New function.
(cxx_format_postprocessor::handle): New function.
(defer_phase_2_of_type_diff): New function.
(cp_printer): Add "quoted" and "buffer_ptr" params. Implement
%H and %I.
* typeck.c (cp_build_binary_op): Replace pairs of %qT with
%qH and %qI in various places.
(convert_member_func_to_ptr): Likewise.
(build_reinterpret_cast_1): Likewise.
(convert_for_assignment): Likewise.
* typeck2.c (check_narrowing): Likewise.
gcc/fortran/ChangeLog:
* error.c (gfc_format_decoder): Update for new bool and
const char ** params.
gcc/testsuite/ChangeLog:
* g++.dg/plugin/plugin.exp (plugin_test_list): Add...
* g++.dg/plugin/show-template-tree-color-no-elide-type.C: New
test case.
* g++.dg/plugin/show-template-tree-color.C: New test case.
* g++.dg/plugin/show_template_tree_color_plugin.c: New plugin.
* g++.dg/template/show-template-tree-2.C: New test case.
* g++.dg/template/show-template-tree-3.C: New test case.
* g++.dg/template/show-template-tree-4.C: New test case.
* g++.dg/template/show-template-tree-no-elide-type.C: New test case.
* g++.dg/template/show-template-tree.C: New test case.
From-SVN: r248698
Diffstat (limited to 'gcc/c/c-objc-common.c')
-rw-r--r-- | gcc/c/c-objc-common.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/c/c-objc-common.c b/gcc/c/c-objc-common.c index 5e69488..05212b2 100644 --- a/gcc/c/c-objc-common.c +++ b/gcc/c/c-objc-common.c @@ -28,7 +28,7 @@ along with GCC; see the file COPYING3. If not see #include "c-objc-common.h" static bool c_tree_printer (pretty_printer *, text_info *, const char *, - int, bool, bool, bool); + int, bool, bool, bool, bool, const char **); bool c_missing_noreturn_ok_p (tree decl) @@ -75,7 +75,8 @@ c_objc_common_init (void) diagnostic machinery. */ static bool c_tree_printer (pretty_printer *pp, text_info *text, const char *spec, - int precision, bool wide, bool set_locus, bool hash) + int precision, bool wide, bool set_locus, bool hash, + bool, const char **) { tree t = NULL_TREE; tree name; |