aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/cxx0x-in-cxx98.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-10-15 04:01:16 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-10-15 04:01:16 +0000
commitd60feeb90a4278dfb875fece6587e4c5c1198a60 (patch)
tree0c5aee3433fd04c9f66197441be98fbc93b51973 /test/Parser/cxx0x-in-cxx98.cpp
parent05f9931eefa394698d168dc8e60334180ff6a869 (diff)
Use of override keywords in C++98 should produce a warning by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142050 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/cxx0x-in-cxx98.cpp')
-rw-r--r--test/Parser/cxx0x-in-cxx98.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Parser/cxx0x-in-cxx98.cpp b/test/Parser/cxx0x-in-cxx98.cpp
index 9e41a700a9..95ceafdfc5 100644
--- a/test/Parser/cxx0x-in-cxx98.cpp
+++ b/test/Parser/cxx0x-in-cxx98.cpp
@@ -8,3 +8,11 @@ struct X {
};
}
+struct B {
+ virtual void f();
+ virtual void g();
+};
+struct D final : B { // expected-warning {{'final' keyword accepted as a C++11 extension}}
+ virtual void f() override; // expected-warning {{'override' keyword accepted as a C++11 extension}}
+ virtual void g() final; // expected-warning {{'final' keyword accepted as a C++11 extension}}
+};