mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Bug 339802 - [fp] No break at the end of case if "break" is defined in braces and in a macro
This commit is contained in:
parent
4f80f47e85
commit
d3ddf272ed
1 changed files with 16 additions and 0 deletions
|
@ -520,4 +520,20 @@ public class CaseBreakCheckerTest extends CheckerTestCase {
|
||||||
loadCodeAndRun(code);
|
loadCodeAndRun(code);
|
||||||
checkErrorLine(3);
|
checkErrorLine(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// #define DEFINE_BREAK {break;}
|
||||||
|
// void foo ( int a )
|
||||||
|
// {
|
||||||
|
// switch ( a )
|
||||||
|
// {
|
||||||
|
// case 1:
|
||||||
|
// DEFINE_BREAK // <-- Warning: No break at the end of this case
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
public void testBreakInBraces() {
|
||||||
|
String code = getAboveComment();
|
||||||
|
loadCodeAndRun(code);
|
||||||
|
checkNoErrors();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue