[llvm-bugs] [Bug 33705] New: False positive with two identical conditionals

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jul 6 16:02:47 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=33705

            Bug ID: 33705
           Summary: False positive with two identical conditionals
           Product: clang
           Version: 4.0
          Hardware: PC
                OS: NetBSD
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: coypu at sdf.org
                CC: llvm-bugs at lists.llvm.org

Created attachment 18762
  --> https://bugs.llvm.org/attachment.cgi?id=18762&action=edit
test case

Sorry the example is dumb, the original code had some logic between the
conditionals.

I get:
scan-build: Using '/usr/pkg/bin/clang-4.0' for static analysis
test.c:18:6: warning: Dereference of null pointer (loaded from variable 'a')
                *a = 12;
                 ~ ^
1 warning generated.
scan-build: 1 bug found.
scan-build: Run 'scan-view /tmp/scan-build-2017-04-18-203149-15179-1' to
examine bug reports.

-- 
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/20170706/a0ebc1ac/attachment.html>


More information about the llvm-bugs mailing list