Debian Codegraph @

clang/test/SemaCXX/GH61441.cpp

raw
1 // RUN: %clang_cc1 -fsyntax-only -verify -cl-std=clc++ -fblocks %s
2 // Checks Clang does not crash. We run in OpenCL mode to trigger block pointer
3 // crash. The __fp16 crash happens in standard mode too.
4
5 template <bool>
6 int foo() {
7 auto x = [&](__fp16) { return 0; }; // expected-error {{not allowed}}
8 auto y = [&](void(^)(int)) { return 0; }; // expected-error {{not allowed}}
9 return 0;
10 }
11
12 int bar() { return foo<true>(); }