Skip to content

Commit b20251e

Browse files
committed
[gardening] Print out nonisolated(unsafe) on var decls when printing VarDecl.
Just noticed this was missing when doing some other work.
1 parent a8a1eb2 commit b20251e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/AST/ASTDumper.cpp

Lines changed: 8 additions & 0 deletions
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)