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
if (!MostDerivedClassDecl)
return;
CXXMethodDecl *DM = MD->getCorrespondingMethodInClass(MostDerivedClassDecl);
- if (!DM)
+ if (!DM || DM->isPure())
return;
SemaRef.MarkAnyDeclReferenced(Loc, DM, OdrUse);
}
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();
+ }
+ };
+ }
+}
+