[llvm-bugs] [Bug 48474] New: clangsa makes contradictory assumptions about variable
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Dec 10 10:30:48 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=48474
Bug ID: 48474
Summary: clangsa makes contradictory assumptions about variable
Product: clang
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: dcoughlin at apple.com
Reporter: jimis at gmx.net
CC: dcoughlin at apple.com, llvm-bugs at lists.llvm.org
Created attachment 24264
--> https://bugs.llvm.org/attachment.cgi?id=24264&action=edit
screenshot from CodeChecker
I attach a screenshot from CodeChecker. You can also find the static HTML
report at:
https://testresults.qt.io/codechecker/daily_analyses/qtbase/dev/qtbase-dev-20201210-238f466d49/qdatetime.cpp_clangsa_fbaaa3c8986c74ae8f6ae431391de560.plist.html#reportHash=62a0d374a5d8f3a09605154ad72cab0d
In this report we see the following assumptions the analyzer makes:
6. Assuming 'spec' is not equal to TimeZone
[...]
9. Assuming 'spec' is equal to Timezone (since it follows that branch of the
switch statement)
This issue stands out the most, because of the closeness of the contradictory
assumptions.
But this report is invalid for other reasons too, for example clangsa fails to
track into the Data constructor in line 3048, which would make it evident it
can't happen.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201210/b1b46509/attachment.html>
More information about the llvm-bugs
mailing list