[llvm-bugs] [Bug 46104] New: Incorrect assumption results in NullDereference warning
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed May 27 11:17:12 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46104
Bug ID: 46104
Summary: Incorrect assumption results in NullDereference
warning
Product: clang
Version: 10.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: dcoughlin at apple.com
Reporter: Jeremy.overesch at millerwelds.com
CC: dcoughlin at apple.com, llvm-bugs at lists.llvm.org
Created attachment 23544
--> https://bugs.llvm.org/attachment.cgi?id=23544&action=edit
Example Code
When running clang-tidy on the attached file, I get a
clang-analyzer-core.NullDereference warning for lines 42 and 50. The route it
takes to get this issue does not appear to be valid.
On line 59, it calls `outObj.getType()` (a const function) and assumes it is
`OutsideObject::type16`. However, on line 69 it makes the same call and
assumes that it is `OutsideObject::type32`, which is not possible in the flow
of the code.
--
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/20200527/2cde1c4b/attachment.html>
More information about the llvm-bugs
mailing list