[cfe-commits] r149662 - in /cfe/trunk: lib/Basic/Diagnostic.cpp test/Analysis/null-deref-ps.c test/CodeGen/statements.c test/Sema/return.c test/SemaCXX/vararg-non-pod.cpp test/SemaObjCXX/vararg-non-pod.mm

Enea Zaffanella zaffanella at cs.unipr.it
Wed Feb 8 02:13:40 PST 2012


On 02/07/2012 09:02 PM, Chad Rosier wrote:
> Enea,
> Committed clang revision 150001.  Let me know if that works for you.
>
>   Chad

Works fine, thanks.

Enea.

> On Feb 7, 2012, at 12:47 AM, Enea Zaffanella<zaffanella at cs.unipr.it>  wrote:
>
>> On 02/07/2012 01:10 AM, Chad Rosier wrote:
>>>
>>> On Feb 5, 2012, at 1:19 PM, Enea Zaffanella<zaffanella at cs.unipr.it>   wrote:
>>>
>>>> On 02/05/2012 09:17 PM, Chad Rosier wrote:
>>>>> Hi Enea,
>>>>
>>
>> [...]
>>
>>>> So, what code should we write in order to change the default mapping
>>>> of a warning that is mapped by default to error
>>>> (e.g., warn_return_missing_expr)?
>>>
>>> Enea, You can downgrade warnings that are mapped by default to errors
>>> using  the setDiagnosticGroupWarningAsError(StringRef Group, bool Enabled) API
>>> (e.g., setDiagnosticGroupWarningAsError(Group, false)). Let me know if
>>> this works for you. If so, I'll go ahead and update the doxygen comments.
>>>
>>> Chad
>>
>> Hi Chad.
>>
>> This seems to be working, but having to call it on the whole diagnostic group results in a somehow unflexible public interface.
>> May I suggest to have another public method such as
>>
>>   setDiagnosticWarningAsError(diag::kind Diag, bool)
>>
>> and then have setDiagnosticGroupWarningAsError() just call the one above for each diagnostics in the group?
>>
>> Similarly for
>>   setDiagnosticGroupErrorAsFatal (StringRef Group, bool Enabled).
>>
>> Enea.
>




More information about the cfe-commits mailing list