aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/virtual-member-functions-key-function.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-01-06 17:00:51 +0000
committerDouglas Gregor <dgregor@apple.com>2010-01-06 17:00:51 +0000
commitadda84683944e11820b9a03c6b170edd109289c5 (patch)
tree130d7c05b6501ca229b5e710d8929a3d2409e0d9 /test/SemaCXX/virtual-member-functions-key-function.cpp
parentb1622a1fd7b7f4ab8d00d0183d17c90ad25c14e3 (diff)
Make sure that the key-function computation produces the correct
result for a nested class whose first non-pure virtual member function has an inline body. Previously, we were checking for the key function before we had seen the (delayed) inline body. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92839 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/virtual-member-functions-key-function.cpp')
-rw-r--r--test/SemaCXX/virtual-member-functions-key-function.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/virtual-member-functions-key-function.cpp b/test/SemaCXX/virtual-member-functions-key-function.cpp
index 8da6bf5598..2e21fb7365 100644
--- a/test/SemaCXX/virtual-member-functions-key-function.cpp
+++ b/test/SemaCXX/virtual-member-functions-key-function.cpp
@@ -16,3 +16,14 @@ void f() {
(void)new B;
(void)new C;
}
+
+// Make sure that the key-function computation is consistent when the
+// first virtual member function of a nested class has an inline body.
+struct Outer {
+ struct Inner {
+ virtual void f() { }
+ void g();
+ };
+};
+
+void Outer::Inner::g() { }