Please sign in to comment.
[analyzer] Mark symbol values as dead in the environment.
This allows us to properly remove dead bindings at the end of the top-level stack frame, using the ReturnStmt, if there is one, to keep the return value live. This in turn removes the need for a check::EndPath callback in leak checkers. This does cause some changes in the path notes for leak checkers. Previously, a leak would be reported at the location of the closing brace in a function. Now, it gets reported at the last statement. This matches the way leaks are currently reported for inlined functions, but is less than ideal for both. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168066 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information...
Showing with 262 additions and 184 deletions.
- +25 −18 include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
- +4 −0 lib/StaticAnalyzer/Core/Environment.cpp
- +22 −6 lib/StaticAnalyzer/Core/ExprEngine.cpp
- +11 −14 lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
- +137 −137 test/Analysis/malloc-plist.c
- +5 −0 test/Analysis/malloc.c
- +58 −9 test/Analysis/plist-output-alternate.m
Oops, something went wrong.