[PATCH] D68074: [clang-tidy] Add readability-make-member-function-const

Matthias Gehre via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 26 00:56:00 PDT 2019


mgehre created this revision.
mgehre added reviewers: aaron.ballman, gribozavr, hokein, alexfh.
mgehre added a project: clang.
Herald added subscribers: xazax.hun, mgorny.

Finds non-static member functions that can be made ``const``
because the functions don't use ``this`` in a non-const way.

The check conservatively tries to preserve logical costness in favor of
physical costness. See readability-make-member-function-const.rst for more
details.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D68074

Files:
  clang-tools-extra/clang-tidy/readability/CMakeLists.txt
  clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.cpp
  clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.h
  clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/list.rst
  clang-tools-extra/docs/clang-tidy/checks/readability-make-member-function-const.rst
  clang-tools-extra/test/clang-tidy/readability-make-member-function-const.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68074.221894.patch
Type: text/x-patch
Size: 23534 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190926/411b9e82/attachment-0001.bin>


More information about the cfe-commits mailing list