diff --git a/clang-tools-extra/clangd/refactor/Rename.h b/clang-tools-extra/clangd/refactor/Rename.h --- a/clang-tools-extra/clangd/refactor/Rename.h +++ b/clang-tools-extra/clangd/refactor/Rename.h @@ -29,7 +29,7 @@ struct RenameOptions { /// If true, enable cross-file rename; otherwise, only allows to rename a /// symbol that's only used in the current file. - bool AllowCrossFile = false; + bool AllowCrossFile = true; /// The maximum number of affected files (0 means no limit), only meaningful /// when AllowCrossFile = true. /// If the actual number exceeds the limit, rename is forbidden. diff --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp --- a/clang-tools-extra/clangd/tool/ClangdMain.cpp +++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp @@ -286,6 +286,7 @@ RetiredFlag RecoveryASTType("recovery-ast-type"); RetiredFlag AsyncPreamble("async-preamble"); RetiredFlag CollectMainFileRefs("collect-main-file-refs"); +RetiredFlag CrossFileRename("cross-file-rename"); opt LimitResults{ "limit-results", @@ -295,7 +296,6 @@ init(100), }; - list TweakList{ "tweaks", cat(Features), @@ -304,13 +304,6 @@ CommaSeparated, }; -opt CrossFileRename{ - "cross-file-rename", - cat(Features), - desc("Enable cross-file rename feature."), - init(true), -}; - opt FoldingRanges{ "folding-ranges", cat(Features), @@ -852,9 +845,6 @@ if (ForceOffsetEncoding != OffsetEncoding::UnsupportedEncoding) Opts.Encoding = ForceOffsetEncoding; - // Shall we allow to customize the file limit? - Opts.Rename.AllowCrossFile = CrossFileRename; - if (CheckFile.getNumOccurrences()) { llvm::SmallString<256> Path; llvm::sys::fs::real_path(CheckFile, Path, /*expand_tilde=*/true);