[clang] [clang] Fix the local parameter of void type inside the `Requires` expression. (PR #109831)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 28 22:58:50 PDT 2024


zyn0217 wrote:

> ```
> static_assert(requires(this int) { true; });
> ```

The grammar doesn't appear to disallow the explicit object parameter in a requires expression, see https://eel.is/c++draft/expr.prim.req#nt:requirement-parameter-list.

But the usage is indeed suspicious to me. We probably need a CWG issue? @cor3ntin @mizvekov 

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


More information about the cfe-commits mailing list