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
- rCTE Clang Tools Extra
- Build Status
Buildable 26109 Build 26108: arc lint + arc unit
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 | A different name proposal: canonicalizePath? WDYT? | |
91 | Maybe leave it Optional? | |
clangd/index/SymbolCollector.cpp | ||
58 | This looks like the only change that might subtly change the behavior of our program. I believe things might break because of this. | |
61–64 | Why not do this only in the else branch? | |
62 | This comment looks useful. Maybe keep it in the new implementation? |
clangd/SourceCode.cpp | ||
---|---|---|
203 | Using : twice is a bit hard to read. | |
205 | NIT: remove llvm:: prefix in a cpp file. Same for other occurences. | |
clangd/SourceCode.h | ||
91 | 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 | Thanks for pointing me to the code I've missed |
A different name proposal: canonicalizePath? WDYT?