[llvm-bugs] [Bug 32925] New: analyser reports real issue, but misses use of undefined variable on the way
llvm-bugs at lists.llvm.org
Thu May 4 09:27:37 PDT 2017
Bug ID: 32925
Summary: analyser reports real issue, but misses use of
undefined variable on the way
Assignee: unassignedbugs at nondot.org
Reporter: yann.dirson at blade-group.com
CC: llvm-bugs at lists.llvm.org
Created attachment 18410
Behaviour observer in 3.8, 3.9, 4.0, and snapshot of 5.0 in Debian
$ scan-build clang++ -c ./src/foo.cpp
scan-build: Using '/usr/lib/llvm-3.8/bin/clang' for static analysis
./src/foo.cpp:28:20: warning: Dereference of undefined pointer value
1 warning generated.
scan-build: 1 bug found.
This is a buggy implementation of a pythobun-like "for / else" idiom.
In the path leading to this, which corresponds to m==0, the (i == m) test
compares m with uninitialized variable i. It would seem logical to report this
first (the fact is, it is the root of the bug).
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs