alexfh added inline comments.
Comment at: clang-tidy/modernize/UseEqualsDefaultCheck.cpp:119-120
+
+ // A defaulted default constructor of a union with a field with a non trivial
+ // default constructor would be deleted.
+ if (Record->isUnion()) {
malcolm.par
malcolm.parsons added inline comments.
Comment at: clang-tidy/modernize/UseEqualsDefaultCheck.cpp:117
+ const CXXMethodDecl *Operator) {
+ const auto *Record = Operator->getParent();
+
aaron.ballman wrote:
> Please don
aaron.ballman added inline comments.
Comment at: clang-tidy/modernize/UseEqualsDefaultCheck.cpp:117
+ const CXXMethodDecl *Operator) {
+ const auto *Record = Operator->getParent();
+
Please don't use `auto` here or els
malcolm.parsons created this revision.
Herald added subscribers: xazax.hun, JDevlieghere.
Do not replace the constructor or destructor of a union with =default
if it would be implicitly deleted.
Fixes: PR27926
https://reviews.llvm.org/D38179
Files:
clang-tidy/modernize/UseEqualsDefaultCheck.