https://bugs.llvm.org/show_bug.cgi?id=44036
Bug ID: 44036
Summary: False positive "Assigned value is garbage or
undefined"
Product: clang
Version: 8.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: dcough...@apple.com
Reporter: nils.judzin...@igd-r.fraunhofer.de
CC: dcough...@apple.com, llvm-bugs@lists.llvm.org
Created attachment 22830
--> https://bugs.llvm.org/attachment.cgi?id=22830&action=edit
output of clang-static-analyzer
The clang analyzer complains that garbage is assigned to the variable
valueLower in line 71. In my opinion, this is impossible. Line 30 and 69
contain checks that halfNumCheckpoints is not 0. So line 71 cannot be a
division by 0. valueLower is (allowed to be) 0. Given n != 0, 0/n == 0 , which
is not undefined.
Note that clang analyzer does not complain when lines 57-67 are commented out.
This is strange, as they have no effect on the computation in line 71.
clang-static-analyzer was run on Ubuntu 18.04 LTS. The exact version is in
index.html. OpenCV is required to build the program.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs