diff --git a/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp b/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp index dd62670646c41b..895afbb116f18d 100644 --- a/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp @@ -480,17 +480,6 @@ CapturedZoneInfo captureZoneInfo(const ExtractionZone &ExtZone) { CurNumberOfSwitch += Increment; } - // Decrement CurNumberOf{NestedLoops,Switch} if statement is {Loop,Switch} - // and inside Extraction Zone. - void decrementLoopSwitchCounters(Stmt *S) { - if (CurrentLocation != ZoneRelative::Inside) - return; - if (isLoop(S)) - CurNumberOfNestedLoops--; - else if (isa(S)) - CurNumberOfSwitch--; - } - bool VisitDecl(Decl *D) { Info.createDeclInfo(D, CurrentLocation); return true;