<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 --- - clang fails to detect delete x; return x"
href="http://llvm.org/bugs/show_bug.cgi?id=15881">15881</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang fails to detect delete x; return x
</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>peter@stairways.com.au
</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>Mac, Xcode 4.6.2, Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM
3.2svn), Objective C++.
Neither clang with lots of warning enabled, nor the static analyser detect this
simple failure case:
HBaseAction*
AMouseMoveAndClick::Merge( HBaseAction* action )
{
AMouseMoveAndClick* newAction = new AMouseMoveAndClick( *this );
delete newAction;
return newAction;
}
Shouldn't pretty much any use of a deleted variable be flagged as an error?</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>