Skip to content

Commit 65a0dc1

Browse files
committed
[ASTPrinter] Print all SPI attributes, including the inherited ones
1 parent 0a65a39 commit 65a0dc1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/AST/ASTPrinter.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,17 @@ void PrintAST::printAttributes(const Decl *D) {
990990
}
991991
}
992992

993+
// SPI groups
994+
if (Options.PrintSPIs) {
995+
interleave(D->getSPIGroups(),
996+
[&](Identifier spiName) {
997+
Printer.printAttrName("_spi", true);
998+
Printer << "(" << spiName << ") ";
999+
},
1000+
[&] { Printer << ""; });
1001+
Options.ExcludeAttrList.push_back(DAK_SPIAccessControl);
1002+
}
1003+
9931004
// Don't print any contextual decl modifiers.
9941005
// We will handle 'mutating' and 'nonmutating' separately.
9951006
if (isa<AccessorDecl>(D)) {

0 commit comments

Comments
 (0)