r174980 - Accept over-qualified constructor in MSVC emulation mode

Dmitri Gribenko gribozavr at gmail.com
Tue Feb 12 11:46:48 PST 2013


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))'

While if we removed the 'X::' qualification, we got:

`-CXXRecordDecl 0x355a7a0 <line:2:1, col:20> struct X
  |-CXXRecordDecl 0x355a8b0 <col:1, col:8> struct X
  `-CXXConstructorDecl 0x358c050 <col:12, col:17> X 'void (T (*)(void))'
    `-ParmVarDecl 0x355aa40 <col:14, col:16> 'T (*)(void)'

Which looks correct.

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