[libcxx-commits] [libcxx] [WIP][libc++] Implement library support for contracts (PR #86251)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 22 17:03:49 PDT 2024
================
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23
+
+// <contracts>
+
+// TODO
+
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_CONTRACTS_EVALUATION_SEMANTIC_ENFORCE
----------------
ldionne wrote:
Fully agreed. In reality this would be passed to the compiler as e.g. `-fcontracts=<semantic>` so there would be no macro involved. Similarly the `__pre__` and `__post__` macros wouldn't need to exist, I was just roughly emulating what the compiler might do.
https://github.com/llvm/llvm-project/pull/86251
More information about the libcxx-commits
mailing list