[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.
llvm-svn: 342199
diff --git a/clang/test/Modules/Inputs/odr_hash-Unresolved/class.h b/clang/test/Modules/Inputs/odr_hash-Unresolved/class.h
index fe3a711..8a3c9f9 100644
--- a/clang/test/Modules/Inputs/odr_hash-Unresolved/class.h
+++ b/clang/test/Modules/Inputs/odr_hash-Unresolved/class.h
@@ -6,6 +6,7 @@
void run() {
int x;
A::Check(&Field, 1);
+ A::Check(&Field, 1);
}
};
#endif