[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 18 10:32:38 PDT 2018


Eugene.Zelenko added a comment.

In https://reviews.llvm.org/D45679#1071116, @JonasToth wrote:

> You are doing a great job and i learn new stuff :)
>
> - What do you think about having these functions in a class? Now, we need to recalculate and reanalyze the scope for every variable, multiple times (reference tracking). It would be nice to do it as lazy as possible and memorize the results. Especially addressing the use-case for the const-check, storing that a reference is not modified will save a lot of work = performance


It may be reasonable to have variables/data members dependencies graph and mark them as constant/non constant.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D45679





More information about the cfe-commits mailing list