[all-commits] [llvm/llvm-project] fff59f: [clang-tidy] Improve modernize-redundant-void-arg ...

Richard Thomson via All-commits all-commits at lists.llvm.org
Wed Jan 12 12:52:24 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fff59f48173dc2f2a3ce867fa0c7836b23214110
      https://github.com/llvm/llvm-project/commit/fff59f48173dc2f2a3ce867fa0c7836b23214110
  Author: Richard <legalize at xmission.com>
  Date:   2022-01-12 (Wed, 12 Jan 2022)

  Changed paths:
    M clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.cpp
    M clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp

  Log Message:
  -----------
  [clang-tidy] Improve modernize-redundant-void-arg to recognize macro uses

Sometimes a macro invocation will look like an argument list
declaration.  Improve the check to detect this situation and not
try to modify the macro invocation.

Thanks to Nathan James for the fix.

- Ignore implicit typedefs (e.g. compiler builtins)
- Improve lexing state machine to locate void argument tokens
- Add additional return_t() macro tests
- clang-format control in the test case file
- remove braces around single statements per LLVM style guide

Fixes #43791

Differential Revision: https://reviews.llvm.org/D116425




More information about the All-commits mailing list