[PATCH] D145851: [Clang][Sema] Fix incorrect deletion of default constructors for some unions
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 13 20:55:09 PDT 2023
shafik added a comment.
LGTM, I wlll let @royjacobson give the final approval after reviewing codegen tests.
================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:9161-9162
+ if (CSM == Sema::CXXDefaultConstructor) {
+ // Default constructor of a union can also be valid if one of the
+ // members has an explicit initializer.
+ const auto *RD = cast<CXXRecordDecl>(Field->getParent());
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145851/new/
https://reviews.llvm.org/D145851
More information about the cfe-commits
mailing list