<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>It is. Semantics being: if any item with key=8 is in the map, return a reference to it. If not, add a new item with key=8 and value=int()=0</div><div><br></div><div></div><blockquote type="cite"><div>-    ii[8] = 0;<br>+    ii[85] = 1234567;<br></div></blockquote><div><br></div><div>After these changes, there is no item with key=8 in the map, hence the expression is going to cause the creation of such an item, with value=0. Thus, there should be no way to match 1234567 in the expression output :) </div><div><br></div><div><blockquote type="cite">+        self.expect("expression ii[8]", matching=False, error=True,<br></blockquote><blockquote type="cite">+                    substrs = ['1234567'])<br></blockquote></div><div><br></div><div>For the test to succeed with ToT clang, one would have to remove the error=True clause from the expect() call, but that would cause the test to fail for everyone who *does not* have ToT clang (and I expect this latter to be a much wider audience than the former).</div><div>We should be checking for which version of clang built the binary and have two versions of this expect call in place, one with error=True for older-than-bug-fixing-clang and one without for bug-fixing-or-greater revisions, but I guess that only makes sense once people start adopting the new clang and complaining :-)</div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><i>- Enrico Granata</i></div></span>
</div>
<br><div><div>On Feb 20, 2012, at 11:02 AM, Eric Christopher wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>On Feb 17, 2012, at 5:14 PM, Enrico Granata <<a href="mailto:granata.enrico@gmail.com">granata.enrico@gmail.com</a>> wrote:<br><br><blockquote type="cite">Correct indeed, if you consider 8 as "8th item". Not correct if you consider 8 as "item with key = 8" :) the test is checking that in fact 8 here is used in the second interpretation.<br></blockquote><blockquote type="cite">Once the clang fixes to templates debug info go mainstream, it will be necessary to remove error=True from this line. Other than test, the test logic now seems to be right.<br></blockquote><br>Basically I was considering that it was failing before to be a bug(that's now fixed in ToT :). If it were si[8] I'd have understood, but ii is an int-int map and so isn't ii[8] valid?<br><br>-eric<br></div></blockquote></div><br></div></body></html>