Skip to content

Commit 149828f

Browse files
committed
[ASTPrint] Print argument list for CustomAttr
1 parent f2d3fae commit 149828f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/AST/ASTPrinter.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,8 @@ class PrintAST : public ASTVisitor<PrintAST> {
11031103
void printRequirement(const InverseRequirement &inverse,
11041104
bool forInherited);
11051105

1106+
void printArgumentList(ArgumentList *args, bool forSubscript = false);
1107+
11061108
private:
11071109
bool shouldPrint(const Decl *D, bool Notify = false);
11081110
bool shouldPrintPattern(const Pattern *P);
@@ -1138,8 +1140,6 @@ class PrintAST : public ASTVisitor<PrintAST> {
11381140
void printFunctionParameters(AbstractFunctionDecl *AFD);
11391141

11401142
void printArgument(const Argument &arg);
1141-
1142-
void printArgumentList(ArgumentList *args, bool forSubscript = false);
11431143

11441144
void printAvailabilitySpec(AvailabilitySpec *spec);
11451145

@@ -4851,6 +4851,9 @@ void CustomAttr::printCustomAttr(ASTPrinter &Printer, const PrintOptions &Option
48514851
else
48524852
getTypeRepr()->print(Printer, Options);
48534853
Printer.printNamePost(PrintNameContext::Attribute);
4854+
if (ArgumentList *args = getArgs()) {
4855+
PrintAST(Printer, Options).printArgumentList(args);
4856+
}
48544857
}
48554858

48564859
void PrintAST::visitIntegerLiteralExpr(IntegerLiteralExpr *expr) {

0 commit comments

Comments
 (0)