[PATCH] D95624: [OpenCL][PR48896] Fix default address space in template argument deduction

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 24 06:12:52 PDT 2021


Anastasia added inline comments.
Herald added a subscriber: ldrumm.


================
Comment at: clang/test/SemaOpenCLCXX/address-space-templates.cl:60
+  // Preserve the address space of the type in forwarding reference.
+  // CHECK: CXXMethodDecl {{.*}} operator() 'void (__private int &__private) const __generic'
+  foo4(i, [](auto&& x){;});
----------------
bader wrote:
> This check fails on 32-bit Windows platform where compiler adds  `__attribute__((thiscall))` both constructor and call operator.
> 
> Something like this should fix the problem:
> 
> ```
>   // CHECK: |-CXXConstructorDecl {{.*}} rep 'void (const __generic rep &__private){{.*}} __generic'
>   // CHECK: CXXMethodDecl {{.*}} operator() 'void (__private int &__private){{.*}} const __generic'
> ```
Sure: https://reviews.llvm.org/D99258


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95624



More information about the cfe-commits mailing list