On Tue, Feb 12, 2013 at 11:46 AM, Dmitri Gribenko <span dir="ltr"><<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Tue, Feb 12, 2013 at 9:44 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:<br>
> OK, I think under the resolutions of core issue 1435 and particularly 1310,<br>
> the new behavior is correct. Please add a test for that!<br>
<br>
</div>Will do.<br>
<br>
We also produced a weird AST for<br>
typedef int T;<br>
struct X { X::X(T()); };<br>
<br>
`-CXXRecordDecl 0x2f627a0 <line:2:1, col:23> struct X<br>
  |-CXXRecordDecl 0x2f628b0 <col:1, col:8> struct X<br>
  `-CXXMethodDecl 0x2f94fc0 <col:12, col:20> T 'struct X::X ((void))'<br></blockquote><div><br></div><div>I think I'm missing what's weird here. We were interpreting this as declaring a member function named T, and that's the right AST for that interpretation.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
While if we removed the 'X::' qualification, we got:<br>
<br>
`-CXXRecordDecl 0x355a7a0 <line:2:1, col:20> struct X<br>
  |-CXXRecordDecl 0x355a8b0 <col:1, col:8> struct X<br>
  `-CXXConstructorDecl 0x358c050 <col:12, col:17> X 'void (T (*)(void))'<br>
    `-ParmVarDecl 0x355aa40 <col:14, col:16> 'T (*)(void)'<br>
<br>
Which looks correct.<br>
<span class="HOEnZb"><font color="#888888"><br>
Dmitri<br>
<br>
--<br>
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if<br>
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>>*/<br>
</font></span></blockquote></div><br>