From: Anders Carlsson Date: Fri, 25 Mar 2011 11:28:25 +0000 (+0000) Subject: Remove warnings about using override control keywords in inline function definitions... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=844c25d4383ccaf44765687cc4a7e591b3fe1472;p=clang Remove warnings about using override control keywords in inline function definitions; they will be allowed in the next C++0x draft. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128273 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticParseKinds.td b/include/clang/Basic/DiagnosticParseKinds.td index 8f4414d3d4..544318356c 100644 --- a/include/clang/Basic/DiagnosticParseKinds.td +++ b/include/clang/Basic/DiagnosticParseKinds.td @@ -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; -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'">; diff --git a/lib/Parse/ParseCXXInlineMethods.cpp b/lib/Parse/ParseCXXInlineMethods.cpp index 47b3ff9ec5..fc1902ca7f 100644 --- a/lib/Parse/ParseCXXInlineMethods.cpp +++ b/lib/Parse/ParseCXXInlineMethods.cpp @@ -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 index 78153739ce..0000000000 --- a/test/CXX/class/class.mem/p8-0x-pedantic.cpp +++ /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}} - }; -} -