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

bwendlin at cs.uiuc.edu bwendlin at cs.uiuc.edu
Wed Jul 11 09:45:45 PDT 2007


Author: bwendlin
Date: Wed Jul 11 11:45:45 2007
New Revision: 39572

URL: http://llvm.org/viewvc/llvm-project?rev=39572&view=rev
Log:
Submitted by: Bill Wendling
Reviewed by: Chris Lattner

- Add a reference decl type.

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=39572&r1=39571&r2=39572&view=diff

==============================================================================
--- cfe/cfe/trunk/include/clang/Parse/DeclSpec.h (original)
+++ cfe/cfe/trunk/include/clang/Parse/DeclSpec.h Wed Jul 11 11:45:45 2007
@@ -256,6 +256,8 @@
   };
 
   struct ReferenceTypeInfo {
+    /// The type qualifier: restrict. [GNU] C++ extension
+    bool HasRestrict;
     void destroy() {}
   };
 
@@ -337,10 +339,11 @@
   
   /// getReference - Return a DeclaratorChunk for a reference.
   ///
-  static DeclaratorChunk getReference(SourceLocation Loc) {
+  static DeclaratorChunk getReference(unsigned TypeQuals, SourceLocation Loc) {
     DeclaratorChunk I;
-    I.Kind          = Reference;
-    I.Loc           = Loc;
+    I.Kind            = Reference;
+    I.Loc             = Loc;
+    I.Ref.HasRestrict = (TypeQuals & TQ_restrict) != 0;
     return I;
   }
   





More information about the cfe-commits mailing list