[LLVMbugs] [Bug 17948] New: False positive: Value stored is never read

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Nov 15 11:52:17 PST 2013


            Bug ID: 17948
           Summary: False positive: Value stored is never read
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: immanuel.litzroth at cloudfounders.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This code triggers a warning:
> clang-problems.cpp:, Clang (LLVM based), Priority: Normal
> Value stored to 'i' is never read. 
Value is read in another thread.

struct Test
    Test(bool& i_bool)
        : the_bool(i_bool)

    bool& the_bool;

schedule_test(Test* t)
    // puts it on a queue that is handled in another thread

void f()
    bool i = false;
    Test* t = new Test(i);
    i = true;
    // wait for threadpool to become empty

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/20131115/afaba09e/attachment.html>

More information about the llvm-bugs mailing list