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

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 7 14:16:27 PST 2024


erichkeane wrote:

> > I think the confusion/conflict between this and clang::assume needs to be figured out. These two should just be, as close as possible, spellings of the same thing.
> 
> Well, apparently, `clang::assume` always takes a string and is meant for OMP assumptions, so one solution would be to just apply `clang::assume` semantics iff the argument is a string literal since string literals would always be converted to `true` anyway.

Hmm... I'll have to think about this.

Side note: I don't see any tests validating that these are being properly instantiated (either by AST dump or by codegen), the only template cases i see are ones where the instantiation not happening doesn't 'matter'.  Also, I don't see how these are affecting calls through concepts, so I'd like to see testing for that as well (that is, how the attribute with a failure during instantiation does).

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


More information about the cfe-commits mailing list