Templates don't have key functions (cf computeKeyFunction() in
RecordLayoutBuilder.cpp), so don't have something that looks like one.
Also, instead of a vcall to force generation of the vtable, just construct
the object. This is how the repro on PR5557 (what the test is for) worked too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225741
91177308-0d34-0410-b5e6-
96231b3b80d8
namespace PR5557 {
template <class T> struct A {
- A();
- virtual void anchor();
+ A(); // expected-note{{instantiation}}
virtual int a(T x);
};
template<class T> A<T>::A() {}
-template<class T> void A<T>::anchor() { }
template<class T> int A<T>::a(T x) {
return *x; // expected-error{{requires pointer operand}}
}
-void f(A<int> x) {
- x.anchor(); // expected-note{{instantiation}}
+void f() {
+ A<int> x; // expected-note{{instantiation}}
}
template<typename T>