diff --git a/clang-tools-extra/clang-tidy/modernize/UseDefaultCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseDefaultCheck.cpp index 098f86403f65..68ead15e2240 100644 --- a/clang-tools-extra/clang-tidy/modernize/UseDefaultCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/UseDefaultCheck.cpp @@ -302,7 +302,7 @@ void UseDefaultCheck::check(const MatchFinder::MatchResult &Result) { if (!StartLoc.isValid()) return; } - } else if (dyn_cast(SpecialFunctionDecl)) { + } else if (isa(SpecialFunctionDecl)) { SpecialFunctionName = "destructor"; } else { if (!isCopyAssignmentAndCanBeDefaulted(Result.Context, SpecialFunctionDecl))