[clang] Add tests for CWG issues 6, 212, 232, 2823. (PR #165633)
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 30 12:18:57 PDT 2025
================
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | FileCheck %s --check-prefixes CHECK
+// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | FileCheck %s --check-prefixes CHECK
+// RUN: %clang_cc1 -std=c++14 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | FileCheck %s --check-prefixes CHECK
+// RUN: %clang_cc1 -std=c++17 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | FileCheck %s --check-prefixes CHECK
+// RUN: %clang_cc1 -std=c++20 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | FileCheck %s --check-prefixes CHECK
+// RUN: %clang_cc1 -std=c++23 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | FileCheck %s --check-prefixes CHECK
+// RUN: %clang_cc1 -std=c++2c %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | FileCheck %s --check-prefixes CHECK
+
+namespace cwg6 { // cwg6: yes
----------------
zygoloid wrote:
I don't think we should mark this 3.1 just because part of the test we're using here happens to not work on Clang 3.0. We shouldn't be describing the versions of Clang that accept the test (that's irrelevant to our users); we should instead be describing the versions of Clang that implement the issue resolution.
(If it's important that the test passes on the same versions of Clang that we report, then perhaps we could `#define static_assert` to use the array hack for old versions of Clang instead of reporting imprecise versions in our status table? But that seems like it should be a non-goal to me.)
https://github.com/llvm/llvm-project/pull/165633
More information about the cfe-commits
mailing list