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:
parent
d3ddf272ed
commit
42958023ad
1 changed files with 23 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue