Skip to content

Commit 5b5ac98

Browse files
committed
Concurrency: Don't walk into local types when checking isolation
1 parent 2325cf1 commit 5b5ac98

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
@@ -2611,6 +2611,13 @@ namespace {
26112611
}
26122612

26132613
PreWalkAction walkToDeclPre(Decl *decl) override {
2614+
// Don't walk into local types because nothing in them can
2615+
// change the outcome of our analysis, and we don't want to
2616+
// assume things there have been type checked yet.
2617+
if (isa<TypeDecl>(decl)) {
2618+
return Action::SkipChildren();
2619+
}
2620+
26142621
if (auto func = dyn_cast<AbstractFunctionDecl>(decl)) {
26152622
if (func->isLocalContext()) {
26162623
checkLocalCaptures(func);

0 commit comments

Comments
 (0)