[PATCH] D53610: [AST] Check that GNU range case statements are correctly imported.
Bruno Ricci via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 25 09:55:12 PDT 2018
riccibruno updated this revision to Diff 171125.
riccibruno added a comment.
rebased
Repository:
rC Clang
https://reviews.llvm.org/D53610
Files:
test/Import/switch-stmt/Inputs/F.cpp
test/Import/switch-stmt/test.cpp
Index: test/Import/switch-stmt/test.cpp
===================================================================
--- test/Import/switch-stmt/test.cpp
+++ test/Import/switch-stmt/test.cpp
@@ -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>>
Index: test/Import/switch-stmt/Inputs/F.cpp
===================================================================
--- test/Import/switch-stmt/Inputs/F.cpp
+++ test/Import/switch-stmt/Inputs/F.cpp
@@ -3,12 +3,17 @@
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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53610.171125.patch
Type: text/x-patch
Size: 1227 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181025/fefe3e22/attachment.bin>
More information about the cfe-commits
mailing list