diff options
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 20 | ||||
-rw-r--r-- | libcpp/charset.cc | 2 | ||||
-rw-r--r-- | libcpp/include/cpplib.h | 3 | ||||
-rw-r--r-- | libcpp/include/rich-location.h | 13 | ||||
-rw-r--r-- | libcpp/internal.h | 4 |
5 files changed, 32 insertions, 10 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 3c5bae1..aeb4e14 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,23 @@ +2025-07-25 David Malcolm <dmalcolm@redhat.com> + + * charset.cc: Update comment for file rename. + +2025-07-25 David Malcolm <dmalcolm@redhat.com> + + * internal.h: Update comment for diagnostic_t becoming + enum class diagnostics::kind. + +2025-07-25 David Malcolm <dmalcolm@redhat.com> + + * include/cpplib.h: Update for moves to "source-printing". + * include/rich-location.h (class label_effects): Move to... + (class diagnostics::label_effects): ...here. + +2025-07-25 David Malcolm <dmalcolm@redhat.com> + + * include/rich-location.h: Replace diagnostic_path with + diagnostics::paths::path. + 2025-06-17 Jason Merrill <jason@redhat.com> * line-map.cc (linemap_location_from_module_p): Add. diff --git a/libcpp/charset.cc b/libcpp/charset.cc index e3accf8..95ba376 100644 --- a/libcpp/charset.cc +++ b/libcpp/charset.cc @@ -2420,7 +2420,7 @@ convert_escape (cpp_reader *pfile, const uchar *from, const uchar *limit, { encoding_rich_location rich_loc (pfile); - /* diagnostic.cc does not support "%03o". When it does, this + /* pretty-print.cc does not support "%03o". When it does, this code can use %03o directly in the diagnostic again. */ char buf[32]; sprintf(buf, "%03o", (int) c); diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index 7c147ae..75efdcd 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -1610,7 +1610,8 @@ struct cpp_decoded_char This is a tabstop value, along with a callback for getting the widths of characters. Normally this callback is cpp_wcwidth, but we support other schemes for escaping non-ASCII unicode as a series of - ASCII chars when printing the user's source code in diagnostic-show-locus.cc + ASCII chars when printing the user's source code in + gcc/diagnostics/source-printing.cc For example, consider: - the Unicode character U+03C0 "GREEK SMALL LETTER PI" (UTF-8: 0xCF 0x80) diff --git a/libcpp/include/rich-location.h b/libcpp/include/rich-location.h index fe9868d..c74e80e 100644 --- a/libcpp/include/rich-location.h +++ b/libcpp/include/rich-location.h @@ -25,7 +25,7 @@ along with this program; see the file COPYING3. If not see #include "label-text.h" class range_label; -class label_effects; +namespace diagnostics { class label_effects; } /* A hint to diagnostic_show_locus on how to print a source range within a rich_location. @@ -213,7 +213,7 @@ semi_embedded_vec<T, NUM_EMBEDDED>::truncate (int len) } class fixit_hint; -class diagnostic_path; +namespace diagnostics { namespace paths { class path; }} /* A "rich" source code location, for use when printing diagnostics. A rich_location has one or more carets&ranges, where the carets @@ -520,8 +520,8 @@ class rich_location } /* An optional path through the code. */ - const diagnostic_path *get_path () const { return m_path; } - void set_path (const diagnostic_path *path) { m_path = path; } + const diagnostics::paths::path *get_path () const { return m_path; } + void set_path (const diagnostics::paths::path *path) { m_path = path; } /* A flag for hinting that the diagnostic involves character encoding issues, and thus that it will be helpful to the user if we show some @@ -567,7 +567,7 @@ protected: static const int MAX_STATIC_FIXIT_HINTS = 2; semi_embedded_vec <fixit_hint *, MAX_STATIC_FIXIT_HINTS> m_fixit_hints; - const diagnostic_path *m_path; + const diagnostics::paths::path *m_path; }; /* Abstract base class for labelling a range within a rich_location @@ -596,7 +596,8 @@ class range_label virtual label_text get_text (unsigned range_idx) const = 0; /* Get any special effects for the label (e.g. links to other labels). */ - virtual const label_effects *get_effects (unsigned /*range_idx*/) const + virtual const diagnostics::label_effects * + get_effects (unsigned /*range_idx*/) const { return nullptr; } diff --git a/libcpp/internal.h b/libcpp/internal.h index 9973836..8ca4c75 100644 --- a/libcpp/internal.h +++ b/libcpp/internal.h @@ -622,8 +622,8 @@ struct cpp_reader zero of said file. */ location_t main_loc; - /* If non-zero, override diagnostic locations (other than DK_NOTE - diagnostics) to this one. */ + /* If non-zero, override diagnostic locations (other than + diagnostics::kind::note diagnostics) to this one. */ location_t diagnostic_override_loc; /* Returns true iff we should warn about UTF-8 bidirectional control |