[clang] [llvm] remove redundant uses of `isa` caught by clang-tidy (NFC) (PR #192813)

Oliver Hunt via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 19 19:13:32 PDT 2026


================
@@ -325,49 +325,47 @@ std::optional<bool> isUncheckedPtr(const QualType T) {
 std::optional<bool> isGetterOfSafePtr(const CXXMethodDecl *M) {
   assert(M);
 
-  if (isa<CXXMethodDecl>(M)) {
-    const CXXRecordDecl *calleeMethodsClass = M->getParent();
-    auto className = safeGetName(calleeMethodsClass);
-    auto method = safeGetName(M);
+  const CXXRecordDecl *calleeMethodsClass = M->getParent();
+  auto className = safeGetName(calleeMethodsClass);
----------------
ojhunt wrote:

className should be explicitly typed, which you can do in this PR, this code in general (in a separate PR) should adopt a consistent naming style (which is not your problem :D)

https://github.com/llvm/llvm-project/pull/192813


More information about the cfe-commits mailing list