[clang] [C++26] [Contracts] Support Parser, AST and AST Serialization (1/n) (PR #205739)
Yihan Wang via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 25 02:17:21 PDT 2026
================
@@ -2012,6 +2003,74 @@ enum class MultiVersionKind {
TargetVersion
};
+/// Represents a single C++26 contract annotation (P2900R14).
+///
+/// This is the primary template for pre-conditions (IsPostCondition=false).
+/// Nodes are ASTContext-allocated and form a singly-linked list on
+/// FunctionDecl.
+///
+/// \code
+/// int f(int x) pre(x > 0) pre(x < 100);
+/// // ^~~~~~~~~~~ ^~~~~~~~~~~~
----------------
yronglin wrote:
```suggestion
/// ^~~~~~~~~~~ ^~~~~~~~~~~~
```
https://github.com/llvm/llvm-project/pull/205739
More information about the cfe-commits
mailing list