https://bugs.llvm.org/show_bug.cgi?id=35419
Bug ID: 35419
Summary: False negative on post-increment of uninitialized
value
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: dcough...@apple.com
Reporter: dcough...@apple.com
CC: llvm-bugs@lists.llvm.org
The analyzer doesn't diagnose when post incrementing an uninitialized variable:
$ cat test_pp_uninit.c
void foo() {
int p;
p++; // A diagnostic should be emitted here
}
$ clang -cc1 -analyze -analyzer-checker=core test_pp_uninit.c
$
It looks like the UndefinedAssignmentChecker is missing a case for
UnaryOperator in its checkBind() method.
This is a great starter bug.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs