[clang-tools-extra] [clangd] Avoid round-trip from SourceLocation to clangd::Range and back in SymbolCollector::handleMacros() (PR #127757)
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 18 23:38:22 PST 2025
HighCommander4 wrote:
Noticed this while looking at https://github.com/llvm/llvm-project/issues/120175. The range information originates as a `CharSourceRange` in `MacroOccurrence::toRange()`, then it's converted to `clangd::Range` using `halfOpenToRange()`. Then we convert it back to a `SourceRange` using `sourceLocationInMainFile()`, which seems like an unnecessary round-trip.
https://github.com/llvm/llvm-project/pull/127757
More information about the cfe-commits
mailing list