diff options
Diffstat (limited to 'libcpp/include/line-map.h')
-rw-r--r-- | libcpp/include/line-map.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h index 464494b..8b5e2f8 100644 --- a/libcpp/include/line-map.h +++ b/libcpp/include/line-map.h @@ -1787,6 +1787,18 @@ class rich_location const diagnostic_path *get_path () const { return m_path; } void set_path (const diagnostic_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 + representation of how the characters in the pertinent source lines + are encoded. + The default is false (i.e. do not escape). + When set to true, non-ASCII bytes in the pertinent source lines will + be escaped in a manner controlled by the user-supplied option + -fdiagnostics-escape-format=, so that the user can better understand + what's going on with the encoding in their source file. */ + bool escape_on_output_p () const { return m_escape_on_output; } + void set_escape_on_output (bool flag) { m_escape_on_output = flag; } + private: bool reject_impossible_fixit (location_t where); void stop_supporting_fixits (); @@ -1813,6 +1825,7 @@ protected: bool m_fixits_cannot_be_auto_applied; const diagnostic_path *m_path; + bool m_escape_on_output; }; /* A struct for the result of range_label::get_text: a NUL-terminated buffer |