bolt/deps/llvm-18.1.8/clang/test/SemaCXX/PR76631.cpp

10 lines
337 B
C++
Raw Normal View History

2025-02-14 19:21:04 +01:00
// RUN: %clang_cc1 -verify -std=c++11 -fsyntax-only %s
[[noreturn]] void throw_int() {
throw int(); // expected-error {{cannot use 'throw' with exceptions disabled}}
}
void throw_int_wrapper() {
[[clang::musttail]] return throw_int(); // expected-error {{'musttail' attribute may not be used with no-return-attribute functions}}
}