summaryrefslogtreecommitdiff
path: root/test/FixIt/fixit-cxx0x.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/FixIt/fixit-cxx0x.cpp')
-rw-r--r--test/FixIt/fixit-cxx0x.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/FixIt/fixit-cxx0x.cpp b/test/FixIt/fixit-cxx0x.cpp
index 49a05ff8d1e4..5aebcb3defaa 100644
--- a/test/FixIt/fixit-cxx0x.cpp
+++ b/test/FixIt/fixit-cxx0x.cpp
@@ -158,3 +158,22 @@ namespace MisplacedParameterPack {
template <int... N...> // expected-error {{'...' must immediately precede declared identifier}}
void redundantEllipsisInNonTypeTemplateParameter();
}
+
+namespace MisplacedDeclAndRefSpecAfterVirtSpec {
+ struct B {
+ virtual void f();
+ virtual void f() volatile const;
+ };
+ struct D : B {
+ virtual void f() override;
+ virtual void f() override final const volatile; // expected-error {{'const' qualifier may not appear after the virtual specifier 'final'}} expected-error {{'volatile' qualifier may not appear after the virtual specifier 'final'}}
+ };
+ struct B2 {
+ virtual void f() &;
+ virtual void f() volatile const &&;
+ };
+ struct D2 : B2 {
+ virtual void f() override &; // expected-error {{'&' qualifier may not appear after the virtual specifier 'override'}}
+ virtual void f() override final const volatile &&; // expected-error {{'const' qualifier may not appear after the virtual specifier 'final'}} expected-error {{'volatile' qualifier may not appear after the virtual specifier 'final'}} expected-error {{'&&' qualifier may not appear after the virtual specifier 'final'}}
+ };
+}