[clang] Control spacing for attribute printing (PR #174197)

Vassil Vassilev via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 8 01:33:33 PST 2026


================
@@ -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 feel that the current setup forces the clients to know the internals of `prettyPrintAttributes` and always check with an `if`-stmt. Can we somehow make this more localized?

https://github.com/llvm/llvm-project/pull/174197


More information about the cfe-commits mailing list