// 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'">;
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);
+++ /dev/null
-// 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}}
- };
-}
-