Fix mem corruption: iterator might be invalidated by insertion.
This commit is contained in:
parent
fa7ce40d67
commit
82c69767d9
@ -119,13 +119,13 @@ namespace cling {
|
||||
}
|
||||
if (shouldSkip(D)) {
|
||||
skipCurrentDecl(true);
|
||||
Insert.first->second = false;
|
||||
m_Visited[getCanonicalOrNamespace(D)] = false;
|
||||
} else {
|
||||
clang::DeclVisitor<ForwardDeclPrinter>::Visit(D);
|
||||
if (m_SkipFlag) {
|
||||
// D was not good, flag it.
|
||||
skipCurrentDecl(true);
|
||||
Insert.first->second = false;
|
||||
m_Visited[getCanonicalOrNamespace(D)] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user