================ @@ -188,6 +290,20 @@ llvm::SmallVector<Hinted<Header>> findHeaders(const SymbolLocation &Loc, OptionalFileEntryRef FE = SM.getFileEntryRefForID(FID); if (!FE) return {}; + + if (SrcMgr::isSystem( + SM.getSLocEntry(FID).getFile().getFileCharacteristic())) { + if (auto MappingHeader = SystemIncludeMap::get().mapHeader(FE->getName()); + !MappingHeader.empty()) { + for (auto &Header : MappingHeader) + Results.emplace_back(Header, Hints::PublicHeader); + assert(!Results.empty()); + Results.front().Hint |= Hints::PreferredHeader; + // FIXME: should we include the original header as well? ---------------- kadircet wrote:
yes, i think we should treat these similar to IWYU private -> public mappings. https://github.com/llvm/llvm-project/pull/66089 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits