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: dcough...@apple.com
          Reporter: jeremy.overe...@millerwelds.com
                CC: dcough...@apple.com, llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to