[PATCH] D107873: [WIP][clang-tidy] adds a const-qualified parameter check

Christopher Di Bella via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 10 16:43:23 PDT 2021


cjdb created this revision.
cjdb added a reviewer: aaron.ballman.
Herald added subscribers: xazax.hun, mgorny.
cjdb requested review of this revision.
Herald added projects: LLVM, clang-tools-extra.
Herald added subscribers: cfe-commits, llvm-commits.

Checks ``const``-qualified parameters to determine if they should be
passed by value or by reference-to-``const`` for function definitions.
Ignores proper function declarations, parameters without ``const`` in
their type specifier, and dependent types.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D107873

Files:
  clang-tools-extra/clang-tidy/performance/CMakeLists.txt
  clang-tools-extra/clang-tidy/performance/ConstParameterValueOrRef.cpp
  clang-tools-extra/clang-tidy/performance/ConstParameterValueOrRef.h
  clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp
  clang-tools-extra/docs/clang-tidy/checks/performance-const-parameter-value-or-ref.rst
  clang-tools-extra/test/clang-tidy/checkers/performance-const-parameter-value-or-ref.cpp
  llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/performance/BUILD.gn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107873.365629.patch
Type: text/x-patch
Size: 24561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210810/9b77cf5c/attachment.bin>


More information about the llvm-commits mailing list