]> git.ipfire.org Git - thirdparty/gcc.git/commit
diagnostics: use unique_ptr for m_format_postprocessor
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 29 May 2025 20:57:52 +0000 (16:57 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Thu, 29 May 2025 20:57:52 +0000 (16:57 -0400)
commitafee0b19dfdc39b555ac66209362d8df3e26afa7
treee89b0f7e91d5683ce60ab026d4fbbaf894a876e4
parentf4aa6b5a8d63050f5d61fcec222ed87be4c0a266
diagnostics: use unique_ptr for m_format_postprocessor

No functional change intended.

gcc/cp/ChangeLog:
* error.cc (cxx_format_postprocessor::clone): Update to use
unique_ptr.
(cxx_dump_pretty_printer::cxx_dump_pretty_printer): Likewise.
(cxx_initialize_diagnostics): Likewise.

gcc/ChangeLog:
* pretty-print.cc (pretty_printer::pretty_printer): Use "nullptr"
rather than "NULL".  Remove explicit delete of
m_format_postprocessor.
* pretty-print.h (format_postprocessor::clone): Use unique_ptr.
(pretty_printer::set_format_postprocessor): New.
(pretty_printer::m_format_postprocessor): Use unique_ptr.
(pp_format_postprocessor): Update for use of unique_ptr, removing
reference from return type.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/cp/error.cc
gcc/pretty-print.cc
gcc/pretty-print.h