blob: 2d3c69fc38f65030ec65a12a0a0df0f1e3063ce2 (
plain)
1
2
3
4
5
6
7
8
|
// RUN: %clang_cc1 -fsyntax-only -std=c++17 %s -verify
// expected-no-diagnostics
void test_noexcept() {
const auto lambda = [](int x) { return x + 1; };
static_assert(noexcept((int (*)(int))(lambda)),
"Lambda-to-function-pointer conversion is expected to be noexcept");
}
|