[clang] Clang/Preprocessor: Support short circuit in directive (PR #123912)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 22 09:07:10 PST 2025
AaronBallman wrote:
> I think it would be more useful in practice if the deprecation warnings respected lazy evaluation, as the PR suggests, but it's worth noting that this deviates from the C Standard, which specifies that macros are replaced first, before short-circuit evaluation takes place.
Ooof, that's a really good point.
C23 6.10.2p13:
> Prior to evaluation, macro invocations in the list of preprocessing tokens that will become the controlling constant expression are replaced (except for those macro names modified by the defined unary operator), just as in normal text. ...
https://github.com/llvm/llvm-project/pull/123912
More information about the cfe-commits
mailing list