summaryrefslogtreecommitdiff
path: root/test/SemaCXX/undefined-internal.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2013-02-14 00:55:17 +0000
committerNick Lewycky <nicholas@mxc.ca>2013-02-14 00:55:17 +0000
commitd3b4f0e27ffa8d73f8c69a717c39c39a4d47ff0c (patch)
tree3ef43fa5026d09a566d8e5600e07ea552391a8de /test/SemaCXX/undefined-internal.cpp
parent544450e449c2fa1af63199b047b2d378be1760ec (diff)
downloadclang-d3b4f0e27ffa8d73f8c69a717c39c39a4d47ff0c.tar.gz
When marking derived classes' virtual methods ODR-used in order to trigger
instantiation in order to permit devirtualization later in codegen, skip over pure functions since those can't be devirtualization targets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175116 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/undefined-internal.cpp')
-rw-r--r--test/SemaCXX/undefined-internal.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/SemaCXX/undefined-internal.cpp b/test/SemaCXX/undefined-internal.cpp
index e8810adadf..839fdafb34 100644
--- a/test/SemaCXX/undefined-internal.cpp
+++ b/test/SemaCXX/undefined-internal.cpp
@@ -306,3 +306,20 @@ namespace test12 {
Cls2 obj1((T7())); // expected-note {{used here}}
}
}
+
+namespace test13 {
+ namespace {
+ struct X {
+ virtual void f() { }
+ };
+
+ struct Y : public X {
+ virtual void f() = 0;
+
+ virtual void g() {
+ X::f();
+ }
+ };
+ }
+}
+