[clang] a6ac2b3 - Convert TypeSpecifiersPipe from Specifiers.h to a scoped enum; NFC

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 16 05:29:05 PST 2020


Author: Thorsten
Date: 2020-11-16T08:28:21-05:00
New Revision: a6ac2b32fbab9679c8f2fa97a3b1123e3a9654c8

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

LOG: Convert TypeSpecifiersPipe from Specifiers.h to a scoped enum; NFC

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/Specifiers.h b/clang/include/clang/Basic/Specifiers.h
index cdd67a688283..ed468db1dc8a 100644
--- a/clang/include/clang/Basic/Specifiers.h
+++ b/clang/include/clang/Basic/Specifiers.h
@@ -46,10 +46,7 @@ namespace clang {
     TSS_unsigned
   };
 
-  enum TypeSpecifiersPipe {
-    TSP_unspecified,
-    TSP_pipe
-  };
+  enum class TypeSpecifiersPipe { Unspecified, Pipe };
 
   /// Specifies the kind of type.
   enum TypeSpecifierType {

diff  --git a/clang/lib/Sema/DeclSpec.cpp b/clang/lib/Sema/DeclSpec.cpp
index 012479356122..73a6137ce897 100644
--- a/clang/lib/Sema/DeclSpec.cpp
+++ b/clang/lib/Sema/DeclSpec.cpp
@@ -877,7 +877,7 @@ bool DeclSpec::SetTypePipe(bool isPipe, SourceLocation Loc,
   }
 
   if (isPipe) {
-    TypeSpecPipe = TSP_pipe;
+    TypeSpecPipe = static_cast<unsigned>(TypeSpecifiersPipe::Pipe);
   }
   return false;
 }


        


More information about the cfe-commits mailing list