
clang was crashing on a lambda attribute with a statement expression that contained a `return`. It attempted to access the lambda type which was unknown at that point. Fixes https://github.com/llvm/llvm-project/issues/48527
11 lines
424 B
C++
11 lines
424 B
C++
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
int main() { // expected-note {{to match this '{'}}
|
|
auto a = [](void)__attribute__((b(({ // expected-note {{to match this '('}}
|
|
return 0;
|
|
} // expected-error 3 {{expected ')'}} \
|
|
// expected-error {{expected ';' at end of declaration}}
|
|
// expected-error@+2 {{expected ')'}}
|
|
// expected-error@+1 {{expected body of lambda expression}}
|
|
// expected-error {{expected '}'}}
|