[clang-tools-extra] 51b0fc4 - [clang-tidy][NFC] Remove a wrong comment in ProTypeMemberInitCheck (#205477)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 23 21:47:42 PDT 2026


Author: flovent
Date: 2026-06-24T04:47:37Z
New Revision: 51b0fc4f611adc420afefa40130185cca6a59553

URL: https://github.com/llvm/llvm-project/commit/51b0fc4f611adc420afefa40130185cca6a59553
DIFF: https://github.com/llvm/llvm-project/commit/51b0fc4f611adc420afefa40130185cca6a59553.diff

LOG: [clang-tidy][NFC] Remove a wrong comment in ProTypeMemberInitCheck (#205477)

`getAsCXXRecordDecl` will return nullptr for any dependent types.

It's introduced by #192786, see
https://github.com/llvm/llvm-project/pull/192786#issuecomment-4785223372
in original PR.

Added: 
    

Modified: 
    clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
index 74cd62cd869f8..7dd5b0b6ea108 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
@@ -572,8 +572,6 @@ void ProTypeMemberInitCheck::checkMissingBaseClassInitializer(
 
     for (const CXXCtorInitializer *Init : Ctor->inits())
       if (Init->isBaseInitializer() && Init->isWritten()) {
-        // In template AST BaseInitializer could be generated too even if it's
-        // not target to base class.
         if (const CXXRecordDecl *CRD =
                 Init->getBaseClass()->getAsCXXRecordDecl())
           BasesToInit.erase(CRD->getCanonicalDecl());


        


More information about the cfe-commits mailing list