15 lines · cpp
1// RUN: %check_clang_tidy -std=c++20 %s bugprone-exception-escape %t -- \2// RUN: -- -fexceptions -Wno-everything3 4namespace GH104457 {5 6consteval int consteval_fn(int a) {7 if (a == 0)8 throw 1;9 return a;10}11 12int test() noexcept { return consteval_fn(1); }13 14} // namespace GH10445715