Skip to content

Commit a6128b4

Browse files
committed
updated test case
1 parent 123f6b5 commit a6128b4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/test/SemaCXX/gh139818.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang_cc1 -std=c++23 -fsyntax-only %s -verify
2-
// RUN: %clang_cc1 -std=c++23 -fsyntax-only %s -verify -fexperimental-new-constant-interpreter
1+
// RUN: %clang_cc1 -std=c++23 -fsyntax-only %s -verify -fcxx-exceptions
2+
// RUN: %clang_cc1 -std=c++23 -fsyntax-only %s -verify -fexperimental-new-constant-interpreter -fcxx-exceptions
33

44
namespace GH139818{
55
struct A {
@@ -20,8 +20,8 @@ namespace GH139818{
2020
static_assert(!f1());
2121

2222
struct Y {
23-
constexpr ~Y() noexcept(false) { throw "oops"; } // expected-error {{cannot use 'throw' with exceptions disabled}}
24-
// expected-note@-1 {{subexpression not valid in a constant expression}}
23+
constexpr ~Y() noexcept(false) { throw "oops"; } // expected-note {{subexpression not valid in a constant expression}}
24+
2525
constexpr operator bool() {
2626
return b;
2727
}

0 commit comments

Comments
 (0)