[llvm-branch-commits] [clang] e9739ba - Make address-space-lambda.cl pass on 32-bit Windows

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jan 24 11:40:41 PST 2020


Author: Hans Wennborg
Date: 2020-01-24T20:40:27+01:00
New Revision: e9739ba8ffca472aa5a6b64a2e9b2008fd8be5cd

URL: https://github.com/llvm/llvm-project/commit/e9739ba8ffca472aa5a6b64a2e9b2008fd8be5cd
DIFF: https://github.com/llvm/llvm-project/commit/e9739ba8ffca472aa5a6b64a2e9b2008fd8be5cd.diff

LOG: Make address-space-lambda.cl pass on 32-bit Windows

Member functions will have the thiscall attribute on them.

(cherry picked from commit 698d1cd3b8154b3b74423386d3e111e6b756e87a)

Added: 
    

Modified: 
    clang/test/SemaOpenCLCXX/address-space-lambda.cl

Removed: 
    


################################################################################
diff  --git a/clang/test/SemaOpenCLCXX/address-space-lambda.cl b/clang/test/SemaOpenCLCXX/address-space-lambda.cl
index eeea71e6353f..e953817442f7 100644
--- a/clang/test/SemaOpenCLCXX/address-space-lambda.cl
+++ b/clang/test/SemaOpenCLCXX/address-space-lambda.cl
@@ -1,16 +1,16 @@
 //RUN: %clang_cc1 %s -cl-std=clc++ -pedantic -ast-dump -verify | FileCheck %s
 
-//CHECK: CXXMethodDecl {{.*}} constexpr operator() 'int (__private int) const __generic'
+//CHECK: CXXMethodDecl {{.*}} constexpr operator() 'int (__private int){{.*}} const __generic'
 auto glambda = [](auto a) { return a; };
 
 __kernel void test() {
   int i;
-//CHECK: CXXMethodDecl {{.*}} constexpr operator() 'void () const __generic'
+//CHECK: CXXMethodDecl {{.*}} constexpr operator() 'void () {{.*}}const __generic'
   auto  llambda = [&]() {i++;};
   llambda();
   glambda(1);
   // Test lambda with default parameters
-//CHECK: CXXMethodDecl {{.*}} constexpr operator() 'void () const __generic'
+//CHECK: CXXMethodDecl {{.*}} constexpr operator() 'void () {{.*}}const __generic'
   [&] {i++;} ();
   __constant auto err = [&]() {}; //expected-note{{candidate function not viable: 'this' object is in address space '__constant', but method expects object in address space '__generic'}}
   err();                          //expected-error-re{{no matching function for call to object of type '__constant (lambda at {{.*}})'}}
@@ -25,10 +25,10 @@ __kernel void test() {
 }
 
 __kernel void test_qual() {
-//CHECK: |-CXXMethodDecl {{.*}} constexpr operator() 'void () const __private'
+//CHECK: |-CXXMethodDecl {{.*}} constexpr operator() 'void () {{.*}}const __private'
   auto priv1 = []() __private {};
   priv1();
-//CHECK: |-CXXMethodDecl {{.*}} constexpr operator() 'void () const __generic'
+//CHECK: |-CXXMethodDecl {{.*}} constexpr operator() 'void () {{.*}}const __generic'
   auto priv2 = []() __generic {};
   priv2();
   auto priv3 = []() __global {}; //expected-note{{candidate function not viable: 'this' object is in address space '__private', but method expects object in address space '__global'}} //expected-note{{conversion candidate of type 'void (*)()'}}
@@ -38,7 +38,7 @@ __kernel void test_qual() {
   const1(); //expected-error{{no matching function for call to object of type '__constant (lambda at}}
   __constant auto const2 = []() __generic{}; //expected-note{{candidate function not viable: 'this' object is in address space '__constant', but method expects object in address space '__generic'}} //expected-note{{conversion candidate of type 'void (*)()'}}
   const2(); //expected-error{{no matching function for call to object of type '__constant (lambda at}}
-//CHECK: |-CXXMethodDecl {{.*}} constexpr operator() 'void () const __constant'
+//CHECK: |-CXXMethodDecl {{.*}} constexpr operator() 'void () {{.*}}const __constant'
   __constant auto const3 = []() __constant{};
   const3();
 


        


More information about the llvm-branch-commits mailing list