[cfe-commits] [PATCH] Diagnose cv-qualified operator new/delete
aaron at aaronballman.com
Mon Jul 30 13:41:59 PDT 2012
On Mon, Jul 30, 2012 at 4:37 PM, Jordan Rose <jordan_rose at apple.com> wrote:
> On Jul 30, 2012, at 13:28 , Aaron Ballman <aaron at aaronballman.com> wrote:
>> This patch addresses PR13481 so that we properly diagnose overloaded
>> operator new and operator delete if it is cv-qualified.
> How well does this recover? I think we should just fixit-remove the 'const' or 'volatile' and continue as if the declaration is correct, but it looks like we're actually going to skip the decl pretty much entirely.
The fixit is a good idea, I'll incorporate it.
> Also, the internal warning name has "newdelete" in it, but the text does not. Perhaps this should be used for all static methods, and possibly constructors and destructors as well?
Not a bad idea, it is a general error. I'll refactor into something
more generally reusable.
> P.S. I'm impressed that you picked this up within hours of me filing the bug.
I try to keep on top of the bug database. Call it a personal crusade. :-P
More information about the cfe-commits