[clang] [C++26] [Contracts] Initial parser support (PR #221139)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 9 02:33:35 PDT 2026


ChuanqiXu9 wrote:

> IIUC, we should diag on this:
> 
> ```c++
> struct A {
>   virtual void f();
> };
> struct B : A {
>   void f() pre(true) override; // error: pre(true) should after override.
> };
> ```
> 
> [class.mem]/p11.4.1:
> 
> ```
> member-declarator:
>   declarator virt-specifier-seq[opt] function-contract-specifier-seq[opt] pure-specifier[opt]
>   declarator requires-clause function-contract-specifier-seq[opt]
> ```

Done

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


More information about the cfe-commits mailing list