diff options
Diffstat (limited to 'clang/lib/AST')
-rw-r--r-- | clang/lib/AST/Decl.cpp | 6 | ||||
-rw-r--r-- | clang/lib/AST/ODRHash.cpp | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 30599ea7cfb..c4da87c013d 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -3625,6 +3625,12 @@ unsigned FunctionDecl::getODRHash() { } } + if (auto *FT = getInstantiatedFromMemberFunction()) { + HasODRHash = true; + ODRHash = FT->getODRHash(); + return ODRHash; + } + class ODRHash Hash; Hash.AddFunctionDecl(this); HasODRHash = true; diff --git a/clang/lib/AST/ODRHash.cpp b/clang/lib/AST/ODRHash.cpp index 4104d3454e5..528e32aaba2 100644 --- a/clang/lib/AST/ODRHash.cpp +++ b/clang/lib/AST/ODRHash.cpp @@ -484,9 +484,6 @@ void ODRHash::AddFunctionDecl(const FunctionDecl *Function) { if (!Function->hasBody()) return; if (!Function->getBody()) return; - // TODO: Fix hashing friend functions. - if (Function->getFriendObjectKind()) return; - // Skip functions that are specializations or in specialization context. const DeclContext *DC = Function; while (DC) { |