[PATCH] D16552: Implement the likely resolution of core issue 253.
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 18 11:35:35 PST 2016
thakis added inline comments.
================
Comment at: lib/AST/DeclCXX.cpp:403-413
@@ +402,13 @@
+ for (const auto *F : fields()) {
+ if (F->hasInClassInitializer() || F->isMutable() || F->isUnnamedBitfield())
+ continue;
+ if (CXXRecordDecl *FieldType = F->getType()->getAsCXXRecordDecl()) {
+ if (!FieldType->allowConstDefaultInit()) {
+ data().setAllowConstDefInitKind(DefinitionData::ACDI_No);
+ return false;
+ }
+ } else {
+ data().setAllowConstDefInitKind(DefinitionData::ACDI_No);
+ return false;
+ }
+ }
----------------
I did this, but the test suite informs me that this contradicts the resolution of DR497: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#497 I guess 253 supersedes 497; I'll update the test.
http://reviews.llvm.org/D16552
More information about the cfe-commits
mailing list