[PATCH] D38483: [ExprConstant] Allow constexpr ctor to modify non static data members in body

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 3 14:45:11 PDT 2017


rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.

LGTM, thank you!



================
Comment at: lib/AST/ExprConstant.cpp:3127
   // During the construction of an object, it is not yet 'const'.
   // FIXME: We don't set up EvaluatingDecl for local variables or temporaries,
   // and this doesn't do quite the right thing for const subobjects of the
----------------
The first half of this FIXME is now fixed, and should be removed. (But the second half -- const subobjects remain mutable past the end of their period of construction -- is still an open problem.)


https://reviews.llvm.org/D38483





More information about the cfe-commits mailing list