Index: clang-tools-extra/trunk/clang-tidy/readability/RedundantDeclarationCheck.cpp =================================================================== --- clang-tools-extra/trunk/clang-tidy/readability/RedundantDeclarationCheck.cpp +++ clang-tools-extra/trunk/clang-tidy/readability/RedundantDeclarationCheck.cpp @@ -19,11 +19,12 @@ namespace readability { void RedundantDeclarationCheck::registerMatchers(MatchFinder *Finder) { - auto UnlessDefinition = unless(isDefinition()); - Finder->addMatcher(namedDecl(anyOf(varDecl(UnlessDefinition), - functionDecl(UnlessDefinition))) - .bind("Decl"), - this); + Finder->addMatcher( + namedDecl( + anyOf(varDecl(unless(isDefinition())), + functionDecl(unless(anyOf(isDefinition(), isDefaulted()))))) + .bind("Decl"), + this); } void RedundantDeclarationCheck::check(const MatchFinder::MatchResult &Result) { Index: clang-tools-extra/trunk/test/clang-tidy/readability-redundant-declaration.cpp =================================================================== --- clang-tools-extra/trunk/test/clang-tidy/readability-redundant-declaration.cpp +++ clang-tools-extra/trunk/test/clang-tidy/readability-redundant-declaration.cpp @@ -34,3 +34,11 @@ static int I; }; int C::I; + +template +struct C2 { + C2(); +}; + +template +C2::C2() = default;