[cfe-dev] CXXConstructorDecl::isImplicitlyDefined vs. CXXMethodDecl::isDefaulted

Jordan Rose jordan_rose at apple.com
Wed Aug 7 09:20:09 PDT 2013


On Aug 6, 2013, at 14:30 , Richard Smith <richard at metafoo.co.uk> wrote:

> On Tue, Aug 6, 2013 at 9:15 AM, Jordan Rose <jordan_rose at apple.com> wrote:
> Hi, Richard. Is there any reason not to unify the "implicitly defined" bits on CXXConstructorDecl and CXXDestructorDecl with the "IsDefaulted" bit already in CXXMethodDecl (actually in FunctionDecl)? It seems like an easy simplification that collapses two checks into one in many places.
> 
> That seems like a great idea to me.
> 
> (I'm guessing that the bits for constructors and destructors predated the generic notion of defaulted, even with implicit special member functions.)
> 
> Yes, I think so. I'm not sure how the bit on ctors and dtors was ever sufficient; the notion of "implicitly defined" also existed for copy assignment operators in C++98.
> 
> We also seem to forget to set the ImplicitlyDefined flag on an implicit default constructor. Huh.

Done in r187891. All regression tests pass; hoping the buildbots don't fall over.

Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130807/30f4fe02/attachment.html>


More information about the cfe-dev mailing list