[clang-tools-extra] 618db68 - [clangd][NFC] Delete dead code in ExtractFunction code action

Kadir Cetinkaya via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 5 12:15:28 PDT 2020


Author: Kadir Cetinkaya
Date: 2020-08-05T21:14:39+02:00
New Revision: 618db6803d6c8b453abe6a1e92938ee20ac3aff6

URL: https://github.com/llvm/llvm-project/commit/618db6803d6c8b453abe6a1e92938ee20ac3aff6
DIFF: https://github.com/llvm/llvm-project/commit/618db6803d6c8b453abe6a1e92938ee20ac3aff6.diff

LOG: [clangd][NFC] Delete dead code in ExtractFunction code action

Added: 
    

Modified: 
    clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp b/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
index dd62670646c4..895afbb116f1 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<SwitchStmt>(S))
-        CurNumberOfSwitch--;
-    }
-
     bool VisitDecl(Decl *D) {
       Info.createDeclInfo(D, CurrentLocation);
       return true;


        


More information about the cfe-commits mailing list