[llvm-bugs] [Bug 38209] New: Scan-build contradicting assumption

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 18 04:11:04 PDT 2018


            Bug ID: 38209
           Summary: Scan-build contradicting assumption
           Product: tools
           Version: 6.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: analyze
          Assignee: unassignedbugs at nondot.org
          Reporter: Koen.Poppe at vandewiele.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 20567
  --> https://bugs.llvm.org/attachment.cgi?id=20567&action=edit
Minimal example illustrating contradicting assumptions

Running scan-build-6.0 on the attached code results in contradicting

Step 2) Assuming 'empty()' is false 
Step 5) Assuming 'empty()' is true

Workaround (enable the WORKAROUND define) allows scan-build to reason about
memberPlus100 locally thus avoiding this false positive.

Should scan-build be able to reason about this, knowing that both 'empty()'
calls should result in the same outcome?

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/20180718/99db6759/attachment.html>

More information about the llvm-bugs mailing list