[cfe-commits] r140752 - in /cfe/trunk: include/clang/Basic/DiagnosticIDs.h lib/Basic/DiagnosticIDs.cpp lib/Frontend/TextDiagnosticPrinter.cpp test/Frontend/diagnostics-option-names.c

Daniel Dunbar daniel at zuster.org
Fri Sep 30 14:16:00 PDT 2011


Yeah, it should be straightforward to at least substantially improve
things. My suggestions would be either:
(a) refine existing approach, but by getting back the actual
DiagnosticMappingInfo object, and still reverse engineering the effect
of flags.

(b) change getDiagnosticLevel to return a 'why' code that would go
into the actual diagnostic object. This avoids the gross reverse
engineering.

 - Daniel

On Wed, Sep 28, 2011 at 10:44 PM, Chandler Carruth <chandlerc at google.com> wrote:
> On Wed, Sep 28, 2011 at 6:01 PM, Daniel Dunbar <daniel at zuster.org> wrote:
>>
>> The TextDiagnosticPrinter code is still fragile as it is just "reverse
>> engineering" what the diagnostic engine is doing. Not my current priority to
>> fix though.
>
> Is this straightforward to fix? I'm hacking a lot on the text diagnostic
> printer, working to make a generic interface for textually formatting
> diagnostics that can be shared amongst various clients, so I'd be happy to
> take a look while there.



More information about the cfe-commits mailing list