Issue |
125677
|
Summary |
[clang] Clang accepts function attributes on lambdas in the wrong place
|
Labels |
clang,
c++23
|
Assignees |
|
Reporter |
usx95
|
```cpp
void foo() {
auto x = [] [[noreturn]] (int msg) { throw; }; // accepted in wrong place.
auto y = [](int msg) [[noreturn]] { throw; }; // not accepted in the right place
auto z = [](int) [[clang::annotate_type("foo")]] {};
}
```
https://godbolt.org/z/sqnWo4v67
The attributes should be accepted after the parameters in the lambda declarator.
https://timsong-cpp.github.io/cppwp/n4868/expr.prim.lambda#nt:lambda-declarator
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs