Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

Rename "Extract Expression" to "Extract Variable" and #115

Open
wants to merge 1 commit into
base: upstream-with-swift
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/clang/Tooling/Refactor/RefactoringActions.def
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ REFACTORING_SUB_ACTION(Local, Rename, "Rename")
REFACTORING_OPERATION_ACTION(Extract, "Extract Function", "extract")
REFACTORING_OPERATION_SUB_ACTION(Method, Extract, "Extract Method",
"extract-method")
REFACTORING_OPERATION_SUB_ACTION(Expression, Extract, "Extract Expression",
REFACTORING_OPERATION_SUB_ACTION(Expression, Extract, "Extract Variable",
"extract-expression")

REFACTORING_OPERATION_ACTION(IfSwitchConversion, "Convert to Switch",
Expand All @@ -46,7 +46,7 @@ REFACTORING_OPERATION_ACTION(LocalizeObjCStringLiteral,
"Wrap in NSLocalizedString",
"localize-objc-string-literal")
REFACTORING_OPERATION_ACTION(ExtractRepeatedExpressionIntoVariable,
"Extract Repeated Expression",
"Extract All Occurrences",
"extract-repeated-expr-into-var")
REFACTORING_OPERATION_ACTION(FillInMissingMethodStubsFromAbstractClasses,
"Add Missing Abstract Class Overrides",
Expand Down
2 changes: 1 addition & 1 deletion test/Refactor/Extract/extract-expression-into-var.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void extractExpressionIntoVar(int x, int y, int z) {
// RUN: clang-refactor-test perform -action extract-expression -selected=expr1 -selected=expr2 -selected=expr3 -selected=expr4 -emit-associated %s -std=c++11 | FileCheck %s

// RUN: clang-refactor-test list-actions -at=%s:6:13 -selected=%s:6:13-6:18 %s -std=c++11 | FileCheck --check-prefix=CHECK-ACTION %s
// CHECK-ACTION: Extract Expression
// CHECK-ACTION: Extract Variable

void dontExtractStatement(int x, int y) {
// stmt1-begin: +1:3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void takesClass(AWrapperClass &wrapper) {
// RUN: not clang-refactor-test initiate -action extract-repeated-expr-into-var -in=%s:13:20-30 %s 2>&1 | FileCheck --check-prefix=CHECK-NO %s

// RUN: clang-refactor-test list-actions -at=%s:11:11 %s | FileCheck --check-prefix=CHECK-ACTION %s
// CHECK-ACTION: Extract Repeated Expression
// CHECK-ACTION: Extract All Occurrences

AClass &returnsReference(int x);
AClass &returnsAndTakesFunctionPointer(AClass& (*)(int));
Expand Down