|
GCC Middle and Back End API Reference
|
#include <json-diagnostic.h>


Public Member Functions | |
| gcc_json_context (const char *filename) | |
| location_t | make_location_for_point (const json::location_map::point &) |
| location_t | make_location_for_range (const json::location_map::range &) |
| void | record_range_for_value (json::value *jv, const range &r) final override |
| const json::location_map::range & | get_range_for_value (const json::value &jv) const |
| virtual void | on_finished_parsing () |
Private Attributes | |
| const char * | m_filename |
| std::map< const json::value *, range > | m_map_jv_to_range |
Diagnostics relating to JSON values. Copyright (C) 2026 Free Software Foundation, Inc. Contributed by David Malcolm <dmalcolm@redhat.com>. 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/>.
Implementation of json::location_map for use with GCC diagnostics. Stores location information for json::value * from parsing, and can generate location_t values for the.
|
inline |
References m_filename.
|
inlineinherited |
References gcc_assert, and m_map_jv_to_range.
Referenced by emit_json_diagnostic().
| location_t gcc_json_context::make_location_for_point | ( | const json::location_map::point & | p | ) |
class gcc_json_context : public json::simple_location_map.
References line_table, json::location_map::point::m_column, m_filename, json::location_map::point::m_line, and diagnostics::physical_location_maker::new_location_from_file_line_column().
Referenced by make_location_for_range().
| location_t gcc_json_context::make_location_for_range | ( | const json::location_map::range & | r | ) |
References make_location(), make_location_for_point(), and r.
Referenced by emit_json_diagnostic().
|
inlinevirtualinherited |
|
inlinefinaloverridevirtualinherited |
Implements json::location_map.
References m_map_jv_to_range, and r.
|
private |
Referenced by gcc_json_context(), and make_location_for_point().
|
privateinherited |
Referenced by get_range_for_value(), and record_range_for_value().