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

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 7 02:43:57 PDT 2026


================
@@ -12,6 +12,10 @@
 
 let Component = "Parse" in {
 let CategoryName = "Parse Issue" in {
+def err_contracts_require_cxx26 : Error<"contracts are a C++26 feature">;
+def err_contracts_disabled : Error<
+  "contracts support is disabled; pass '-fcontracts' to enable it">;
----------------
ChuanqiXu9 wrote:

I don't think so as we didn't do this before. And we actually didn't want end users to use this until we make it a ClangOption. And people who understand it will use `-Xclang` actually. So i don't think we need that.

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


More information about the cfe-commits mailing list