================
@@ -2676,8 +2695,9 @@ bool Sema::CheckAllocatedType(QualType AllocType, 
SourceLocation Loc,
   else if (AllocType.getAddressSpace() != LangAS::Default &&
            !getLangOpts().OpenCLCPlusPlus)
     return Diag(Loc, diag::err_address_space_qualified_new)
-      << AllocType.getUnqualifiedType()
-      << AllocType.getQualifiers().getAddressSpaceAttributePrintValue();
+           << AllocType.getUnqualifiedType()
+           << formatAddressSpaceForDiag(AllocType, getLangOpts(), Context);
----------------
zwuis wrote:

```cpp
<< Qualifiers::getAddrSpaceAsString(AllocType.getAddressSpace());
```

Now we know the best approach to print address spaces. Other information is 
redundant.

https://github.com/llvm/llvm-project/pull/178424
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to