We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39745a1 commit 2b10c4cCopy full SHA for 2b10c4c
lib/AST/ASTPrinter.cpp
@@ -2781,8 +2781,13 @@ void PrintAST::printEnumElement(EnumElementDecl *elt) {
2781
->castTo<AnyFunctionType>()
2782
->getParams();
2783
}
2784
+
2785
+ // @escaping is not valid in enum element position, even though the
2786
+ // attribute is implicitly added. Ignore it when printing the parameters.
2787
+ Options.ExcludeAttrList.push_back(TAK_escaping);
2788
printParameterList(PL, params,
2789
/*isAPINameByDefault*/true);
2790
+ Options.ExcludeAttrList.pop_back();
2791
2792
2793
auto *raw = elt->getRawValueExpr();
0 commit comments