[PATCH] D130690: [clangd][NFCI] Store TUPath inside ParsedAST

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 28 02:55:25 PDT 2022


ilya-biryukov added a comment.

I want to understand the trade-offs a bit better.

- what are the actual differences between the file paths passed to TU and the canonical path in source manager?
- what issues does having these differences result in?

Having some tests that illustrate the difference in a real-world setting would be helpful too.

We would still have to go through source manager to produce results for anything but the main file.
This means that after this change we effectively add complexity the path handling by adding an extra code path for the main file.
Moreover, it's the most common path we return, so we could make any problems with the paths from the source manager appear less frequently and, hence, harder to notice and diagnose.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130690/new/

https://reviews.llvm.org/D130690



More information about the cfe-commits mailing list