[cfe-commits] [Patch 2 of 4] -verify fixes (stage 2)

Jordan Rose jordan_rose at apple.com
Thu Aug 2 09:13:38 PDT 2012


On Jul 28, 2012, at 12:07 AM, Andy Gibbs <andyg1001 at hotmail.co.uk> wrote:

> On Saturday, July 28, 2012 3:42 AM, Jordan Rose wrote:
>> I see. I realize that it's slightly less safe, but is it viable to call
>> FinishCapture in the destructor of CaptureDiagnosticsConsumer? That way
>> there's no ugly explicit cleanup calls in the user. (I realize there are
>> potential problems with that, but it seems a lot cleaner!)
>> 
>> If we can't do that, please do keep the assertion.
> 
> I wished in the first instance to have it inside the destructor, but the
> problem is that the preprocessor instance is created after the
> CaptureDiagnosticConsumer instance and therefore is destructed before
> CaptureDiagnosticConsumer.  Hence the explicit FinishCapture function
> which must be called before the preprocessor goes out of scope.  And
> hence also the assert in the destructor to ensure this order of operation.

Okay, unfortunate but fair enough. Just waiting on 1/4 now.



More information about the cfe-commits mailing list