summaryrefslogtreecommitdiff
path: root/test/SemaCXX/virtuals.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-07-05 14:23:59 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-07-05 14:23:59 +0000
commitc192b3dcffd5e672a2b2e1730e2440febb4fb192 (patch)
treeac719b5984165053bf83d71142e4d96b609b9784 /test/SemaCXX/virtuals.cpp
parent2e645aa5697838f16ec570eb07c2bee7e13d0e0b (diff)
Diffstat (limited to 'test/SemaCXX/virtuals.cpp')
-rw-r--r--test/SemaCXX/virtuals.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaCXX/virtuals.cpp b/test/SemaCXX/virtuals.cpp
index 6b8231d4e1e2..f8180745bd3b 100644
--- a/test/SemaCXX/virtuals.cpp
+++ b/test/SemaCXX/virtuals.cpp
@@ -51,3 +51,13 @@ namespace pr8264 {
virtual virtual void func(); // expected-warning {{duplicate 'virtual' declaration specifier}}
};
}
+
+namespace VirtualFriend {
+ // DR (filed but no number yet): reject meaningless pure-specifier on a friend declaration.
+ struct A { virtual int f(); };
+ struct B { friend int A::f() = 0; }; // expected-error {{friend declaration cannot have a pure-specifier}}
+ struct C {
+ virtual int f();
+ friend int C::f() = 0; // expected-error {{friend declaration cannot have a pure-specifier}}
+ };
+}