[PATCH] D80522: [Analyzer] [NFC] Parameter Regions -- Alternative Approach
Balogh, Ádám via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 26 13:05:35 PDT 2020
baloghadamsoftware marked 4 inline comments as done.
baloghadamsoftware added a comment.
In D80522#2055040 <https://reviews.llvm.org/D80522#2055040>, @NoQ wrote:
> Nice, looks like you managed to reuse most of the code. I still feel like we should ditch `DeclRegion` entirely (forcing its ~5 current users consider its specific variants separately) but i don't insist.
Thank you for you comments. I will check tomorrow whether we could remove `DeclRegion` without too much code duplication.
================
Comment at: clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp:539-540
(void)VV;
- assert(cast<VarRegion>(VV.castAs<loc::MemRegionVal>().getRegion())
- ->getStackFrame()->getParent()
- ->getStackFrame() == LC->getStackFrame());
+ if (const auto *VR =
+ dyn_cast<VarRegion>(VV.castAs<loc::MemRegionVal>().getRegion())) {
+ assert(VR->getStackFrame()->getParent()
----------------
NoQ wrote:
> Why did you relax this `cast<>` to `dyn_cast<>`?
I started from the original approach and forgot to reset this file.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80522/new/
https://reviews.llvm.org/D80522
More information about the llvm-commits
mailing list