[Clang] -Wunused-parameter is not emitted for coroutines with class-specific operator new
https://godbolt.org/z/Kh68nahxq
I'd like to work on this.
It appears that collectPlacementArgs() calls BuildDeclRefExpr() for each coroutine parameter during class-specific allocation-function overload resolution, marking the parameters as referenced without restoring their original state and thereby suppressing -Wunused-parameter.
I'd like to work on this.
It appears that
collectPlacementArgs()callsBuildDeclRefExpr()for each coroutine parameter during class-specific allocation-function overload resolution, marking the parameters as referenced without restoring their original state and thereby suppressing-Wunused-parameter.
Note, we don't assign issues until there is a PR and we verify it is making progress.
I'd like to work on this. It appears that
collectPlacementArgs()callsBuildDeclRefExpr()for each coroutine parameter during class-specific allocation-function overload resolution, marking the parameters as referenced without restoring their original state and thereby suppressing-Wunused-parameter.Note, we don't assign issues until there is a PR and we verify it is making progress.
Hello, I've opened a PR with a fix: https://github.com/llvm/llvm-project/pull/217518. It preserves each coroutine parameter's referenced state while collecting placement arguments and adds regression coverage for -Wunused-parameter.