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

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 26 07:01:36 PDT 2019


Eugene.Zelenko added a comment.

See also PR21981 and D45444 <https://reviews.llvm.org/D45444>.



================
Comment at: clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.cpp:93
+  bool VisitUser(const ImplicitCastExpr *Cast) {
+
+    if (Cast->getCastKind() != CK_NoOp)
----------------
Unnecessary empty line.


================
Comment at: clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.cpp:125
+  bool VisitUser(const MemberExpr *Member, bool OnConstObject) {
+
+    if (Member->isBoundMemberFunction(Ctxt)) {
----------------
Unnecessary empty line.


================
Comment at: clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.cpp:213
+void MakeMemberFunctionConstCheck::registerMatchers(MatchFinder *Finder) {
+  Finder->addMatcher(
+      cxxMethodDecl(
----------------
Shouldn't check work only in C++?


================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:109
+
+  Finds non-static member functions that can be made ``const``.
+
----------------
Please synchronize with first sentence in documentation.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68074/new/

https://reviews.llvm.org/D68074





More information about the cfe-commits mailing list