[PATCH] D77229: [Analyzer][WIP] Avoid handling of LazyCompundVals in IteratorModeling
Balogh, Ádám via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 14 06:22:54 PDT 2020
baloghadamsoftware added a comment.
OK, I made some experiments. In function `vector_insert_begin()` of test file `iterator-modeling.cpp`, line `960` we pass `i0` to `std::vector::insert()`. This function has no body at all so regardless of inlining of STL functions is enabled, this function is never inlined. Probably for this reason, because it does not have its `StackFrame` function `handleConstructionContext()` returns a C++ temporary at the end of the function. This temporary is not added to the construction context of the function thus it is not marked as live before removing dead symbols.
I see two ways now to resolve this. The first is to add these temporaries into the construction context. This requires the assertion in `ExprEngine::finishArgumentConstruction()` (around line 544, but I have some debug printouts there, at the moment so the line number may not be accurate) to be changed because it assumes that the region is a `VarRegion`. The second is somehow to recognize these temporary regions and mark them as alive based on the `CallEvent` by somehow checking the regions bound to its arguments but I wonder how exactly to do this.
@NoQ, I need you comments about the right direction about proceeding further.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77229/new/
https://reviews.llvm.org/D77229
More information about the cfe-commits
mailing list