[clangd][NFC] Delete dead code in ExtractFunction code action
authorKadir Cetinkaya <kadircet@google.com>
Wed, 5 Aug 2020 19:14:31 +0000 (21:14 +0200)
committerKadir Cetinkaya <kadircet@google.com>
Wed, 5 Aug 2020 19:14:39 +0000 (21:14 +0200)
clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp

index dd62670..895afbb 100644 (file)
@@ -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<SwitchStmt>(S))
-        CurNumberOfSwitch--;
-    }
-
     bool VisitDecl(Decl *D) {
       Info.createDeclInfo(D, CurrentLocation);
       return true;