<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 9, 2010, at 1:20 PM, Argyrios Kyrtzidis wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Aug 9, 2010, at 9:11 PM, Douglas Gregor wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 9, 2010, at 12:55 PM, Chris Lattner wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 9, 2010, at 9:45 AM, Argyrios Kyrtzidis wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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; "><blockquote type="cite"><blockquote type="cite"><br class="Apple-interchange-newline">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=110568&view=rev">http://llvm.org/viewvc/llvm-project?rev=110568&view=rev</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Log:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Replace a parser assertion with a warning, suggestion by Doug.<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Testcase?<br></blockquote><br>Non available, this is a "defensive" warning that should never be triggered, if it is triggered there is some kind of bug in clang that should be fixed.</span></blockquote></div><br><div>It sounds like it should be an assert then... Doug?</div></div></blockquote><div><br></div><div>No, not here. This check verifies that a "real" parse of an expression consumes exactly the same tokens as a "fake" balanced-delimiter parse used to cache the tokens. For well-formed code, this is an invariant. For ill-formed code, it's not an invariant, and we might not know that the code is ill-formed until we hit this point.</div><div><br></div><div>Here's a test case, by the way:</div><div><br></div><div><div>struct X {</div><div>  void f(int x = 1:);</div><div>};</div></div></div></div></blockquote><div><br></div>Whoa whoa, totally misunderstood the issue, thanks for the test case!</div></div></blockquote><div><br></div><div>:)</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div><br></div><div>Argiris, can you elevate this warning to an error, and perhaps word it so that it sounds more like a user error than a compiler issue? For example,</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">  </span>error: extra tokens are not part of the default argument expression</div></div></div></div></blockquote><div><br></div><div>How about 'stealing' the one from Comeau:</div><div><br></div><div><div>  error: unexpected end of default argument expression</div></div></div></div></blockquote><div><br></div><div>Sure!</div><br><span class="Apple-tab-span" style="white-space:pre">    </span>- Doug</div><br></body></html>