================
@@ -1,16 +1,47 @@
-// RUN: %clang_cc1 -std=c++98 -fexceptions -fcxx-exceptions -pedantic-errors 
%s -verify-directives -verify=expected
-// RUN: %clang_cc1 -std=c++11 -fexceptions -fcxx-exceptions -pedantic-errors 
%s -verify-directives -verify=expected
-// RUN: %clang_cc1 -std=c++14 -fexceptions -fcxx-exceptions -pedantic-errors 
%s -verify-directives -verify=expected
-// RUN: %clang_cc1 -std=c++17 -fexceptions -fcxx-exceptions -pedantic-errors 
%s -verify-directives -verify=expected
-// RUN: %clang_cc1 -std=c++20 -fexceptions -fcxx-exceptions -pedantic-errors 
%s -verify-directives -verify=expected
-// RUN: %clang_cc1 -std=c++23 -fexceptions -fcxx-exceptions -pedantic-errors 
%s -verify-directives -verify=expected
-// RUN: %clang_cc1 -std=c++2c -fexceptions -fcxx-exceptions -pedantic-errors 
%s -verify-directives -verify=expected
+// 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
 
-
-// expected-no-diagnostics
+// cxx98-11-no-diagnostics
 
 namespace cwg3106 { // cwg3106: 2.7
 #if __cplusplus >= 201103L
 const char str[9] = R"(\u{1234})";
 #endif
 } // namespace cwg3106
+
+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) {};
+static_assert(!__is_final(decltype(lambda)), "");
+#endif
+} // namespace cwg3151
+
+namespace cwg3156 { // cwg3156: 3.5
+#if __cplusplus >= 201402L
+struct C { // #cwg3156-C
+  C(int) = delete; // #cwg3156-C-int
+  C(){};
+};
+
+int x = [b = C(3)](){ return 4; }();
+// since-cxx14-error@-1 {{functional-style cast from 'int' to 'C' uses deleted 
function}}
+//   since-cxx14-note@#cwg3156-C-int {{candidate constructor has been 
explicitly deleted}}
+//   since-cxx14-note@#cwg3156-C {{candidate constructor (the implicit copy 
constructor)}}
+//   since-cxx14-note@#cwg3156-C {{candidate constructor (the implicit move 
constructor)}}
+#endif
----------------
localspook wrote:

CWG3156 specifically deals with *unevaluated* lambdas, so I believe there 
should be a test like in the DR. But the wording changes are a bit confusing to 
me: I *think* they're saying "semantic checks are performed on the initializers 
even if the lambda is unevaluated"? In which case Clang is conforming: 
https://godbolt.org/z/G5n8Ev613

https://github.com/llvm/llvm-project/pull/189299
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to