File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,11 @@ void NonisolatedNonsendingByDefaultMigrationTarget::diagnose() const {
7373 return ;
7474 }
7575
76+ // Only diagnose declarations from the current module.
77+ if (decl->getModuleContext () != ctx.MainModule ) {
78+ return ;
79+ }
80+
7681 // If the attribute cannot appear on this kind of declaration, we can't
7782 // diagnose it.
7883 if (!DeclAttribute::canAttributeAppearOnDecl (DeclAttrKind::Concurrent,
@@ -153,10 +158,6 @@ void NonisolatedNonsendingByDefaultMigrationTarget::diagnose() const {
153158
154159 const auto featureName = feature.getName ();
155160 if (decl) {
156- // Only diagnose declarations from the current module.
157- if (decl->getModuleContext () != ctx.MainModule )
158- return ;
159-
160161 // Diagnose the function, but slap the attribute on the storage declaration
161162 // instead if the function is an accessor.
162163 auto *functionDecl = dyn_cast<AbstractFunctionDecl>(decl);
You can’t perform that action at this time.
0 commit comments