[cfe-commits] r103954 - in /cfe/trunk: lib/Parse/ParseDeclCXX.cpp test/SemaCXX/class.cpp

Douglas Gregor dgregor at apple.com
Mon May 17 11:19:56 PDT 2010


Author: dgregor
Date: Mon May 17 13:19:56 2010
New Revision: 103954

URL: http://llvm.org/viewvc/llvm-project?rev=103954&view=rev
Log:
mutable is a storage class that can follow a class/struct/union definition. Fixes PR7153

Modified:
    cfe/trunk/lib/Parse/ParseDeclCXX.cpp
    cfe/trunk/test/SemaCXX/class.cpp

Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=103954&r1=103953&r2=103954&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Mon May 17 13:19:56 2010
@@ -981,6 +981,7 @@
     case tok::kw_typedef:         // struct foo {...} typedef   x;
     case tok::kw_register:        // struct foo {...} register  x;
     case tok::kw_auto:            // struct foo {...} auto      x;
+    case tok::kw_mutable:         // struct foo {...} mutable      x;
       // As shown above, type qualifiers and storage class specifiers absolutely
       // can occur after class specifiers according to the grammar.  However,
       // almost noone actually writes code like this.  If we see one of these,

Modified: cfe/trunk/test/SemaCXX/class.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/class.cpp?rev=103954&r1=103953&r2=103954&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/class.cpp (original)
+++ cfe/trunk/test/SemaCXX/class.cpp Mon May 17 13:19:56 2010
@@ -136,3 +136,9 @@
     };
   };
 }
+
+namespace PR7153 {
+  class EnclosingClass {
+    struct A { } mutable *member;
+  };
+}





More information about the cfe-commits mailing list