// expected-error@first.h:* {{'Types::TypeOfExpr::Invalid1' has different definitions in different modules; first difference is definition in module 'FirstModule' found field 'x' with type 'typeof (1 + 2)' (aka 'int')}}
// expected-note@second.h:* {{but in 'SecondModule' found field 'x' with type 'typeof (3)' (aka 'int')}}
Invalid2i2;
// expected-error@second.h:* {{'Types::TypeOfExpr::Invalid2::x' from module 'SecondModule' is not present in definition of 'Types::TypeOfExpr::Invalid2' in module 'FirstModule'}}
// expected-note@first.h:* {{declaration of 'x' does not match}}
Validv;
#endif
}// namespace TypeOfExpr
namespaceTypeOf{
#if defined(FIRST)
structInvalid1{
typeof(int)x;
};
structInvalid2{
typeof(int)x;
};
usingT=int;
structInvalid3{
typeof(T)x;
};
structValid{
typeof(int)x;
usingT=typeof(double);
typeof(T)y;
};
#elif defined(SECOND)
structInvalid1{
typeof(double)x;
};
usingI=int;
structInvalid2{
typeof(I)x;
};
usingT=short;
structInvalid3{
typeof(T)x;
};
structValid{
typeof(int)x;
usingT=typeof(double);
typeof(T)y;
};
#else
Invalid1i1;
// expected-error@second.h:* {{'Types::TypeOf::Invalid1::x' from module 'SecondModule' is not present in definition of 'Types::TypeOf::Invalid1' in module 'FirstModule'}}
// expected-note@first.h:* {{declaration of 'x' does not match}}
Invalid2i2;
// expected-error@first.h:* {{'Types::TypeOf::Invalid2' has different definitions in different modules; first difference is definition in module 'FirstModule' found field 'x' with type 'typeof(int)' (aka 'int')}}
// expected-note@second.h:* {{but in 'SecondModule' found field 'x' with type 'typeof(Types::TypeOf::I)' (aka 'int')}}
Invalid3i3;
// expected-error@second.h:* {{'Types::TypeOf::Invalid3::x' from module 'SecondModule' is not present in definition of 'Types::TypeOf::Invalid3' in module 'FirstModule'}}
// expected-note@first.h:* {{declaration of 'x' does not match}}