r345506 - [AST] Check that GNU range case statements are correctly imported.
Bruno Ricci via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 29 08:04:19 PDT 2018
Author: brunoricci
Date: Mon Oct 29 08:04:19 2018
New Revision: 345506
URL: http://llvm.org/viewvc/llvm-project?rev=345506&view=rev
Log:
[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
Modified:
cfe/trunk/test/Import/switch-stmt/Inputs/F.cpp
cfe/trunk/test/Import/switch-stmt/test.cpp
Modified: cfe/trunk/test/Import/switch-stmt/Inputs/F.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Import/switch-stmt/Inputs/F.cpp?rev=345506&r1=345505&r2=345506&view=diff
==============================================================================
--- cfe/trunk/test/Import/switch-stmt/Inputs/F.cpp (original)
+++ cfe/trunk/test/Import/switch-stmt/Inputs/F.cpp Mon Oct 29 08:04:19 2018
@@ -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:
Modified: cfe/trunk/test/Import/switch-stmt/test.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Import/switch-stmt/test.cpp?rev=345506&r1=345505&r2=345506&view=diff
==============================================================================
--- cfe/trunk/test/Import/switch-stmt/test.cpp (original)
+++ cfe/trunk/test/Import/switch-stmt/test.cpp Mon Oct 29 08:04:19 2018
@@ -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>>
More information about the cfe-commits
mailing list