[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 14 10:13:34 PDT 2022


aaron.ballman added inline comments.


================
Comment at: clang/test/SemaCXX/type-traits.cpp:3099-3100
+
+  { int a[T(__is_same(remove_pointer_t<int __attribute__((address_space(1))) *>, int))]; }
+  { int a[T(__is_same(remove_pointer_t<S __attribute__((address_space(2))) *>, S))]; }
+}
----------------
cjdb wrote:
> cjdb wrote:
> > rsmith wrote:
> > > It seems strange to remove the address space qualifier here, given that this trait doesn't remove cv-qualifiers.
> > Does `int __attribute__((address_space(1)))` make sense as a type? I thought it had to be a pointee.
> Gentle ping.
> Does int __attribute__((address_space(1))) make sense as a type? I thought it had to be a pointee.

It doesn't have to be on a pointer or a pointee type.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116203/new/

https://reviews.llvm.org/D116203



More information about the cfe-commits mailing list