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

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 7 01:56:15 PDT 2026


================
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -std=c17 -fcontracts -fsyntax-only -verify %s
+
+// Contracts are a C++ feature. Enabling the parser option in C mode must not
----------------
ChuanqiXu9 wrote:

`pre` and `post` are contextual keywords. I've added a test to use them in C++. `constract_assert` was contextual keywords. But @cor3ntin prefer to make it unconditional.

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


More information about the cfe-commits mailing list