From: Haojian Wu Date: Mon, 19 Dec 2022 08:12:35 +0000 (+0100) Subject: [include-cleaner] Fix a missing review comment. X-Git-Tag: upstream/17.0.6~23305 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8551563c0d77e54c3904fa853c32f82649f65fc1;p=platform%2Fupstream%2Fllvm.git [include-cleaner] Fix a missing review comment. I forgot to add the change to the commit when committing. --- 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();