Don't treat invalid parameters as being unused
authorAaron Ballman <aaron@aaronballman.com>
Wed, 22 Jun 2022 12:06:08 +0000 (08:06 -0400)
committerAaron Ballman <aaron@aaronballman.com>
Wed, 22 Jun 2022 12:56:38 +0000 (08:56 -0400)
commitbb297024fad2f6c3ccaaa6a5c3a270f73f15f3ac
tree6b0920cc39bcc7e0054a8e3c6a0ccd177cec4af4
parent8958e70ccbe9c12b2d0b622b8b5623a8f47bb183
Don't treat invalid parameters as being unused

The misc-unused-parameters check would trigger false positive warnings
about the parameter being unused when the parameter declaration was
invalid. No longer issue the warning in that case on the assumption
that most parameters are used in practice, so the extra diagnostic is
most likely a false positive.

Fixes #56152
clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/test/clang-tidy/checkers/misc-unused-invalid-parameter.cpp [new file with mode: 0644]