Skip to content

Commit 59f44f9

Browse files
authored
Merge pull request swiftlang#75228 from gottesmm/pr-f2f34406d69ac9eaaad55962982a29be7d08c95b
[gardening] Print out nonisolated(unsafe) on var decls when printing VarDecl
2 parents bc7db0d + b20251e commit 59f44f9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/AST/ASTDumper.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -1347,6 +1347,14 @@ namespace {
13471347
printStorageImpl(VD);
13481348
printFlag(VD->getAttrs().hasAttribute<KnownToBeLocalAttr>(),
13491349
"known_to_be_local", DeclModifierColor);
1350+
if (auto *nonisolatedAttr =
1351+
VD->getAttrs().getAttribute<NonisolatedAttr>()) {
1352+
if (nonisolatedAttr->isUnsafe()) {
1353+
printFlag(true, "nonisolated(unsafe)", DeclModifierColor);
1354+
} else {
1355+
printFlag(true, "nonisolated", DeclModifierColor);
1356+
}
1357+
}
13501358

13511359
printAccessors(VD);
13521360

0 commit comments

Comments
 (0)