[llvm] [ADT] Fix alignment check in unique_function constructor (PR #99403)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 21 10:52:11 PDT 2024
dwblaikie wrote:
> There is no easy way to unit-test the fix since inline storage is considered to be an implementation detail so we shouldn't assume how the lambda ends up being stored.
I'd be ok with a test that's a bit implementation-detail-y, given that this bug wasn't caught previously (thanks for spotting it, btw!)
How'd you come across it? could the bug fix be tested in a similar manner to however you observed this?
Alternatively, I think it'd be OK to use a type that recorded its own address, and use that to test that the address lies within the unique_function's address range.
https://github.com/llvm/llvm-project/pull/99403
More information about the llvm-commits
mailing list