cishida added inline comments.

================
Comment at: clang/lib/ExtractAPI/ExtractAPIConsumer.cpp:66
+    // Check if we have looked up this particular file entry previously instead
+    // of querying the preprocessor for externsal sources.
+    if (UnknownFileEntries.count(File))
----------------
s/externsal/external


================
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);
----------------
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. 


================
Comment at: clang/test/ExtractAPI/known_files_only.c:6
+// RUN: %clang -extract-api --product-name=GlobalRecord -target 
arm64-apple-macosx \
+// RUN: %t/input1.h %t/input2.h %t/input3.h -o %t/output.json | FileCheck 
-allow-empty %s
+
----------------
It may be useful to add a test for the headermap case to ensure the remapped 
location is recognized. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123148

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to