[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 7 16:51:59 PST 2018

leonardchan added inline comments.

Comment at: clang/lib/AST/TypePrinter.cpp:958-964
+      // Remove the address_space qualifier so it does not get printed. We
+      // instead want to print the macro only.
+      SplitQualType SplitTy = AttrTy->getModifiedType().split();
+      Qualifiers Quals = SplitTy.Quals;
+      if (Quals.getAddressSpace() >= LangAS::FirstTargetAddressSpace)
+        Quals.removeAddressSpace();
+      return printBefore(SplitTy.Ty, Quals, OS);
This has not been addressed yet in this patch, but will still make another patch moving the address_space from the qualifier to the AttributedType (in reference to r340765).

  rC Clang


More information about the cfe-commits mailing list