[PATCH] [Serialization] Fix short path of ASTDeclContextNameLookupTrait::data_type_builder::insert
Jan Jarý via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 4 09:42:19 PST 2018
Scan correct container. Here doesn't make a sense to scan the empty container `Found`.
Patch by Jan Jary
---
lib/Serialization/ASTReaderInternals.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Serialization/ASTReaderInternals.h b/lib/Serialization/ASTReaderInternals.h
index 2b92ae65ea..18b6b9c859 100644
--- a/lib/Serialization/ASTReaderInternals.h
+++ b/lib/Serialization/ASTReaderInternals.h
@@ -63,7 +63,7 @@ public:
// Just use a linear scan unless we have more than a few IDs.
if (Found.empty() && !Data.empty()) {
if (Data.size() <= 4) {
- for (auto I : Found)
+ for (auto I : Data)
if (I == ID)
return;
Data.push_back(ID);
--
2.16.0
More information about the cfe-commits
mailing list