]> granicus.if.org Git - clang/commit
[analyzer] Fix false negative on post-increment of uninitialized variable.
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 30 Nov 2017 09:18:35 +0000 (09:18 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Thu, 30 Nov 2017 09:18:35 +0000 (09:18 +0000)
commitd9b383bb5c339546acbdf272f12e1e1b5e30e87c
treedbe8e3c44d99f4df9de91a2403866e48e502f621
parente7af18205334679598a4e9792cbeabd055d7181a
[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
docs/ReleaseNotes.rst
lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp
lib/StaticAnalyzer/Core/ExprEngineC.cpp
test/Analysis/malloc-plist.c
test/Analysis/objc-for.m
test/Analysis/uninit-const.c