[clang-tools-extra] e000c2b - [include-cleaner] NFC, move the macro location fixme to findHeaders.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 11 05:55:40 PST 2022


Author: Haojian Wu
Date: 2022-11-11T14:55:29+01:00
New Revision: e000c2bce75ec59782e1a2459c4db6d7a996590c

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

LOG: [include-cleaner] NFC, move the macro location fixme to findHeaders.

Added: 
    

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

Removed: 
    


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

diff  --git a/clang-tools-extra/include-cleaner/lib/FindHeaders.cpp b/clang-tools-extra/include-cleaner/lib/FindHeaders.cpp
index e9e5126da114..093cba8b769a 100644
--- a/clang-tools-extra/include-cleaner/lib/FindHeaders.cpp
+++ b/clang-tools-extra/include-cleaner/lib/FindHeaders.cpp
@@ -18,6 +18,7 @@ llvm::SmallVector<Header> findHeaders(const SymbolLocation &Loc,
   llvm::SmallVector<Header> Results;
   switch (Loc.kind()) {
   case SymbolLocation::Physical: {
+    // FIXME: Handle macro locations.
     // FIXME: Handle non self-contained files.
     FileID FID = SM.getFileID(Loc.physical());
     const auto *FE = SM.getFileEntryForID(FID);


        


More information about the cfe-commits mailing list