[ODRHash] Fix hashing for friend functions.
When hashing a templated function, use the hash of the function it was
instantiated from.
llvm-svn: 325742
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 30599ea..c4da87c 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -3625,6 +3625,12 @@
}
}
+ if (auto *FT = getInstantiatedFromMemberFunction()) {
+ HasODRHash = true;
+ ODRHash = FT->getODRHash();
+ return ODRHash;
+ }
+
class ODRHash Hash;
Hash.AddFunctionDecl(this);
HasODRHash = true;