[clang-tools-extra] 962343a - [include-cleaner] Fix walkUsed only report a single macro ref.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 28 01:13:21 PST 2022


Author: Haojian Wu
Date: 2022-11-28T10:12:10+01:00
New Revision: 962343a979d51cea9363167e9121c446abbdfdbc

URL: https://github.com/llvm/llvm-project/commit/962343a979d51cea9363167e9121c446abbdfdbc
DIFF: https://github.com/llvm/llvm-project/commit/962343a979d51cea9363167e9121c446abbdfdbc.diff

LOG: [include-cleaner] Fix walkUsed only report a single macro ref.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/include-cleaner/lib/Analysis.cpp b/clang-tools-extra/include-cleaner/lib/Analysis.cpp
index e2455e115de2..0f96ae26f51c 100644
--- a/clang-tools-extra/include-cleaner/lib/Analysis.cpp
+++ b/clang-tools-extra/include-cleaner/lib/Analysis.cpp
@@ -38,8 +38,7 @@ void walkUsed(llvm::ArrayRef<Decl *> ASTRoots,
   }
   for (const SymbolReference &MacroRef : MacroRefs) {
     assert(MacroRef.Target.kind() == Symbol::Macro);
-    return CB(MacroRef,
-              findHeaders(MacroRef.Target.macro().Definition, SM, PI));
+    CB(MacroRef, findHeaders(MacroRef.Target.macro().Definition, SM, PI));
   }
 }
 


        


More information about the cfe-commits mailing list