[all-commits] [llvm/llvm-project] 9d4162: [clang-tidy] Add fix-it support to `llvmlibc-inlin...

Roland McGrath via All-commits all-commits at lists.llvm.org
Mon Aug 7 12:16:31 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9d4162ff28b479c93d55df67bf38507bdc50a2d1
      https://github.com/llvm/llvm-project/commit/9d4162ff28b479c93d55df67bf38507bdc50a2d1
  Author: Roland McGrath <mcgrathr at google.com>
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
    M clang-tools-extra/clang-tidy/llvmlibc/InlineFunctionDeclCheck.cpp
    M clang-tools-extra/test/clang-tidy/checkers/llvmlibc/inline-function-decl.hpp

  Log Message:
  -----------
  [clang-tidy] Add fix-it support to `llvmlibc-inline-function-decl`

This is very simplistic and could be more thorough by replacing
an existing `LIBC_INLINE` in the wrong location or a redunant
`inline` when inserting the right macro use.  But as is this
suffices to automatically apply fixes for most or all of the
instances in the libc tree today and get working results (despite
some superfluous `inline` keywords left behind).

Reviewed By: abrachet

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




More information about the All-commits mailing list