<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Interprocedural analysis false positive: throwing exception ignored"
href="http://llvm.org/bugs/show_bug.cgi?id=18209">18209</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Interprocedural analysis false positive: throwing exception ignored
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Static Analyzer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>kremenek@apple.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>timac@timac.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=11702" name="attach_11702" title="Xcode 5 project">attachment 11702</a> <a href="attachment.cgi?id=11702&action=edit" title="Xcode 5 project">[details]</a></span>
Xcode 5 project
Summary: The Static Analyzer fails to detect exception thrown in a function and
generates false positives.
Steps to reproduce:
1- Download the attached Xcode 5 project 'ThrowExceptionStaticAnalyzer' and
open it in Xcode 5.
2- Run the 'Analyze' command
Result: You get a false positive warning "warning: Called C++ object pointer is
null"
More info:
- In a separate .cpp file you have a static function that always throws an
exception:
void MyException::Throw() { throw "My Exception"; }
- In your main.cpp file you have the following lines:
void *myPointer = NULL;
if(myPointer == NULL) MyException::Throw();
myPointer->Function();
The interprocedural analyzer fails to detect that MyException::Throw() always
throws an exception.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>