GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "version.h"
#include "intl.h"
#include "diagnostic.h"
#include "diagnostic-color.h"
#include "diagnostic-url.h"
#include "diagnostic-metadata.h"
#include "diagnostic-path.h"
#include "diagnostic-client-data-hooks.h"
#include "diagnostic-diagram.h"
#include "diagnostic-format-text.h"
#include "diagnostic-buffer.h"
#include "text-art/theme.h"
#include "make-unique.h"
Data Structures | |
class | diagnostic_text_format_buffer |
Macros | |
#define | INCLUDE_VECTOR |
Functions | |
static unsigned | get_bullet_point_unichar (bool unicode) |
static bool | use_unicode_p (const diagnostic_context &dc) |
static unsigned | get_bullet_point_unichar (diagnostic_context &dc) |
const char * | maybe_line_and_column (int line, int col) |
void | default_diagnostic_text_starter (diagnostic_text_output_format &text_output, const diagnostic_info *diagnostic) |
void | default_diagnostic_text_finalizer (diagnostic_text_output_format &text_output, const diagnostic_info *diagnostic, diagnostic_t) |
#define INCLUDE_VECTOR |
Classic text-based output of diagnostics. Copyright (C) 1999-2024 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
void default_diagnostic_text_finalizer | ( | diagnostic_text_output_format & | text_output, |
const diagnostic_info * | diagnostic, | ||
diagnostic_t | ) |
References diagnostic_show_locus(), diagnostic_output_format::get_context(), diagnostic_output_format::get_printer(), diagnostic_text_output_format::get_source_printing_options(), NULL, pp_flush(), pp_newline(), pp_set_prefix(), and pp_take_prefix().
Referenced by diagnostic_context::initialize(), and tree_diagnostics_defaults().
void default_diagnostic_text_starter | ( | diagnostic_text_output_format & | text_output, |
const diagnostic_info * | diagnostic ) |
|
static |
Get the unicode code point for bullet points when showing nested diagnostics.
Referenced by diagnostic_text_output_format::build_indent_prefix(), and get_bullet_point_unichar().
|
static |
Get the unicode code point for bullet points when showing nested diagnostics.
References get_bullet_point_unichar(), and use_unicode_p().
const char * maybe_line_and_column | ( | int | line, |
int | col ) |
Helpers for writing lang-specific starters/finalizers for text output.
Return a formatted line and column ':%line:%column'. Elided if line == 0 or col < 0. (A column of 0 may be valid due to the -fdiagnostics-column-origin option.) The result is a statically allocated buffer.
References gcc_checking_assert.
Referenced by diagnostic_column_policy::get_location_text(), and diagnostic_text_output_format::report_current_module().
|
static |
Return true if DC's theme supports unicode characters.
References diagnostic_context::get_diagram_theme().
Referenced by get_bullet_point_unichar().