diff options
Diffstat (limited to 'clang/test/Refactor/Extract/ExtractionSemicolonPolicy.cpp')
| -rw-r--r-- | clang/test/Refactor/Extract/ExtractionSemicolonPolicy.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/Refactor/Extract/ExtractionSemicolonPolicy.cpp b/clang/test/Refactor/Extract/ExtractionSemicolonPolicy.cpp index 5caf9d45268..97f12475761 100644 --- a/clang/test/Refactor/Extract/ExtractionSemicolonPolicy.cpp +++ b/clang/test/Refactor/Extract/ExtractionSemicolonPolicy.cpp @@ -64,6 +64,7 @@ void extractStatementNotSemiSwitch() { // CHECK-NEXT: extracted();{{$}} // CHECK-NEXT: } + void extractStatementNotSemiWhile() { /*range eextract=->+2:4*/while (true) { int x = 0; @@ -190,3 +191,15 @@ void careForNonCompoundSemicolons2() { // CHECK-NEXT: extracted();{{$}} // CHECK-NEXT: // // CHECK-NEXT: } + +void careForSwitchSemicolon() { + /*range mextract=->+0:51*/switch(0) default: break; +} +// CHECK: 1 'mextract' results: +// CHECK: static void extracted() { +// CHECK-NEXT: switch(0) default: break;{{$}} +// CHECK-NEXT: }{{[[:space:]].*}} +// CHECK-NEXT: void careForSwitchSemicolon() { +// CHECK-NEXT: extracted();{{$}} +// CHECK-NEXT: } + |

