There were a few different places where we canonicalized paths, each
one had its own flavor. This patch tries to unify them all under one place.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
The change mostly LG, the only important comment from me is about toURI. I believe it would actually have an observable effect in the real world and I'm not sure things won't break after it.
Could we avoid changing it and focus only on tweaking the "canonical" path for the FileEntries in this change? Those look like a no-op in most practical cases.
clangd/SourceCode.h | ||
---|---|---|
91 ↗ | (On Diff #178635) | A different name proposal: canonicalizePath? WDYT? |
91 ↗ | (On Diff #178635) | Maybe leave it Optional? |
clangd/index/SymbolCollector.cpp | ||
58 ↗ | (On Diff #178635) | This looks like the only change that might subtly change the behavior of our program. I believe things might break because of this. |
62 ↗ | (On Diff #178635) | This comment looks useful. Maybe keep it in the new implementation? |
64 ↗ | (On Diff #178635) | Why not do this only in the else branch? |
clangd/SourceCode.cpp | ||
---|---|---|
203 ↗ | (On Diff #178685) | Using : twice is a bit hard to read. |
205 ↗ | (On Diff #178685) | NIT: remove llvm:: prefix in a cpp file. Same for other occurences. |
clangd/SourceCode.h | ||
91 ↗ | (On Diff #178635) | SG, not a big deal anyway. I have a personal bias against methods starting with get if they're not getter xD) |
clangd/index/SymbolCollector.cpp | ||
58 ↗ | (On Diff #178635) | Thanks for pointing me to the code I've missed |