[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 10 05:14:58 PDT 2018


lebedev.ri added inline comments.
Herald added a subscriber: Szelethus.


================
Comment at: clang-tidy/utils/ExprMutationAnalyzer.h:38
+  const Stmt *findDeclMutation(ArrayRef<ast_matchers::BoundNodes> Matches);
+  const Stmt *findDeclMutation(const Decl *Dec);
+
----------------
@shuaiwang, @JonasToth hi.
Is it very intentional that this `findDeclMutation()` is private?

Is there some other way i should be doing if i have a statement `S`,
a declRefExpr `D`, and i want to find the statement `Q`, which mutates
the underlying variable to which the declRefExpr `D` refers?


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D45679





More information about the cfe-commits mailing list