[libcxx-commits] [libcxx] [libc++][Android] Always redirect <stdatomic.h> to <atomic> (PR #143036)
Aaron Ballman via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Apr 22 09:51:55 PDT 2026
AaronBallman wrote:
> @AaronBallman I think your numbers are a bit inflated. I scrolled a bit through the linked search and noticed that there are a lot of cases of either `_Atomic` simply being in a comment or in a string.
Yeah, it's an estimate at best (I couldn't find a good regex that sourcegraph would accept; re2 is so limiting!)
> I've tried to reduce the false-positives a bit (and hopefully didn't introduce any false-negatives) and the numbers look a lot less daunting (even with still quite a few false-positives): https://sourcegraph.com/search?q=context:global+file:.*%5C.cpp+-file:.*test.*+%5Cn%28%5B%5E/%5Cn%5D%5B%5E/%5Cn%5D%29*%5B%5E%5Cn%5D%3F%5Cb_Atomic%5Cb%5B%5E%22%5D+count:1000000+-file:SemaType.cpp+-file:TypePrinter.cpp&patternType=regexp&case=yes&sm=0
>
> I don't know how much code is actually affected of course, but I hope you think it's at least viable to try, as at least so far this approach seems like the least bad option.
I think it's worth exploring but again, this is a long-standing extension that we told users they could rely on. Breaking trust with users is a great way to lose users, so if there are alternatives that don't require us to go back on a feature we've supported for a decade+, that's preferable even if awkward. Sometimes we don't get to have nice things because keeping existing code working matters more. (I don't know that we're in that situation here, just setting expectations that this requires a lot more research and is not necessarily an easy path forward.)
https://github.com/llvm/llvm-project/pull/143036
More information about the libcxx-commits
mailing list