<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Thanks for the fix, Richard.<br>
<br>
<div class="moz-cite-prefix">On 6/1/2017 9:41 PM, Richard Trieu
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAPUYKW=SWv_xboVcpEgvJUDr-6QkPzy-way3hs4Q7xgpM2Xo7Q@mail.gmail.com">
<div dir="ltr"><span style="font-size:12.8px">This is my old
code. I went ahead and fixed it in r304519. Let me know if
there's any other trouble from it.</span><br>
<div><span style="font-size:12.8px"><br>
</span></div>
<div><span style="font-size:12.8px">(To the mailing lists this
time.)</span></div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Jun 1, 2017 at 1:46 PM,
Grang, Mandeep Singh via llvm-dev <span dir="ltr"><<a
href="mailto:llvm-dev@lists.llvm.org" target="_blank"
moz-do-not-send="true">llvm-dev@lists.llvm.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>I see that the following test fails if reverse
iteration of SmallPtrSet is enabled:</p>
<p><i>clang/test/SemaCXX/warn-loop-<wbr>analysis.cpp</i></p>
<p>This is because in SemaStmt.cpp we iterate
SmallPtrSet and output warnings about the variables
not used in the loop.<br>
</p>
<p>Expected output: <i>warning: variables 'i', 'j', and
'k' used in loop condition not modified</i></p>
<p>Output with reverse iteration: <i>warning: variables
'k', 'j', and 'i' used in loop condition not</i></p>
<p>I would like the community's opinion on whether this
is something worth fixing? In this case, should the
output always be the same irrespective of the
iteration order?<br>
</p>
<p> If yes, then we have 2 alternatives:</p>
<p>1. Change SmallPtrSet to SmallVector for the
container (VarDecls) being iterated - this may have a
compile time impact (need to measure).</p>
<p>2. Sort the container (VarDecls) before iteration. We
can sort based on decl source location and decl name.
Not sure if these guaranteed to be unique?</p>
<p>Thanks,</p>
<p>Mandeep<br>
</p>
</div>
<br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org"
moz-do-not-send="true">llvm-dev@lists.llvm.org</a><br>
<a
href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
<br>
</body>
</html>