summaryrefslogtreecommitdiff
path: root/lib/AST/ODRHash.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/ODRHash.cpp')
-rw-r--r--lib/AST/ODRHash.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/AST/ODRHash.cpp b/lib/AST/ODRHash.cpp
index 66b9940b8b08..b19135384cfd 100644
--- a/lib/AST/ODRHash.cpp
+++ b/lib/AST/ODRHash.cpp
@@ -246,7 +246,9 @@ public:
}
void VisitValueDecl(const ValueDecl *D) {
- AddQualType(D->getType());
+ if (!isa<FunctionDecl>(D)) {
+ AddQualType(D->getType());
+ }
Inherited::VisitValueDecl(D);
}
@@ -305,6 +307,8 @@ public:
Hash.AddSubDecl(Param);
}
+ AddQualType(D->getReturnType());
+
Inherited::VisitFunctionDecl(D);
}
@@ -350,6 +354,8 @@ bool ODRHash::isWhitelistedDecl(const Decl *D, const CXXRecordDecl *Parent) {
default:
return false;
case Decl::AccessSpec:
+ case Decl::CXXConstructor:
+ case Decl::CXXDestructor:
case Decl::CXXMethod:
case Decl::Field:
case Decl::Friend: