[clang] [C++26] [Contracts] Initial parser support (PR #221139)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 7 02:45:22 PDT 2026
================
@@ -0,0 +1,77 @@
+// RUN: %clang_cc1 -std=c++2c -fcontracts -fsyntax-only -verify %s
+
+// This file exercises the declaration paths which can lead to a function
+// contract specifier. Contract predicates are parsed but not retained yet.
+
+template <typename>
+concept Always = true;
+
+int declaration(int value) pre(value > 0) post(result: value >= 0);
----------------
ChuanqiXu9 wrote:
Why this should be an error? I failed to understand.
https://github.com/llvm/llvm-project/pull/221139
More information about the cfe-commits
mailing list