[PATCH] D123148: [clang][extract-api] Process only APIs declared in inputs

Daniel Grumberg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 6 08:20:25 PDT 2022


dang marked 2 inline comments as done.
dang added inline comments.


================
Comment at: clang/lib/ExtractAPI/ExtractAPIConsumer.cpp:72
+    // primarily to resolve headers found via headermaps, as they remap
+    // locations.
+    const auto *FileInfo = PP.getHeaderSearchInfo().getExistingFileInfo(File);
----------------
cishida wrote:
> How is this searching by the way the header was included? It looks like comparisons are based on file locations as `KnownIncludes` stores file paths. 
Upon second thought and further testing all this stuff isn't needed because we always construct the input buffer using `#include "ABSOLUTE_PATH"`. I have added a test to validate that this works when using a header map. If we ever move to relative includes, then we should change how this to use only include string comparisons (potentially caching the FileEntries as a performance optimization).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123148/new/

https://reviews.llvm.org/D123148



More information about the cfe-commits mailing list