// RUN: clang-refactor extract -selection=test:%s %s -- -std=c++14 2>&1 | grep -v CHECK | FileCheck %s
void
// CHECK: 1 '' results:
// CHECK: static int extracted() {
// CHECK-NEXT: return 1 + 2;{{$}}
// CHECK-NEXT: }{{[[:space:]].*}}
// CHECK-NEXT: void simpleExtractNoCaptures() {
// CHECK-NEXT: int i = /*range=->+0:33*/extracted();{{$}}
// CHECK-NEXT: }
void
// CHECK: 1 'astatement' results:
// CHECK: static void extracted() {
// CHECK-NEXT: int a = 1;
// CHECK-NEXT: int b = 2;{{$}}
// CHECK-NEXT: }{{[[:space:]].*}}
// CHECK-NEXT: void simpleExtractStmtNoCaptures() {
// CHECK-NEXT: /*range astatement=->+1:13*/extracted();{{$}}
// CHECK-NEXT: }
void
// CHECK: 1 'blank' results:
// CHECK-NEXT: the provided selection does not overlap with the AST nodes of interest
int outOfBodyCodeNoExtraction = /*range out_of_body_expr=->+0:72*/1 + 2;
;
auto decltype
// CHECK: 8 'out_of_body_expr' results:
// CHECK: the selected code is not a part of a function's / method's body
void
// CHECK: 5 'simple_expr' results:
// CHECK-NEXT: the selected expression is too simple to extract