[PATCH] D91506: [NFC, Refactor] Convert TypeSpecifiersPipe from Specifiers.h to a scoped enum (tiny)

Thorsten via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 15 11:24:56 PST 2020


tschuett created this revision.
tschuett added reviewers: aaron.ballman, faisalv, wchilders.
Herald added subscribers: cfe-commits, dexonsmith, usaxena95, kadircet.
Herald added a project: clang.
tschuett requested review of this revision.
Herald added a subscriber: ilya-biryukov.

> ninja clang clangd (with assertions)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91506

Files:
  clang/include/clang/Basic/Specifiers.h
  clang/lib/Sema/DeclSpec.cpp


Index: clang/lib/Sema/DeclSpec.cpp
===================================================================
--- clang/lib/Sema/DeclSpec.cpp
+++ clang/lib/Sema/DeclSpec.cpp
@@ -877,7 +877,7 @@
   }
 
   if (isPipe) {
-    TypeSpecPipe = TSP_pipe;
+    TypeSpecPipe = static_cast<unsigned>(TypeSpecifiersPipe::Pipe);
   }
   return false;
 }
Index: clang/include/clang/Basic/Specifiers.h
===================================================================
--- clang/include/clang/Basic/Specifiers.h
+++ clang/include/clang/Basic/Specifiers.h
@@ -46,10 +46,7 @@
     TSS_unsigned
   };
 
-  enum TypeSpecifiersPipe {
-    TSP_unspecified,
-    TSP_pipe
-  };
+  enum class TypeSpecifiersPipe { Unspecified, Pipe };
 
   /// Specifies the kind of type.
   enum TypeSpecifierType {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91506.305381.patch
Type: text/x-patch
Size: 772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201115/f28ddb77/attachment.bin>


More information about the cfe-commits mailing list