[cfe-commits] PATCH: Initial stab at improving recovery for invalid destructors

Douglas Gregor dgregor at apple.com
Mon Feb 22 10:35:17 PST 2010


On Feb 20, 2010, at 11:00 PM, Chandler Carruth wrote:

> I've been noticing several problems with Clang's recovery for invalid
> destructors now that typedef names are being correctly flagged. Most
> of them end up asserting due to the strict constraints on the
> representation of destructors in the AST.
> 
> The most disruptive thing here is allowing a lot more checking of
> invalid function declarations. This allows redeclaration and other
> logic to fire which cleans up the destructor representation. I can't
> predict exactly how much it will hurt of course. I'm open to other
> suggestions. The attached test case now passes, and I'm fixing the new
> failures next. They just consist of adding expected errors and notes.

Yeah, this looks good. Moving the updates to the user-declared-destructor, POD, and has-trivial-destructor flags into the destructor decl's constructor is definitely goodness. 

FYI, I already committed the change to lib/AST/DeclBase.cpp separately, so don't be surprised if you get a conflict there. 

	- Doug



More information about the cfe-commits mailing list