On May 24, 2011, at 10:43 AM, Matthieu Monrocq wrote: > > > 2011/5/24 Argyrios Kyrtzidis <[email protected]> > On May 21, 2011, at 5:31 AM, Matthieu Monrocq wrote: > >> Your new diagnostic for non-virtual destructor looks great and useful, I'd >> suggest we put it in "most" diagnostic group. >> >> Thanks for your work! >> >> -Argyrios >> >> >> Here is the new patch with the warning wired up in "most". >> >> I hope that the final attribute for classes will be implemented soon since >> it'll remove some false positives for this warning. > > It's already implemented, you can check it with > cxxRecordDecl->hasAttr<FinalAttr>(). > > -Argyrios > > > Ah great! I had completely missed it... > > I have reviewed the patch then, and taken the liberty of pasting the > paragraph of the Standard that specifies this just above the little piece of > code. I have also added the tests to `destructor.cpp`. > > I have ordered the test so that hasAttr<FinalAttr> is the last condition, > in order to economize the calls (I suppose it's less costly than looking up > the destructor). > > Since this means that I now specifies -std=c++0x on the command line (for > final), I would understand if it should only be activated conditionally or if > the test should be split.
Adding -std=c++0x to the test is fine, even though we handle the 'final' syntax even without passing -std=c++0x. Committed your patch in r131989, thanks! -Argyrios > > -- Matthieu > > <clang_non_virtual_destructor.diff>
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
