https://bugs.llvm.org/show_bug.cgi?id=41485
Bug ID: 41485
Summary: StaticAnalyzer/Checkers/IteratorChecker.cpp:1037]:
(error) Dead pointer usage
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedb...@nondot.org
Reporter: dcb...@hotmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org
clang/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1037]: (error) Dead
pointer usage. Pointer 'value' is dead if it has been assigned '&val' at line
1032.
Source code is
if (auto loc = RHS.getAs<Loc>()) {
const auto val = State->getRawSVal(*loc);
value = &val;
}
auto &TgtVal = (Op == OO_PlusEqual || Op == OO_MinusEqual) ? LHS : RetVal;
State =
setIteratorPosition(State, TgtVal, advancePosition(C, Op, *Pos, *value));
Suggest move local variable val out to wider scope.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs