[clang-tools-extra] r253442 - Replace a dyn_cast with isa where the result was only being used as a boolean. NFC.

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 17 23:08:11 PST 2015


Author: ctopper
Date: Wed Nov 18 01:08:11 2015
New Revision: 253442

URL: http://llvm.org/viewvc/llvm-project?rev=253442&view=rev
Log:
Replace a dyn_cast with isa where the result was only being used as a boolean. NFC.

Modified:
    clang-tools-extra/trunk/clang-tidy/modernize/UseDefaultCheck.cpp

Modified: clang-tools-extra/trunk/clang-tidy/modernize/UseDefaultCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/modernize/UseDefaultCheck.cpp?rev=253442&r1=253441&r2=253442&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/modernize/UseDefaultCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/modernize/UseDefaultCheck.cpp Wed Nov 18 01:08:11 2015
@@ -302,7 +302,7 @@ void UseDefaultCheck::check(const MatchF
       if (!StartLoc.isValid())
         return;
     }
-  } else if (dyn_cast<CXXDestructorDecl>(SpecialFunctionDecl)) {
+  } else if (isa<CXXDestructorDecl>(SpecialFunctionDecl)) {
     SpecialFunctionName = "destructor";
   } else {
     if (!isCopyAssignmentAndCanBeDefaulted(Result.Context, SpecialFunctionDecl))




More information about the cfe-commits mailing list