[cfe-commits] r90642 - in /cfe/trunk: include/clang/Basic/Diagnostic.h lib/Basic/Diagnostic.cpp lib/Frontend/TextDiagnosticPrinter.cpp tools/clang-cc/clang-cc.cpp

steve naroff snaroff at apple.com
Fri Dec 4 18:36:45 PST 2009


On Dec 4, 2009, at 9:27 PM, Eli Friedman wrote:

> On Fri, Dec 4, 2009 at 6:14 PM, Steve Naroff <snaroff at apple.com>  
> wrote:
>> --- cfe/trunk/include/clang/Basic/Diagnostic.h (original)
>> +++ cfe/trunk/include/clang/Basic/Diagnostic.h Fri Dec  4 20:14:08  
>> 2009
>> @@ -182,6 +182,7 @@
>>   bool SuppressAllDiagnostics;   // Suppress all diagnostics.
>>   ExtensionHandling ExtBehavior; // Map extensions onto warnings or  
>> errors?
>>   DiagnosticClient *Client;
>> +  LangOptions *LangOpts;
>>
>>   /// DiagMappings - Mapping information for diagnostics.  Mapping  
>> info is
>>   /// packed into four bits per diagnostic.  The low three bits are  
>> the mapping
>> @@ -238,7 +239,9 @@
>>   DiagnosticClient *getClient() { return Client; }
>>   const DiagnosticClient *getClient() const { return Client; }
>>
>> -
>> +  LangOptions *getLangOpts() const { return LangOpts; }
>> +  void setLangOpts(LangOptions *LOpts) { LangOpts = LOpts; }
>> +
>>   /// pushMappings - Copies the current DiagMappings and pushes the  
>> new copy
>>   /// onto the top of the stack.
>>   void pushMappings();
>
> It would be better to have an option in DiagnosticOptions instead
> making the diagnostic printer mess with the LangOptions directly.
>

That's fine with me (the branch I was working on didn't have  
DiagnosticOptions).

Since this works, I'll clean this up later (after my other unrelated  
changes have been integrated).

snaroff

> -Eli




More information about the cfe-commits mailing list