[all-commits] [llvm/llvm-project] bb2970: Don't treat invalid parameters as being unused

Aaron Ballman via All-commits all-commits at lists.llvm.org
Wed Jun 22 05:56:58 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bb297024fad2f6c3ccaaa6a5c3a270f73f15f3ac
      https://github.com/llvm/llvm-project/commit/bb297024fad2f6c3ccaaa6a5c3a270f73f15f3ac
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2022-06-22 (Wed, 22 Jun 2022)

  Changed paths:
    M clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    A clang-tools-extra/test/clang-tidy/checkers/misc-unused-invalid-parameter.cpp

  Log Message:
  -----------
  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




More information about the All-commits mailing list