http://llvm.org/bugs/show_bug.cgi?id=10862

           Summary: False positives related to try catch blocks (Value
                    stored to '...' during its initialization is never
                    read)
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Hi,

I am using scan-build (svn from 2011-09-02) to analyze c++ code and get a few
false positives related to try catch blocks. My initial attempts to make a
small test case did not succeed in replicating the bug. Below are two code
snippets for which I get "Value stored to 'status' during its initialization is
never read" in a large projet:

-----------------
uint32_t status = info.refStatus;

try {
  status = foo();
}
catch(...) {
}

bar(status);
-----------------

-----------------
int status = this->m_status;
this->m_status = foo();
try {
  bar();
}
catch(...) {
  this->m_status = status;
}
-----------------

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to