Xcode 16.4 (but not older) and 26.0b5 miscompile/misoptimize some C++ code. Details in upstream issue: https://github.com/llvm/llvm-project/issues/152824 Fixed upstream in: https://github.com/llvm/llvm-project/pull/152913 Please cherry-pick that fix. (I hope this is the right place to file this, this seems to be the home of Apple's Clang fork?) See also FB19522392.