forked from OSchip/llvm-project
[ODRHash] Avoid dereferencing end() of a SmallVector.
Found by MSAN. llvm-svn: 295820
This commit is contained in:
parent
07056a06a0
commit
6f224d2bc0
|
@ -8987,7 +8987,8 @@ void ASTReader::diagnoseOdrViolations() {
|
|||
// SecondDiffType will not be Other and FirstDecl and SecondDecl will be
|
||||
// filled in if not EndOfClass.
|
||||
while (FirstIt != FirstHashes.end() || SecondIt != SecondHashes.end()) {
|
||||
if (FirstIt->second == SecondIt->second) {
|
||||
if (FirstIt != FirstHashes.end() && SecondIt != SecondHashes.end() &&
|
||||
FirstIt->second == SecondIt->second) {
|
||||
++FirstIt;
|
||||
++SecondIt;
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue