https://github.com/Endilll updated 
https://github.com/llvm/llvm-project/pull/187195

>From 9d0ea20c4fd68685c2fafb8f1d616b505ceb8d9c Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov <[email protected]>
Date: Wed, 18 Mar 2026 08:23:52 +0300
Subject: [PATCH] [clang] Enable exceptions in CWG2486 test

---
 clang/test/CXX/drs/cwg24xx.cpp | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/clang/test/CXX/drs/cwg24xx.cpp b/clang/test/CXX/drs/cwg24xx.cpp
index c71cf8cde82f2..1d3eec327a6c1 100644
--- a/clang/test/CXX/drs/cwg24xx.cpp
+++ b/clang/test/CXX/drs/cwg24xx.cpp
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -std=c++98 -pedantic-errors %s -verify=expected,cxx98-14
-// RUN: %clang_cc1 -std=c++11 -pedantic-errors %s -verify=expected,cxx98-14
-// RUN: %clang_cc1 -std=c++14 -pedantic-errors %s -verify=expected,cxx98-14
-// RUN: %clang_cc1 -std=c++17 -pedantic-errors %s -verify=expected,since-cxx17
-// RUN: %clang_cc1 -std=c++20 -pedantic-errors %s 
-verify=expected,since-cxx20,since-cxx17
-// RUN: %clang_cc1 -std=c++23 -pedantic-errors %s 
-verify=expected,since-cxx20,since-cxx17
-// RUN: %clang_cc1 -std=c++2c -pedantic-errors %s 
-verify=expected,since-cxx20,since-cxx17
+// RUN: %clang_cc1 -std=c++98 -fexceptions -fcxx-exceptions -pedantic-errors 
%s -verify=expected,cxx98-14
+// RUN: %clang_cc1 -std=c++11 -fexceptions -fcxx-exceptions -pedantic-errors 
%s -verify=expected,cxx98-14
+// RUN: %clang_cc1 -std=c++14 -fexceptions -fcxx-exceptions -pedantic-errors 
%s -verify=expected,cxx98-14
+// RUN: %clang_cc1 -std=c++17 -fexceptions -fcxx-exceptions -pedantic-errors 
%s -verify=expected,since-cxx17
+// RUN: %clang_cc1 -std=c++20 -fexceptions -fcxx-exceptions -pedantic-errors 
%s -verify=expected,since-cxx20,since-cxx17
+// RUN: %clang_cc1 -std=c++23 -fexceptions -fcxx-exceptions -pedantic-errors 
%s -verify=expected,since-cxx20,since-cxx17
+// RUN: %clang_cc1 -std=c++2c -fexceptions -fcxx-exceptions -pedantic-errors 
%s -verify=expected,since-cxx20,since-cxx17
 
 // cwg2406 is in cwg2406.cpp
 
@@ -172,7 +172,8 @@ void ref() {
 
 void (*p)();
 void (*pp)() throw() = p;
-// since-cxx17-error@-1 {{cannot initialize a variable of type 'void (*)() 
throw()' with an lvalue of type 'void (*)()': different exception 
specifications}}
+// cxx98-14-error@-1 {{target exception specification is not superset of 
source}}
+// since-cxx17-error@-2 {{cannot initialize a variable of type 'void (*)() 
throw()' with an lvalue of type 'void (*)()': different exception 
specifications}}
 
 struct S {
   typedef void (*p)();

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

Reply via email to