diff options
| author | Nico Weber <nicolasweber@gmx.de> | 2011-01-28 06:07:34 +0000 |
|---|---|---|
| committer | Nico Weber <nicolasweber@gmx.de> | 2011-01-28 06:07:34 +0000 |
| commit | 24b2a822ddb514f468061ac95ffffc7586099ead (patch) | |
| tree | c7383466228dd84b5c5120ee0bd41cf50547994a /clang/test/CXX/class/class.mem/p8-0x-pedantic.cpp | |
| parent | f26870c43d90c7f3fbf976e5cc342bd06acbc09a (diff) | |
| download | bcm5719-llvm-24b2a822ddb514f468061ac95ffffc7586099ead.tar.gz bcm5719-llvm-24b2a822ddb514f468061ac95ffffc7586099ead.zip | |
PR9037: Allow override, final, and new as an extension on inline members.
llvm-svn: 124477
Diffstat (limited to 'clang/test/CXX/class/class.mem/p8-0x-pedantic.cpp')
| -rw-r--r-- | clang/test/CXX/class/class.mem/p8-0x-pedantic.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/CXX/class/class.mem/p8-0x-pedantic.cpp b/clang/test/CXX/class/class.mem/p8-0x-pedantic.cpp new file mode 100644 index 00000000000..a4b775c191d --- /dev/null +++ b/clang/test/CXX/class/class.mem/p8-0x-pedantic.cpp @@ -0,0 +1,14 @@ +// 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}} + virtual void h() new {} // expected-warning {{'new' keyword only allowed in declarations, allowed as an extension}} + }; +} + |

