Skip to content

Commit

Permalink
PR50294: Fix a performance regression from 2c9dbcd.
Browse files Browse the repository at this point in the history
Per the contract of ReadLateParsedTemplates, we should not be returning
the same results multiple times. No functionality change intended, other
than to runtime.

Thanks to Luboš Luňák for identifying the cause of the regression!
  • Loading branch information
zygoloid committed Sep 2, 2021
1 parent 4d5220f commit 6eda66b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clang/lib/Serialization/ASTReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8412,6 +8412,8 @@ void ASTReader::ReadLateParsedTemplates(
LPTMap.insert(std::make_pair(FD, std::move(LT)));
}
}

LateParsedTemplates.clear();
}

void ASTReader::LoadSelector(Selector Sel) {
Expand Down

0 comments on commit 6eda66b

Please sign in to comment.