void diagnostic_finish (diagnostic_context *context) { /* Some of the errors may actually have been warnings. */ if (diagnostic_kind_count (context, DK_WERROR)) { /* -Werror was given. */ if (context->warning_as_error_requested) pp_verbatim (context->printer, _("%s: all warnings being treated as errors"), progname); /* At least one -Werror= was given. */ else pp_verbatim (context->printer, _("%s: some warnings being treated as errors"), progname); pp_newline_and_flush (context->printer); } diagnostic_file_cache_fini (); XDELETEVEC (context->classify_diagnostic); context->classify_diagnostic = NULL; /* diagnostic_initialize allocates context->printer using XNEW and placement-new. */ context->printer->~pretty_printer (); XDELETE (context->printer); context->printer = NULL; }
static void test_end_group_cb (diagnostic_context * context) { pp_string (context->printer, "---------------------------------- END GROUP -------------------------------"); pp_newline_and_flush (context->printer); }
/* Diagnostic finalizer for C/C++/Objective-C/Objective-C++. */ static void c_diagnostic_finalizer (diagnostic_context *context, diagnostic_info *diagnostic) { diagnostic_show_locus (context, diagnostic); /* By default print macro expansion contexts in the diagnostic finalizer -- for tokens resulting from macro expansion. */ virt_loc_aware_diagnostic_finalizer (context, diagnostic); pp_destroy_prefix (context->printer); pp_newline_and_flush (context->printer); }
static void custom_diagnostic_finalizer (diagnostic_context *context, diagnostic_info *diagnostic) { bool old_show_color = pp_show_color (context->printer); if (force_show_locus_color) pp_show_color (context->printer) = true; diagnostic_show_locus (context, diagnostic); pp_show_color (context->printer) = old_show_color; pp_destroy_prefix (context->printer); pp_newline_and_flush (context->printer); }
void diagnostic_finish (diagnostic_context *context) { /* Some of the errors may actually have been warnings. */ if (context->some_warnings_are_errors) { /* -Werror was given. */ if (context->warning_as_error_requested) pp_verbatim (context->printer, _("%s: all warnings being treated as errors"), progname); /* At least one -Werror= was given. */ else pp_verbatim (context->printer, _("%s: some warnings being treated as errors"), progname); pp_newline_and_flush (context->printer); } }