Landing: 9c529989e0fd
Project / Subsystem
gcc / gcc
Date
2026-02-24
Author
David Malcolm
Commit
9c529989e0fd9cd4b816cb13cc8e5a99e3cc43c0
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc
- patch_id
- —
- commit_hash
- 9c529989e0fd9cd4b816cb13cc8e5a99e3cc43c0
- source_type
- github
- headline
- Introduce pretty-print-token-buffer.{cc,h}
- tldr
- Refactors diagnostic message handling by introducing pretty-print-token-buffer, improving token capture during pretty-printing.
- author
- David Malcolm
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • refactoring
- • diagnostics
- • pretty-printing
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-02-24T00:00:00.000Z
This commit introduces pretty-print-token-buffer.{cc,h} to better capture tokens from a pretty-print operation and reimplements diagnostic_message_buffer as a subclass of pretty_print_token_buffer. This refactoring centralizes token handling and provides a mechanism for replaying tokens into another pretty-print, using ‘%e’. The change impacts how diagnostic messages are constructed and formatted.