<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:dcb314@hotmail.com" title="David Binderman <dcb314@hotmail.com>"> <span class="fn">David Binderman</span></a>
</span> changed
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - trunk/llvm/lib/Transforms/Scalar/SROA.cpp: 2 * init error ?"
href="http://llvm.org/bugs/show_bug.cgi?id=20590">bug 20590</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>RESOLVED
</td>
<td>REOPENED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>WONTFIX
</td>
<td>---
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - trunk/llvm/lib/Transforms/Scalar/SROA.cpp: 2 * init error ?"
href="http://llvm.org/bugs/show_bug.cgi?id=20590#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - trunk/llvm/lib/Transforms/Scalar/SROA.cpp: 2 * init error ?"
href="http://llvm.org/bugs/show_bug.cgi?id=20590">bug 20590</a>
from <span class="vcard"><a class="email" href="mailto:dcb314@hotmail.com" title="David Binderman <dcb314@hotmail.com>"> <span class="fn">David Binderman</span></a>
</span></b>
<pre><span class="quote">>They're not initialized by itself, but with an argument of the same name. </span >
I don't think so. Please quote the relevant part of the C++
language standard that two mentions of variable S refer to two different
objects.
Let's not forget that this kind of double naming is poor software engineering.
I'm thinking that a fix like
SliceBuilder(const DataLayout &DL, AllocaInst &AI, AllocaSlices & thatS)
: PtrUseVisitor<SliceBuilder>(DL),
AllocSize(DL.getTypeAllocSize(AI.getAllocatedType())), S(thatS) {}
would solve the problem.
<span class="quote">>This is a very common pattern in LLVM and harmless. </span >
Nope. I've just scanned all the trunk source code of LLVM
and this problem pattern only occurs in this file. Hence the bug report.
<span class="quote">>What checker did emit those warnings?</span >
cppcheck, available from sourceforge. Strongly recommended.</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>