[cfe-commits] r128271 - in /cfe/trunk: include/clang/Sema/DeclSpec.h lib/Parse/ParseCXXInlineMethods.cpp lib/Parse/ParseDeclCXX.cpp lib/Sema/DeclSpec.cpp test/CXX/class/class.mem/p8-0x-pedantic.cpp test/CXX/class/class.mem/p8-0x.cpp test/Parser/cxx0x-override-control-keywords.cpp

Anders Carlsson andersca at mac.com
Fri Mar 25 04:19:41 PDT 2011


Author: andersca
Date: Fri Mar 25 06:19:41 2011
New Revision: 128271

URL: http://llvm.org/viewvc/llvm-project?rev=128271&view=rev
Log:
Remove 'new' from virt-specifier since it's going to be removed in the next C++0x draft

Modified:
    cfe/trunk/include/clang/Sema/DeclSpec.h
    cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp
    cfe/trunk/lib/Parse/ParseDeclCXX.cpp
    cfe/trunk/lib/Sema/DeclSpec.cpp
    cfe/trunk/test/CXX/class/class.mem/p8-0x-pedantic.cpp
    cfe/trunk/test/CXX/class/class.mem/p8-0x.cpp
    cfe/trunk/test/Parser/cxx0x-override-control-keywords.cpp

Modified: cfe/trunk/include/clang/Sema/DeclSpec.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/DeclSpec.h?rev=128271&r1=128270&r2=128271&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/DeclSpec.h (original)
+++ cfe/trunk/include/clang/Sema/DeclSpec.h Fri Mar 25 06:19:41 2011
@@ -1704,8 +1704,7 @@
   enum Specifier {
     VS_None = 0,
     VS_Override = 1,
-    VS_Final = 2,
-    VS_New = 4
+    VS_Final = 2
   };
 
   VirtSpecifiers() : Specifiers(0) { }
@@ -1719,9 +1718,6 @@
   bool isFinalSpecified() const { return Specifiers & VS_Final; }
   SourceLocation getFinalLoc() const { return VS_finalLoc; }
 
-  bool isNewSpecified() const { return Specifiers & VS_New; }
-  SourceLocation getNewLoc() const { return VS_newLoc; }
-
   void clear() { Specifiers = 0; }
 
   static const char *getSpecifierName(Specifier VS);
@@ -1731,7 +1727,7 @@
 private:
   unsigned Specifiers;
 
-  SourceLocation VS_overrideLoc, VS_finalLoc, VS_newLoc;
+  SourceLocation VS_overrideLoc, VS_finalLoc;
   SourceLocation LastLocation;
 };
 

Modified: cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp?rev=128271&r1=128270&r2=128271&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp (original)
+++ cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp Fri Mar 25 06:19:41 2011
@@ -41,8 +41,6 @@
       Diag(VS.getOverrideLoc(), diag::ext_override_inline) << "override";
     if (VS.isFinalSpecified())
       Diag(VS.getFinalLoc(), diag::ext_override_inline) << "final";
-    if (VS.isNewSpecified())
-      Diag(VS.getNewLoc(), diag::ext_override_inline) << "new";
 
     FnD = Actions.ActOnCXXMemberDeclarator(getCurScope(), AS, D,
                                            move(TemplateParams), 0, 

Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=128271&r1=128270&r2=128271&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Fri Mar 25 06:19:41 2011
@@ -1269,14 +1269,10 @@
 ///       virt-specifier:
 ///         override
 ///         final
-///         new
 VirtSpecifiers::Specifier Parser::isCXX0XVirtSpecifier() const {
   if (!getLang().CPlusPlus)
     return VirtSpecifiers::VS_None;
 
-  if (Tok.is(tok::kw_new))
-    return VirtSpecifiers::VS_New;
-
   if (Tok.is(tok::identifier)) {
     IdentifierInfo *II = Tok.getIdentifierInfo();
 

Modified: cfe/trunk/lib/Sema/DeclSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/DeclSpec.cpp?rev=128271&r1=128270&r2=128271&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/DeclSpec.cpp (original)
+++ cfe/trunk/lib/Sema/DeclSpec.cpp Fri Mar 25 06:19:41 2011
@@ -829,7 +829,6 @@
   default: assert(0 && "Unknown specifier!");
   case VS_Override: VS_overrideLoc = Loc; break;
   case VS_Final:    VS_finalLoc = Loc; break;
-  case VS_New:      VS_newLoc = Loc; break;
   }
 
   return false;
@@ -840,7 +839,6 @@
   default: assert(0 && "Unknown specifier");
   case VS_Override: return "override";
   case VS_Final: return "final";
-  case VS_New: return "new";
   }
 }
 

Modified: cfe/trunk/test/CXX/class/class.mem/p8-0x-pedantic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/class/class.mem/p8-0x-pedantic.cpp?rev=128271&r1=128270&r2=128271&view=diff
==============================================================================
--- cfe/trunk/test/CXX/class/class.mem/p8-0x-pedantic.cpp (original)
+++ cfe/trunk/test/CXX/class/class.mem/p8-0x-pedantic.cpp Fri Mar 25 06:19:41 2011
@@ -8,7 +8,6 @@
   struct B : Base1 {
     virtual void f() override {} // expected-warning {{'override' keyword only allowed in declarations, allowed as an extension}}
     virtual void g() final {} // expected-warning {{'final' keyword only allowed in declarations, allowed as an extension}}
-    virtual void h() new {} // expected-warning {{'new' keyword only allowed in declarations, allowed as an extension}}
   };
 }
 

Modified: cfe/trunk/test/CXX/class/class.mem/p8-0x.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/class/class.mem/p8-0x.cpp?rev=128271&r1=128270&r2=128271&view=diff
==============================================================================
--- cfe/trunk/test/CXX/class/class.mem/p8-0x.cpp (original)
+++ cfe/trunk/test/CXX/class/class.mem/p8-0x.cpp Fri Mar 25 06:19:41 2011
@@ -5,7 +5,6 @@
 };
 
 struct A : Base1 {
-  virtual void f() new new; // expected-error {{class member already marked 'new'}}
   virtual void g() override override; // expected-error {{class member already marked 'override'}}
   virtual void h() final final; // expected-error {{class member already marked 'final'}}
 };
@@ -34,7 +33,6 @@
   };
 
   struct A : Base1 {
-    virtual void f() new new {} // expected-error {{class member already marked 'new'}}
     virtual void g() override override {} // expected-error {{class member already marked 'override'}}
     virtual void h() final final {} // expected-error {{class member already marked 'final'}}
   };

Modified: cfe/trunk/test/Parser/cxx0x-override-control-keywords.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/cxx0x-override-control-keywords.cpp?rev=128271&r1=128270&r2=128271&view=diff
==============================================================================
--- cfe/trunk/test/Parser/cxx0x-override-control-keywords.cpp (original)
+++ cfe/trunk/test/Parser/cxx0x-override-control-keywords.cpp Fri Mar 25 06:19:41 2011
@@ -7,9 +7,6 @@
 struct S : Base {
   virtual void final() final;
   virtual void override() override;
-  virtual void n() new;
-  int i : 3 new;
-  int j new;
 };
 
 struct T {





More information about the cfe-commits mailing list