r244288 - [modules] Fix use-after-iterator-invalidation bug.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 6 15:14:12 PDT 2015
Author: rsmith
Date: Thu Aug 6 17:14:12 2015
New Revision: 244288
URL: http://llvm.org/viewvc/llvm-project?rev=244288&view=rev
Log:
[modules] Fix use-after-iterator-invalidation bug.
Modified:
cfe/trunk/lib/Serialization/ASTReader.cpp
Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=244288&r1=244287&r2=244288&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Thu Aug 6 17:14:12 2015
@@ -6185,7 +6185,7 @@ void ASTReader::FindExternalLexicalDecls
SmallVectorImpl<Decl *> &Decls) {
bool PredefsVisited[NUM_PREDEF_DECL_IDS] = {};
- auto Visit = [&] (ModuleFile *M, const LexicalContents &LexicalDecls) {
+ auto Visit = [&] (ModuleFile *M, LexicalContents LexicalDecls) {
assert(LexicalDecls.size() % 2 == 0 && "expected an even number of entries");
for (int I = 0, N = LexicalDecls.size(); I != N; I += 2) {
auto K = (Decl::Kind)+LexicalDecls[I];
More information about the cfe-commits
mailing list