[PATCH] D77229: [Analyzer][WIP] Avoid handling of LazyCompundVals in IteratorModeling

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 9 08:07:49 PDT 2020


baloghadamsoftware updated this revision to Diff 256310.
baloghadamsoftware added a comment.

OK. I solved almost every problem except that `checkDeadSymbols()` removes the iterator position keyed by the temporary region representing the argument from the map before it is needed. Either I must somehow recognize that although the region is not "live" but the call whose argument it stores is not postchecked yet. I have no idea how to do this. Or, which I would prefer is to modify `SymbolReaper` so that `isLive()` returns true for temporary regions storing arguments of calls not postchecked yet. I have no idea either how to do this. Maybe should we take the `Expr` of `CXXTempObjectRegion`, use `ParentMap` to recognize whether it is a parameter for a `FunctionDecl`, but how to check whether the call for the function of the `FunctionDecl` is not postchecked yet? @NoQ, could you please, help me in this? Thx!


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

https://reviews.llvm.org/D77229

Files:
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
  clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp
  clang/lib/StaticAnalyzer/Checkers/Iterator.cpp
  clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp
  clang/lib/StaticAnalyzer/Checkers/STLAlgorithmModeling.cpp
  clang/lib/StaticAnalyzer/Core/CallEvent.cpp
  clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
  clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
  clang/test/Analysis/container-modeling.cpp
  clang/test/Analysis/iterator-modeling.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77229.256310.patch
Type: text/x-patch
Size: 43952 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200409/e510696b/attachment-0001.bin>


More information about the cfe-commits mailing list