Commit Graph
3 Commits
Author SHA1 Message Date
Jon Ross-PerkinsandChandler Carruth 04d3901b7f Switch Diagnostic structure to use DiagnosticMessage to avoid pointers (#2502)
Followup for #2490 

The switch of DiagnosticMessage to have DiagnosticMessage means we don't need to use unique_ptr. This means that copy constructors are implicit again and don't need to be avoided, but per discussion still keeping with moves. Comments on HandleDiagnostic try to capture the use of moves there.

I'm keeping DiagnosticLevel at the top-level, and adding some checking that notes are actually Notes.

Also, adding MakeMessage to unify some of the logic (this has particularly been bugging me around format_fn, and I ran into it here because of the Diagnostic -> DiagnosticMessage change). The addition of NoTypeDeduction is intended to avoid some duplicative comments that'd been piling up.

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2022-12-28 16:47:33 -08:00
Jon MeowandRichard Smith aaca540a05 Restructure Diagnostic objects to allow late formatting (#1131)
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
2022-04-04 10:59:09 -07:00
Jon Meow 2296ceb56c Add a Diagnostic printer for tests. (#1087) 2022-02-15 08:35:05 -08:00