[BoundsSafety] Backport TypeLoc improvements
https://github.com/llvm/llvm-project/pull/167287 adds proper TypeLoc support for bounds safety types in upstream LLVM. It hasn't been merged yet, because it would cause downstream merge conflicts. We want to resolve those conflicts ahead of time, to avoid disruption when the upstream PR is merged. We currently have some downstream hacks to work around the fact that bounds safety types are missing TypeLocs - these should be updated to extract source locations from the TypeLoc instead. These locations should be apparent from the merge conflicts.
Concretely, what needs to be done is to cherry-pick the commits from the upstream PR onto swiftlang/llvm-project/next, resolve the merge conflicts, make sure all the tests pass, and open a PR against this repo. If any changes are made to the code from https://github.com/llvm/llvm-project/pull/167287 while cherry-picking, that PR then needs to be updated to match.
Hi @hnrklssn, I would like to take this task.
To be clear, I am going to cherry pick the commits from llvm#167287 onto swiftlang/llvm-project/next, resolve the merge conflicts, run the relevant test suites, and open a PR here.
If there is a preferred set of tests to run beyond the standard check clang and check llvm, please let me know
The most relevant tests will be in clang/test/BoundsSafety/. These are run as part of check-clang, but for faster iteration you may not want to run all non-bounds safety tests each time. There may or may not exist a check-clang-boundssafety target, or you can use something like LIT_FILTER=BoundsSafety ninja check-clang, or invoke llvm-lit directly.
@Vincent-Lin-UF are you still working on this?