llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[BoundsSafety] Backport TypeLoc improvements

Open hnrklssn opened this issue 9 months ago • 3 comments

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.

hnrklssn avatar Feb 24 '26 23:02 hnrklssn

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

imvinlin avatar Feb 25 '26 00:02 imvinlin

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.

hnrklssn avatar Feb 25 '26 01:02 hnrklssn

@Vincent-Lin-UF are you still working on this?

hnrklssn avatar Mar 10 '26 18:03 hnrklssn