Skip to content

Commit 21440b3

Browse files
authored
Merge pull request #85867 from egorzhdan/egorzhdan/iterator-invalidation
[cxx-interop] Fix iterator invalidation
2 parents fb0ec64 + 3015c39 commit 21440b3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/ClangImporter/ImportDecl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2645,7 +2645,8 @@ namespace {
26452645
structResult->setIsCxxNonTrivial(isAddressOnly);
26462646
}
26472647

2648-
for (auto &getterAndSetter : Impl.GetterSetterMap[result]) {
2648+
auto gettersAndSetters = Impl.GetterSetterMap[result];
2649+
for (auto &getterAndSetter : gettersAndSetters) {
26492650
auto getter = getterAndSetter.second.first;
26502651
auto setter = getterAndSetter.second.second;
26512652
// We cannot make a computed property without a getter.

0 commit comments

Comments
 (0)