[PATCH] D54013: [analyzer] MallocChecker: Avoid redundant transitions.

Umann Kristóf via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 5 09:18:53 PST 2018


Szelethus added a comment.

Please reupload with full context.



================
Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2369
   ProgramStateRef state = C.getState();
-  RegionStateTy RS = state->get<RegionState>();
+  RegionStateTy OldRS = state->get<RegionState>();
   RegionStateTy::Factory &F = state->get_context<RegionState>();
----------------
We are acquiring an object of type `ImmutableMap`, modify it, and put it back into `state`? Can't we just modify it through `ProgramState`'s interface directly?


Repository:
  rC Clang

https://reviews.llvm.org/D54013





More information about the cfe-commits mailing list