summaryrefslogtreecommitdiffstats
path: root/test/CXX/class/class.mem/p8-0x-pedantic.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-02-20 13:06:31 +0000
committerdim <dim@FreeBSD.org>2011-02-20 13:06:31 +0000
commit39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df (patch)
treea9243275843fbeaa590afc07ee888e006b8d54ea /test/CXX/class/class.mem/p8-0x-pedantic.cpp
parent69b4eca4a4255ba43baa5c1d9bbdec3ec17f479e (diff)
downloadFreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.zip
FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.tar.gz
Vendor import of clang trunk r126079:
http://llvm.org/svn/llvm-project/cfe/trunk@126079
Diffstat (limited to 'test/CXX/class/class.mem/p8-0x-pedantic.cpp')
-rw-r--r--test/CXX/class/class.mem/p8-0x-pedantic.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CXX/class/class.mem/p8-0x-pedantic.cpp b/test/CXX/class/class.mem/p8-0x-pedantic.cpp
new file mode 100644
index 0000000..a4b775c
--- /dev/null
+++ b/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}}
+ };
+}
+
OpenPOWER on IntegriCloud