forked from OSchip/llvm-project
[NFCI] update formating for misleading indentation warning
Reviewers: xbolva00 Reviewed By: xbolva00 Differential Revision: https://reviews.llvm.org/D70861
This commit is contained in:
parent
3953540d8b
commit
2f96047275
|
@ -2525,19 +2525,18 @@ MallocChecker::LeakInfo MallocChecker::getAllocationSite(const ExplodedNode *N,
|
||||||
|
|
||||||
// Find the most recent expression bound to the symbol in the current
|
// Find the most recent expression bound to the symbol in the current
|
||||||
// context.
|
// context.
|
||||||
if (!ReferenceRegion) {
|
if (!ReferenceRegion) {
|
||||||
if (const MemRegion *MR = C.getLocationRegionIfPostStore(N)) {
|
if (const MemRegion *MR = C.getLocationRegionIfPostStore(N)) {
|
||||||
SVal Val = State->getSVal(MR);
|
SVal Val = State->getSVal(MR);
|
||||||
if (Val.getAsLocSymbol() == Sym) {
|
if (Val.getAsLocSymbol() == Sym) {
|
||||||
const VarRegion* VR = MR->getBaseRegion()->getAs<VarRegion>();
|
const VarRegion *VR = MR->getBaseRegion()->getAs<VarRegion>();
|
||||||
// Do not show local variables belonging to a function other than
|
// Do not show local variables belonging to a function other than
|
||||||
// where the error is reported.
|
// where the error is reported.
|
||||||
if (!VR ||
|
if (!VR || (VR->getStackFrame() == LeakContext->getStackFrame()))
|
||||||
(VR->getStackFrame() == LeakContext->getStackFrame()))
|
ReferenceRegion = MR;
|
||||||
ReferenceRegion = MR;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Allocation node, is the last node in the current or parent context in
|
// Allocation node, is the last node in the current or parent context in
|
||||||
// which the symbol was tracked.
|
// which the symbol was tracked.
|
||||||
|
|
Loading…
Reference in New Issue