[cfe-commits] r39220 - /cfe/cfe/trunk/include/clang/Parse/DeclSpec.h

sabre at cs.uiuc.edu sabre at cs.uiuc.edu
Wed Jul 11 09:41:24 PDT 2007


Author: sabre
Date: Wed Jul 11 11:41:24 2007
New Revision: 39220

URL: http://llvm.org/viewvc/llvm-project?rev=39220&view=rev
Log:
Group declspec ivars together.

Modified:
    cfe/cfe/trunk/include/clang/Parse/DeclSpec.h

Modified: cfe/cfe/trunk/include/clang/Parse/DeclSpec.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Parse/DeclSpec.h?rev=39220&r1=39219&r2=39220&view=diff

==============================================================================
--- cfe/cfe/trunk/include/clang/Parse/DeclSpec.h (original)
+++ cfe/cfe/trunk/include/clang/Parse/DeclSpec.h Wed Jul 11 11:41:24 2007
@@ -36,10 +36,7 @@
     SCS_static,
     SCS_auto,
     SCS_register
-  } StorageClassSpec : 3;
-  
-  // storage-class-specifier
-  bool SCS_thread_specified : 1;
+  };
   
   // type-specifier
   enum TSW {
@@ -47,19 +44,19 @@
     TSW_short,
     TSW_long,
     TSW_longlong
-  } TypeSpecWidth : 2;
+  };
   
   enum TSC {
     TSC_unspecified,
     TSC_imaginary,
     TSC_complex
-  } TypeSpecComplex : 2;
+  };
   
   enum TSS {
     TSS_unspecified,
     TSS_signed,
     TSS_unsigned
-  } TypeSpecSign : 2;
+  };
   
   enum TST {
     TST_unspecified,
@@ -76,7 +73,7 @@
     TST_union,
     TST_struct,
     TST_typedef
-  } TypeSpecType : 4;
+  };
   
   // type-qualifiers
   enum TQ {   // NOTE: These flags must be kept in sync with TypeRef::TQ.
@@ -85,7 +82,31 @@
     TQ_restrict    = 2,
     TQ_volatile    = 4
   };
-  unsigned TypeQualifiers : 3;  // Bitwise OR of typequals.
+
+  /// ParsedSpecifiers - Flags to query which specifiers were applied.  This is
+  /// returned by getParsedSpecifiers.
+  enum ParsedSpecifiers {
+    PQ_None                  = 0,
+    PQ_StorageClassSpecifier = 1,
+    PQ_TypeSpecifier         = 2,
+    PQ_TypeQualifier         = 4,
+    PQ_FunctionSpecifier     = 8
+  };
+  
+  
+
+  // storage-class-specifier
+  SCS StorageClassSpec : 3;
+  bool SCS_thread_specified : 1;
+
+  // type-specifier
+  TSW TypeSpecWidth : 2;
+  TSC TypeSpecComplex : 2;
+  TSS TypeSpecSign : 2;
+  TST TypeSpecType : 4;
+  
+  // type-qualifiers
+  unsigned TypeQualifiers : 3;  // Bitwise OR of TQ.
   
   // function-specifier
   bool FS_inline_specified : 1;
@@ -98,15 +119,6 @@
   // attributes.
   // FIXME: implement declspec attributes.
   
-  // Flags to query which specifiers were applied.
-  enum ParsedSpecifiers {
-    PQ_None                  = 0,
-    PQ_StorageClassSpecifier = 1,
-    PQ_TypeSpecifier         = 2,
-    PQ_TypeQualifier         = 4,
-    PQ_FunctionSpecifier     = 8
-  };
-  
   DeclSpec()
     : StorageClassSpec(SCS_unspecified),
       SCS_thread_specified(false),





More information about the cfe-commits mailing list