Ariel-Burton added a comment.

In D130123#3691011 <https://reviews.llvm.org/D130123#3691011>, @rnk wrote:

> That sounds reasonable to me, I confirmed that MSVC really only lets you 
> apply these attributes directly to pointer types and to typedefs.
>
> Can you add a test for the other most common type sugar node, the template 
> parameter? It looks like this:
>
>   template <typename T>
>   void f(T __ptr32 a) {
>       (*a) += 1;
>   }
>   void g(int *p) {
>       f(p);
>   }
>
> If there isn't already a C++ test for __ptr32 & co, go ahead and make one.

What is your expectation for your template code fragment?  MSVC does not accept 
it.

On the other hand, MSVC does accept this:

  template <typename T>
  void f(T  a) {
    (*a) += sizeof(a);
  }
  void g(int *p) {
    f(p);
  }
  void h(int *__ptr32 p) {
      f(p);
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130123

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to