1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-09 09:15:38 +02:00

Test case for C++0x-style sizeof. Bug 305979.

This commit is contained in:
Sergey Prigogin 2010-03-24 22:29:44 +00:00
parent 2cfb9a353a
commit e639e05743

View file

@ -8504,4 +8504,16 @@ public class AST2CPPTests extends AST2BaseTest {
parseAndCheckBindings(code); parseAndCheckBindings(code);
} }
// struct S {
// int m;
// };
// void f(unsigned int x);
// void test() {
// f(sizeof(S::m));
// // f(sizeof(S::m + 1)); // Error not detected by CDT: reference to non-static member in subexpression
// }
public void testSizeofOfNonstaticMember_305979() throws Exception {
String code= getAboveComment();
parseAndCheckBindings(code);
}
} }