r174980 - Accept over-qualified constructor in MSVC emulation mode

Dmitri Gribenko gribozavr at gmail.com
Tue Feb 12 12:44:43 PST 2013


On Tue, Feb 12, 2013 at 10:10 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> On Tue, Feb 12, 2013 at 11:46 AM, Dmitri Gribenko <gribozavr at gmail.com>
> wrote:
>>
>> On Tue, Feb 12, 2013 at 9:44 PM, Richard Smith <richard at metafoo.co.uk>
>> wrote:
>> > OK, I think under the resolutions of core issue 1435 and particularly
>> > 1310,
>> > the new behavior is correct. Please add a test for that!
>>
>> Will do.
>>
>> We also produced a weird AST for
>> typedef int T;
>> struct X { X::X(T()); };
>>
>> `-CXXRecordDecl 0x2f627a0 <line:2:1, col:23> struct X
>>   |-CXXRecordDecl 0x2f628b0 <col:1, col:8> struct X
>>   `-CXXMethodDecl 0x2f94fc0 <col:12, col:20> T 'struct X::X ((void))'
>
>
> 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.

Parenthesized declarator confused me and I did not figure out how this
could be a member function -- now I see, thanks.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-commits mailing list