Richard Trieu 0ac2eb7369 [ODRHash] Fix hashing for friend functions.
When hashing a templated function, use the hash of the function it was
instantiated from.

llvm-svn: 325742
2018-02-22 05:50:29 +00:00

18 lines
285 B
C++

template <class T>
struct iterator {
void Compare(const iterator &x) { return; }
friend void Check(iterator) { return; }
};
template <class T = int> struct Box {
iterator<T> I;
void test() {
Check(I);
I.Compare(I);
}
};
// Force instantiation of Box<int>
Box<> B;