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:
parent
2cfb9a353a
commit
e639e05743
1 changed files with 14 additions and 2 deletions
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue