[libcxx] [llvm] [libc++][hardening] Rework macros for enabling the hardening mode. (PR #70575)

Louis Dionne via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 2 12:50:13 PDT 2023


================
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// This test verifies that setting the hardening mode to a value that's not part of the predefined constants triggers
+// a compile-time error.
+
+// Modules build produces a different error ("Could not build module 'std'").
+// UNSUPPORTED: clang-modules-build
+
----------------
ldionne wrote:

```
// REQUIRES: verify-support
```

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


More information about the llvm-commits mailing list