[clang-tools-extra] 8551563 - [include-cleaner] Fix a missing review comment.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 19 00:17:31 PST 2022


Author: Haojian Wu
Date: 2022-12-19T09:14:33+01:00
New Revision: 8551563c0d77e54c3904fa853c32f82649f65fc1

URL: https://github.com/llvm/llvm-project/commit/8551563c0d77e54c3904fa853c32f82649f65fc1
DIFF: https://github.com/llvm/llvm-project/commit/8551563c0d77e54c3904fa853c32f82649f65fc1.diff

LOG: [include-cleaner] Fix a missing review comment.

I forgot to add the change to the commit when committing.

Added: 
    

Modified: 
    clang-tools-extra/include-cleaner/lib/WalkAST.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/include-cleaner/lib/WalkAST.cpp b/clang-tools-extra/include-cleaner/lib/WalkAST.cpp
index cf2f0d7bcff63..639add8f5c4be 100644
--- a/clang-tools-extra/include-cleaner/lib/WalkAST.cpp
+++ b/clang-tools-extra/include-cleaner/lib/WalkAST.cpp
@@ -42,10 +42,10 @@ class ASTWalker : public RecursiveASTVisitor<ASTWalker> {
   }
   NamedDecl *getMemberProvider(QualType Base) {
     if (Base->isPointerType())
-      Base = Base->getPointeeType();
+      return getMemberProvider(Base->getPointeeType());
     // Unwrap the sugar ElaboratedType.
     if (const auto *ElTy = dyn_cast<ElaboratedType>(Base))
-      Base = ElTy->getNamedType();
+      return getMemberProvider(ElTy->getNamedType());
 
     if (const auto *TT = dyn_cast<TypedefType>(Base))
       return TT->getDecl();


        


More information about the cfe-commits mailing list