[PATCH] D137308: [clang-format][NFC] Remove parsePPElIf()

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 4 00:39:16 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe787708bcf53: [clang-format][NFC] Remove parsePPElIf() (authored by owenpan).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137308/new/

https://reviews.llvm.org/D137308

Files:
  clang/lib/Format/UnwrappedLineParser.cpp
  clang/lib/Format/UnwrappedLineParser.h


Index: clang/lib/Format/UnwrappedLineParser.h
===================================================================
--- clang/lib/Format/UnwrappedLineParser.h
+++ clang/lib/Format/UnwrappedLineParser.h
@@ -119,7 +119,6 @@
   void parsePPDirective();
   void parsePPDefine();
   void parsePPIf(bool IfDef);
-  void parsePPElIf();
   void parsePPElse();
   void parsePPEndIf();
   void parsePPPragma();
Index: clang/lib/Format/UnwrappedLineParser.cpp
===================================================================
--- clang/lib/Format/UnwrappedLineParser.cpp
+++ clang/lib/Format/UnwrappedLineParser.cpp
@@ -1108,12 +1108,10 @@
     parsePPIf(/*IfDef=*/true);
     break;
   case tok::pp_else:
-    parsePPElse();
-    break;
   case tok::pp_elifdef:
   case tok::pp_elifndef:
   case tok::pp_elif:
-    parsePPElIf();
+    parsePPElse();
     break;
   case tok::pp_endif:
     parsePPEndIf();
@@ -1223,8 +1221,6 @@
   ++PPBranchLevel;
 }
 
-void UnwrappedLineParser::parsePPElIf() { parsePPElse(); }
-
 void UnwrappedLineParser::parsePPEndIf() {
   conditionalCompilationEnd();
   parsePPUnknown();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137308.473146.patch
Type: text/x-patch
Size: 1102 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221104/a3ab57a9/attachment.bin>


More information about the cfe-commits mailing list