[clang] [analyzer] Detect leaks of stack addresses via output params, indirect globals 3/3 (PR #105648)
Arseniy Zaostrovnykh via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 27 06:14:56 PDT 2024
================
@@ -305,6 +305,14 @@ static const MemSpaceRegion *getStackOrGlobalSpaceRegion(const MemRegion *R) {
return nullptr;
}
+const MemRegion *getOriginBaseRegion(const MemRegion *Referrer) {
+ Referrer = Referrer->getBaseRegion();
+ while (const auto *SymReg = dyn_cast<SymbolicRegion>(Referrer)) {
+ Referrer = SymReg->getSymbol()->getOriginRegion()->getBaseRegion();
+ }
+ return Referrer;
----------------
necto wrote:
renamed in bc41e99d6d34
https://github.com/llvm/llvm-project/pull/105648
More information about the cfe-commits
mailing list