[cfe-commits] r128273 - in /cfe/trunk: include/clang/Basic/DiagnosticParseKinds.td lib/Parse/ParseCXXInlineMethods.cpp test/CXX/class/class.mem/p8-0x-pedantic.cpp

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


Author: andersca
Date: Fri Mar 25 06:28:25 2011
New Revision: 128273

URL: http://llvm.org/viewvc/llvm-project?rev=128273&view=rev
Log:
Remove warnings about using override control keywords in inline function definitions; they will be allowed in the next C++0x draft.

Removed:
    cfe/trunk/test/CXX/class/class.mem/p8-0x-pedantic.cpp
Modified:
    cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
    cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td?rev=128273&r1=128272&r2=128273&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td Fri Mar 25 06:28:25 2011
@@ -415,8 +415,6 @@
 // C++0x override control
 def ext_override_control_keyword : Extension<
   "'%0' keyword accepted as a C++0x extension">, InGroup<CXX0x>;
-def ext_override_inline: Extension<
-  "'%0' keyword only allowed in declarations, allowed as an extension">;
 
 def err_duplicate_virt_specifier : Error<
   "class member already marked '%0'">;

Modified: cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp?rev=128273&r1=128272&r2=128273&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp (original)
+++ cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp Fri Mar 25 06:28:25 2011
@@ -37,11 +37,6 @@
     FnD = Actions.ActOnFriendFunctionDecl(getCurScope(), D, true,
                                           move(TemplateParams));
   else { // FIXME: pass template information through
-    if (VS.isOverrideSpecified())
-      Diag(VS.getOverrideLoc(), diag::ext_override_inline) << "override";
-    if (VS.isFinalSpecified())
-      Diag(VS.getFinalLoc(), diag::ext_override_inline) << "final";
-
     FnD = Actions.ActOnCXXMemberDeclarator(getCurScope(), AS, D,
                                            move(TemplateParams), 0, 
                                            VS, 0, /*IsDefinition*/true);

Removed: 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=128272&view=auto
==============================================================================
--- cfe/trunk/test/CXX/class/class.mem/p8-0x-pedantic.cpp (original)
+++ cfe/trunk/test/CXX/class/class.mem/p8-0x-pedantic.cpp (removed)
@@ -1,13 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -std=c++0x -pedantic -verify %s 
-
-namespace inline_extension {
-  struct Base1 { 
-    virtual void f() {}
-  };
-
-  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}}
-  };
-}
-





More information about the cfe-commits mailing list