diff options
Diffstat (limited to 'clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp')
| -rw-r--r-- | clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp index b07f730380e..c14c6853b9d 100644 --- a/clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp @@ -167,7 +167,9 @@ void UseDefaultMemberInitCheck::registerMatchers(MatchFinder *Finder) { isDefaultConstructor(), unless(isInstantiated()), forEachConstructorInitializer( cxxCtorInitializer( - forField(unless(anyOf(isBitField(), + forField(unless(anyOf(getLangOpts().CPlusPlus2a + ? unless(anything()) + : isBitField(), hasInClassInitializer(anything()), hasParent(recordDecl(isUnion()))))), isWritten(), withInitializer(ignoringImplicit(Init))) |

