Skip to content

Commit 0c185c4

Browse files
committed
Concurrency: Don't walk into local types when checking isolation
1 parent eb04729 commit 0c185c4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2625,6 +2625,13 @@ namespace {
26252625
}
26262626

26272627
PreWalkAction walkToDeclPre(Decl *decl) override {
2628+
// Don't walk into local types because nothing in them can
2629+
// change the outcome of our analysis, and we don't want to
2630+
// assume things there have been type checked yet.
2631+
if (isa<TypeDecl>(decl)) {
2632+
return Action::SkipChildren();
2633+
}
2634+
26282635
if (auto func = dyn_cast<AbstractFunctionDecl>(decl)) {
26292636
if (func->isLocalContext()) {
26302637
checkLocalCaptures(func);

0 commit comments

Comments
 (0)