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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits