]> granicus.if.org Git - clang/commitdiff
Remove warnings about using override control keywords in inline function definitions...
authorAnders Carlsson <andersca@mac.com>
Fri, 25 Mar 2011 11:28:25 +0000 (11:28 +0000)
committerAnders Carlsson <andersca@mac.com>
Fri, 25 Mar 2011 11:28:25 +0000 (11:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128273 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticParseKinds.td
lib/Parse/ParseCXXInlineMethods.cpp
test/CXX/class/class.mem/p8-0x-pedantic.cpp [deleted file]

index 8f4414d3d46c9db70faf9f7faadd804b06bab809..544318356c7e9f4b0c30cd9a49587b40478723b3 100644 (file)
@@ -415,8 +415,6 @@ def warn_deleted_function_accepted_as_extension: ExtWarn<
 // 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'">;
index 47b3ff9ec5a908fa35da5b38c82401369c2f4834..fc1902ca7fd19400697847e3b98863b43986b2f9 100644 (file)
@@ -37,11 +37,6 @@ Decl *Parser::ParseCXXInlineMethodDef(AccessSpecifier AS, ParsingDeclarator &D,
     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);
diff --git a/test/CXX/class/class.mem/p8-0x-pedantic.cpp b/test/CXX/class/class.mem/p8-0x-pedantic.cpp
deleted file mode 100644 (file)
index 7815373..0000000
+++ /dev/null
@@ -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}}
-  };
-}
-