VitaNuo added a comment. Thanks for the review!
================ Comment at: clang-tools-extra/clangd/Headers.cpp:76 + Out->MainFileIncludesBySpelling.try_emplace(Inc.Written) + .first->second.push_back(static_cast<HeaderID>(*Inc.HeaderID)); } ---------------- kadircet wrote: > right now we're only storing "resolved" includes from the main file and not > all, this is creating a discrepancy between the view one gets through > `MainFileIncludes` and through this map. > in addition to that only storing `HeaderID` gets the job done for > IncludeCleaner, but won't really help anyone that wants to match main file > includes apart from that (there's no easy way to go from a `HeaderID` to an > `Inclusion`). > > so instead of storing the `HeaderID` in the map values, we can actually store > indexes into `MainFileIncludes`. later on during the lookup, we can build a > `SmallVector<Inclusion *>` that contains pointers to the relevant includes. > WDYT? Ok sure. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143509/new/ https://reviews.llvm.org/D143509 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits