diff options
author | Richard Trieu <rtrieu@google.com> | 2017-12-21 22:38:29 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2017-12-21 22:38:29 +0000 |
commit | f72fb7e989d94e53e827b2d70fdb435089026824 (patch) | |
tree | 4d087e3b0ec040ca6ad02ef15eaa97c54c942f32 /clang/lib/AST/ODRHash.cpp | |
parent | e9d8789de35a13a75d4161ab81f05a26038801c5 (diff) | |
download | bcm5719-llvm-f72fb7e989d94e53e827b2d70fdb435089026824.tar.gz bcm5719-llvm-f72fb7e989d94e53e827b2d70fdb435089026824.zip |
[ODRHash] Canonicalize Decl's before processing.
Canonicalizing the Decl before processing it as part of the hash should reduce
issues with non-canonical types showing up as mismatches.
llvm-svn: 321319
Diffstat (limited to 'clang/lib/AST/ODRHash.cpp')
-rw-r--r-- | clang/lib/AST/ODRHash.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/AST/ODRHash.cpp b/clang/lib/AST/ODRHash.cpp index 17c95f2a0af..0f07b6225d9 100644 --- a/clang/lib/AST/ODRHash.cpp +++ b/clang/lib/AST/ODRHash.cpp @@ -468,6 +468,7 @@ void ODRHash::AddCXXRecordDecl(const CXXRecordDecl *Record) { void ODRHash::AddDecl(const Decl *D) { assert(D && "Expecting non-null pointer."); + D = D->getCanonicalDecl(); auto Result = DeclMap.insert(std::make_pair(D, DeclMap.size())); ID.AddInteger(Result.first->second); // On first encounter of a Decl pointer, process it. Every time afterwards, |