]> granicus.if.org Git - clang/commit
[ODRHash] Fix early exit that skipped code.
authorRichard Trieu <rtrieu@google.com>
Fri, 14 Sep 2018 01:15:28 +0000 (01:15 +0000)
committerRichard Trieu <rtrieu@google.com>
Fri, 14 Sep 2018 01:15:28 +0000 (01:15 +0000)
commit7592787111fedc16dbd9546502f5f3cfc31e0a0e
treeacd47683c4fe4fa2c0c755832b106bf1c6ed7731
parent1a5ee756dd3d5a88f08b6d951164fc4542f645fb
[ODRHash] Fix early exit that skipped code.

There is a bit of code at the end of AddDeclaration that should be run on
every exit of the function.  However, there was an early exit beforehand
that could be triggered, which causes a small amount of data to skip the
hashing, leading to false positive mismatch.  Use a separate function so
that this code is always run.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342199 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/ODRHash.h
lib/AST/ODRHash.cpp
test/Modules/Inputs/odr_hash-Unresolved/class.h