[clang] e787708 - [clang-format][NFC] Remove parsePPElIf()

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


Author: Owen Pan
Date: 2022-11-04T00:38:40-07:00
New Revision: e787708bcf53e8849481f2d0267f7e8b5dbf6c8d

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

LOG: [clang-format][NFC] Remove parsePPElIf()

Differential Revision: https://reviews.llvm.org/D137308

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp
index 77140831c2c0..18ec0844db3d 100644
--- a/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/clang/lib/Format/UnwrappedLineParser.cpp
@@ -1108,12 +1108,10 @@ void UnwrappedLineParser::parsePPDirective() {
     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 @@ void UnwrappedLineParser::parsePPElse() {
   ++PPBranchLevel;
 }
 
-void UnwrappedLineParser::parsePPElIf() { parsePPElse(); }
-
 void UnwrappedLineParser::parsePPEndIf() {
   conditionalCompilationEnd();
   parsePPUnknown();

diff  --git a/clang/lib/Format/UnwrappedLineParser.h b/clang/lib/Format/UnwrappedLineParser.h
index b9b106bcc89a..34f211c9ebb3 100644
--- a/clang/lib/Format/UnwrappedLineParser.h
+++ b/clang/lib/Format/UnwrappedLineParser.h
@@ -119,7 +119,6 @@ class UnwrappedLineParser {
   void parsePPDirective();
   void parsePPDefine();
   void parsePPIf(bool IfDef);
-  void parsePPElIf();
   void parsePPElse();
   void parsePPEndIf();
   void parsePPPragma();


        


More information about the cfe-commits mailing list