summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/virtual-member-functions-key-function.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/virtual-member-functions-key-function.cpp')
-rw-r--r--clang/test/SemaCXX/virtual-member-functions-key-function.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/virtual-member-functions-key-function.cpp b/clang/test/SemaCXX/virtual-member-functions-key-function.cpp
index 8da6bf55984..2e21fb7365e 100644
--- a/clang/test/SemaCXX/virtual-member-functions-key-function.cpp
+++ b/clang/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() { }
OpenPOWER on IntegriCloud