1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Bug 338046 - Bogus warning in macro that resolves to 'case' statement

This commit is contained in:
Alena Laskavaia 2011-04-25 01:05:50 +00:00
parent d3ddf272ed
commit 42958023ad

View file

@ -536,4 +536,27 @@ public class CaseBreakCheckerTest extends CheckerTestCase {
checkNoErrors();
}
// #define MY_MACRO(i) \
// case i: \
// { \
// break; \
// }
//
// void f()
// {
// int x;
// switch (x)
// {
// MY_MACRO(1) // WARNING HERE
// }
// }
public void testInMacro() {
String code = getAboveComment();
loadCodeAndRun(code);
checkNoErrors();
}
}