Open hatcat opened 10 months ago
Trunk seems to compile your example: https://godbolt.org/z/j8WhdsrPK. Patches are not backported even to 17 anymore.
@llvm/issue-subscribers-clang-frontend
Author: J Guy Davidson (hatcat)
It looks like this was broken between clang-15 and clang-17: https://godbolt.org/z/o9rhWKEMK
Let me CC some folks who might have more insights on the apple-clang side of things.
CC @Bigcheese @ldionne @rjmccall
@hatcat Since it looks like this is not an issue on Clang trunk, it's only an issue for the Apple-released version of Clang. The best way to move this forward would be to file a bug report with Apple using https://feedbackassistant.apple.com, however at this point it may be easier to just wait for the fix to be ingested naturally in an upcoming Xcode release, since those are generally not too far behind upstream LLVM.
I believe I have found a bug in the 16.0.0 (assertions) version, minimum repro with comparisons with other compilers here
This is also visible in Apple clang version 15.0.0 (clang-1500.1.0.2.5)