From 8551563c0d77e54c3904fa853c32f82649f65fc1 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 19 Dec 2022 09:12:35 +0100 Subject: [PATCH] [include-cleaner] Fix a missing review comment. I forgot to add the change to the commit when committing. --- clang-tools-extra/include-cleaner/lib/WalkAST.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang-tools-extra/include-cleaner/lib/WalkAST.cpp b/clang-tools-extra/include-cleaner/lib/WalkAST.cpp index cf2f0d7..639add8 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 { } NamedDecl *getMemberProvider(QualType Base) { if (Base->isPointerType()) - Base = Base->getPointeeType(); + return getMemberProvider(Base->getPointeeType()); // Unwrap the sugar ElaboratedType. if (const auto *ElTy = dyn_cast(Base)) - Base = ElTy->getNamedType(); + return getMemberProvider(ElTy->getNamedType()); if (const auto *TT = dyn_cast(Base)) return TT->getDecl(); -- 2.7.4