================
@@ -124,9 +125,11 @@ namespace {
void printTemplateArguments(ArrayRef<TemplateArgumentLoc> Args,
const TemplateParameterList *Params);
enum class AttrPosAsWritten { Default = 0, Left, Right };
- bool
- prettyPrintAttributes(const Decl *D,
- AttrPosAsWritten Pos = AttrPosAsWritten::Default);
+ AttrVec
+ getPrintableAttributes(const Decl *D,
----------------
vgvassilev wrote:
> I tried to merge it into `prettyPrintAttributes`, but ended up having to pass
> in a `Prefix` and/or a `Suffix`, and it made it harder to understand what was
> being printed. Pushing the leading/trailing spaces to the calling code and
> always having `prettyPrintAttributes` print a space-separated sequence of
> attrs made it much more obvious to inject spaces or not before and after.
Isn't the prefix suffix determined by the position left/right? Maybe we can
have just a single argument needsSpace and determine the rest based on the
position?
https://github.com/llvm/llvm-project/pull/174197
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits