dougsonos wrote:
Aha, I dumped a big AST to JSON, searched for a `CXXBindTemporaryExpr` inside a
`VarDecl` and came up with this example:
```
/Users/doug/Desktop/makestring.cpp:10:7: warning: function with 'nonblocking'
attribute must not call non-'nonblocking' destructor 'String::~String'
[-Wfunction-effects]
10 | auto str = String::make();
| ^
/Users/doug/Desktop/makestring.cpp:10:13: warning: function with 'nonblocking'
attribute must not call non-'nonblocking' destructor 'String::~String'
[-Wfunction-effects]
10 | auto str = String::make();
| ^
```
It may be a little annoying to get two warnings but technically I think there
really are two implicit calls to the destructor. (right? the result of
`String::make()` might be getting moved-from but there's still an implicit
destructor.)
https://github.com/llvm/llvm-project/pull/166110
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits