[PATCH] D38179: [clang-tidy] Handle unions in modernize-use-equals-default check

2017-09-27 Thread Alexander Kornienko via Phabricator via cfe-commits
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

[PATCH] D38179: [clang-tidy] Handle unions in modernize-use-equals-default check

2017-09-26 Thread Malcolm Parsons via Phabricator via cfe-commits
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

[PATCH] D38179: [clang-tidy] Handle unions in modernize-use-equals-default check

2017-09-25 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D38179: [clang-tidy] Handle unions in modernize-use-equals-default check

2017-09-22 Thread Malcolm Parsons via Phabricator via cfe-commits
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.