[cfe-dev] New Diagnostics Modifiers

Chris Lattner clattner at apple.com
Fri Nov 21 00:02:36 PST 2008


I just checked in support for diagnostic modifiers and switched some C+ 
+ diags to use them:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20081117/009595.html
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20081117/009596.html

I'd appreciate help converting existing diagnostics over to use %s and  
%select{...}.  The various places that pass in non-language and non- 
user strings to diagnostics as parameters should switch to using  
%select{}.  The %s modifier can be used to handle "plurality" in our  
one current translation (English).

If you have requests for other modifiers, they are very easy to add,  
lets talk about them here.

My short-term roadmap for the diagnostics stuff is:

1. Add support for direct insertion of DiagnosticNames.
2. Add support for direct insertion of QualTypes.
3. Add support a few type modifiers.  I'm strongly of the opinion that  
Doug's recent "Desugar the type of the surrogate down to a function  
type" [1] logic should move into the diagnostics routines where it can  
be shared among different diagnostics.  Modifiers are a natural way to  
do this once QualTypes aren't passed into the diag machinery as fixed  
strings.

-Chris

[1] http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20081117/009586.html




More information about the cfe-dev mailing list