[clang] [clang] Add tests for some of CWG issues resolved in Croydon (2026-03) (PR #189299)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Mon May 4 01:44:54 PDT 2026
================
@@ -0,0 +1,40 @@
+// RUN: %clang_cc1 -std=c++98 -fexceptions -fcxx-exceptions -pedantic-errors %s -verify-directives -verify=expected,cxx98-11
+// RUN: %clang_cc1 -std=c++11 -fexceptions -fcxx-exceptions -pedantic-errors %s -verify-directives -verify=expected,cxx98-11
+// RUN: %clang_cc1 -std=c++14 -fexceptions -fcxx-exceptions -pedantic-errors %s -verify-directives -verify=expected,since-cxx14
+// RUN: %clang_cc1 -std=c++17 -fexceptions -fcxx-exceptions -pedantic-errors %s -verify-directives -verify=expected,since-cxx14
+// RUN: %clang_cc1 -std=c++20 -fexceptions -fcxx-exceptions -pedantic-errors %s -verify-directives -verify=expected,since-cxx14
+// RUN: %clang_cc1 -std=c++23 -fexceptions -fcxx-exceptions -pedantic-errors %s -verify-directives -verify=expected,since-cxx14
+// RUN: %clang_cc1 -std=c++2c -fexceptions -fcxx-exceptions -pedantic-errors %s -verify-directives -verify=expected,since-cxx14
+
+// cxx98-11-no-diagnostics
+
+namespace cwg3128 { // cwg3128: 2.7
+#if __cplusplus >= 201103L
+void f();
+static_assert(noexcept(noexcept(f())), "");
+#endif
+} // namespace cwg3128
+
+namespace cwg3151 { // cwg3151: 2.7
+#if __cplusplus >= 201402L
+auto lambda = []{};
+struct S : decltype(lambda) {};
----------------
Endilll wrote:
Added this test case. Thank you for suggestion.
https://github.com/llvm/llvm-project/pull/189299
More information about the cfe-commits
mailing list