Issue 137896
Summary "'ownership_returns' attribute takes no more than 1 argument" is wrong
Labels new issue
Assignees
Reporter halbi2
    https://godbolt.org/z/nz8vMME7r
```
[[clang::ownership_returns()]] int *bad0(int);
[[clang::ownership_returns(x)]] int *good1(int);
[[clang::ownership_returns(x,1)]] int *good2(int);
[[clang::ownership_returns(x,1,1)]] int *bad3(int);
```
Issues only two errors, on `bad0` and `bad3`. `good2` is accepted. But for `bad3` the error message is:
```
<source>:4:3: error: 'ownership_returns' attribute takes no more than 1 argument
    4 | [[clang::ownership_returns(x,1,1)]] int *bad3(int);
      |   ^
```
I think this is a bug. "1 argument" should be "2 arguments".
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to