[clang] Rework the printing of attributes (PR #87281)

Vassil Vassilev via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 5 04:07:56 PDT 2024


================
@@ -73,3 +73,15 @@ class C {
   // CHECK: void pwtt(void *, int) __attribute__((pointer_with_type_tag(foo, 2, 3)));
   void pwtt(void *, int) __attribute__((pointer_with_type_tag(foo, 2, 3)));
 };
+
+#define ANNOTATE_ATTR __attribute__((annotate("Annotated")))
+ANNOTATE_ATTR int annotated_attr ANNOTATE_ATTR = 0;
+// CHECK: __attribute__((annotate("Annotated"))) int annotated_attr __attribute__((annotate("Annotated"))) = 0;
+
+// FIXME: We do not print the attribute as written after the type specifier.
+int ANNOTATE_ATTR annotated_attr_fixme = 0;
----------------
vgvassilev wrote:

Is that something this PR breaks? I am not sure I understand if I need to change anything. 

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


More information about the cfe-commits mailing list