[analyzer] Fix false negative on post-increment of uninitialized variable.
Summary: Currently clang static analyzer does warn on: ``` int x; x+=1; x-=1; x=x+1; x=x-1; ``` But does warn on: ``` int x; x++; x--; --x; ++x; ``` This differential should fix that. Fixes https://bugs.llvm.org/show_bug.cgi?id=35419 Reviewers: dcoughlin, NoQ Reviewed By: dcoughlin Subscribers: NoQ, xazax.hun, szepet, cfe-commits, a.sidorin Tags: #clang Differential Revision: https://reviews.llvm.org/D40463 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319411 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- docs/ReleaseNotes.rst 3 additions, 0 deletionsdocs/ReleaseNotes.rst
- lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp 8 additions, 0 deletionslib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp
- lib/StaticAnalyzer/Core/ExprEngineC.cpp 8 additions, 1 deletionlib/StaticAnalyzer/Core/ExprEngineC.cpp
- test/Analysis/malloc-plist.c 538 additions, 536 deletionstest/Analysis/malloc-plist.c
- test/Analysis/objc-for.m 3 additions, 3 deletionstest/Analysis/objc-for.m
- test/Analysis/uninit-const.c 29 additions, 1 deletiontest/Analysis/uninit-const.c
source diff could not be displayed: it is too large. Options to address this: view the blob.
Please register or sign in to comment