forked from OSchip/llvm-project
[AST] Check that GNU range case statements are correctly imported.
The test for case statements did not cover GNU range case statements. Differential Revision: https://reviews.llvm.org/D53610 Reviewed By: rjmccall llvm-svn: 345506
This commit is contained in:
parent
6ab5bb115a
commit
635d49e1df
|
@ -3,12 +3,17 @@ void f() {
|
|||
case 1:
|
||||
case 2:
|
||||
break;
|
||||
case 3 ... 4:
|
||||
case 5 ... 5:
|
||||
break;
|
||||
}
|
||||
switch (int varname; 1) {
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
break;
|
||||
case 3 ... 5:
|
||||
break;
|
||||
}
|
||||
switch (1)
|
||||
default:
|
||||
|
|
|
@ -10,6 +10,13 @@
|
|||
// CHECK-NEXT: CaseStmt
|
||||
// CHECK-NEXT: IntegerLiteral
|
||||
// CHECK-NEXT: BreakStmt
|
||||
// CHECK-NEXT: CaseStmt
|
||||
// CHECK-NEXT: IntegerLiteral
|
||||
// CHECK-NEXT: IntegerLiteral
|
||||
// CHECK-NEXT: CaseStmt
|
||||
// CHECK-NEXT: IntegerLiteral
|
||||
// CHECK-NEXT: IntegerLiteral
|
||||
// CHECK-NEXT: BreakStmt
|
||||
|
||||
// CHECK: SwitchStmt
|
||||
// CHECK-NEXT: DeclStmt
|
||||
|
@ -24,6 +31,10 @@
|
|||
// CHECK-NEXT: CaseStmt
|
||||
// CHECK-NEXT: IntegerLiteral
|
||||
// CHECK-NEXT: BreakStmt
|
||||
// CHECK-NEXT: CaseStmt
|
||||
// CHECK-NEXT: IntegerLiteral
|
||||
// CHECK-NEXT: IntegerLiteral
|
||||
// CHECK-NEXT: BreakStmt
|
||||
|
||||
// CHECK: SwitchStmt
|
||||
// CHECK-NEXT: <<NULL>>
|
||||
|
|
Loading…
Reference in New Issue