[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 26 14:33:05 PST 2024


Sirraide wrote:

Since we didn’t bring this up in the RFC, do we have any idea as to what we should do with `[[clang::assume]]`? 

My suggestion would be to keep the current semantics for `[[clang::assume]]` (and `__attribute__((assume))`, but probably *not* `[[assume]]`) iff the argument is a string literal—mostly because a string literal would always evaluate to `true` anyway, so there is literally nothing to be gained from writing `[[clang::assume(string-literal)]]` anyway if we interpret it as C++23’s `[[assume]]`.

https://github.com/llvm/llvm-project/pull/81014


More information about the cfe-commits mailing list