summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser
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
commita34f9c7fd55977f977c7356f95b8e35a25532dbf (patch)
treed3003e44da144f75eca7fb734a4032b4908aec84 /clang/test/Parser
parentbffe88027cc21e4995698ac2c63fec46e0fc0ac1 (diff)
downloadbcm5719-llvm-a34f9c7fd55977f977c7356f95b8e35a25532dbf.tar.gz
bcm5719-llvm-a34f9c7fd55977f977c7356f95b8e35a25532dbf.zip
Use of override keywords in C++98 should produce a warning by default.
llvm-svn: 142050
Diffstat (limited to 'clang/test/Parser')
-rw-r--r--clang/test/Parser/cxx0x-in-cxx98.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Parser/cxx0x-in-cxx98.cpp b/clang/test/Parser/cxx0x-in-cxx98.cpp
index 9e41a700a98..95ceafdfc5c 100644
--- a/clang/test/Parser/cxx0x-in-cxx98.cpp
+++ b/clang/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}}
+};
OpenPOWER on IntegriCloud