[cfe-commits] r48986 - in /cfe/trunk: include/clang/Basic/Diagnostic.h lib/Basic/Diagnostic.cpp

Ted Kremenek kremenek at apple.com
Tue Apr 1 08:58:47 PDT 2008


On Mar 31, 2008, at 5:26 PM, Chris Lattner wrote:

>
> On Mar 31, 2008, at 11:23 AM, Ted Kremenek wrote:
>
>> Author: kremenek
>> Date: Mon Mar 31 13:23:15 2008
>> New Revision: 48986
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=48986&view=rev
>> Log:
>> Added variation of the "Report" method in the class Diagnostic that  
>> takes
>> an optional DiagnosticClient argument that differs from the client  
>> stored
>> internally in the Diagnostic object.
>
> Hey Ted,
>
> Would it be sufficient to add a "setDiagnosticClient" method to  
> Diagnostic?
>
> -Chris
>

I considered this option.  That poses issues with different clients  
that want to share the same Diagnostic, but wish to simultaneously  
emit reports to different DiagnosticClients.  This approach removes  
any issues with shared state getting clobbered.

On the other hand, it may end up being the case that we don't need  
this extra method after all, or the need to have a  
"setDiagnosticClient."  It will become more clear once some of the  
code that is currently churning settles down.




More information about the cfe-commits mailing list