aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land.
LGTM! ================ Comment at: clang-tidy/modernize/UseDefaultMemberInitCheck.cpp:165 - Finder->addMatcher( - cxxConstructorDecl( - isDefaultConstructor(), unless(isInstantiated()), - forEachConstructorInitializer( - cxxCtorInitializer( - forField(unless(anyOf(isBitField(), - hasInClassInitializer(anything()), - hasParent(recordDecl(isUnion()))))), - isWritten(), withInitializer(ignoringImplicit(Init))) - .bind("default"))), - this); + if (getLangOpts().CPlusPlus2a) + Finder->addMatcher( ---------------- malcolm.parsons wrote: > aaron.ballman wrote: > > I wonder if we could add a `nothing()` matcher (sibling to the `anything()` > > matcher) so that this could be rewritten as: > > > > `unless(anyOf(getLangOpts().CPlusPlus2a ? nothing() : isBitField()))` > > > > The duplication here adds complexity if we decide to change the matchers in > > the future. > `unless(anything())` is equivalent to `nothing()`. Ah, good point! Nice, this is much more clean. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42413 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits