Skip to content

Commit c732ba3

Browse files
committed
[Clang importer] Make @actorIndependent on imported macros implicit.
This prevents it from printing in Swift interfaces, which is a bit noisy.
1 parent 6a5dfb8 commit c732ba3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/ClangImporter/ImportDecl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8969,8 +8969,8 @@ ClangImporter::Implementation::createConstant(Identifier name, DeclContext *dc,
89698969
func->getAttrs().add(new (C) TransparentAttr(/*implicit*/ true));
89708970
// If we're in concurrency mode, mark the constant as @actorIndependent
89718971
if (SwiftContext.LangOpts.EnableExperimentalConcurrency) {
8972-
auto actorIndependentAttr = new (C) ActorIndependentAttr(SourceLoc(),
8973-
SourceRange(), ActorIndependentKind::Safe);
8972+
auto actorIndependentAttr = new (C) ActorIndependentAttr(
8973+
ActorIndependentKind::Unsafe, /*IsImplicit=*/true);
89748974
var->getAttrs().add(actorIndependentAttr);
89758975
}
89768976
// Set the function up as the getter.

test/IDE/print_clang_objc_async.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ import _Concurrency
4343
// CHECK-NEXT: {{^}} optional func missingAtAttributeMethod()
4444
// CHECK-NEXT: {{^[}]$}}
4545

46-
// CHECK: @actorIndependent var MAGIC_NUMBER: Int32 { get }
46+
// CHECK: {{^}}var MAGIC_NUMBER: Int32 { get }

0 commit comments

Comments
 (0)