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

Matthias Gehre via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 29 10:48:51 PDT 2019


mgehre added a comment.

In D68074#1683770 <https://reviews.llvm.org/D68074#1683770>, @lebedev.ri wrote:

> Awesome!
>  I believe i have asked this question in the convert-to-static diff - can ExprMutAnalyzer be used here?


I believe in this case, we can get away with a simpler analysis. Because `this` is an prvalue,
there are less operations that can be done to it, and it seems easy to just list those here. Also, we want
to conservatively disallow "const" access to non-public member variables/functions, and I don't see
how this would elegantly integrate with using the ExprMutationAnalyzer.


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