Skip to content

Commit 698d1cd

Browse files
committed
Make address-space-lambda.cl pass on 32-bit Windows
Member functions will have the thiscall attribute on them.
1 parent 555d8f4 commit 698d1cd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
//RUN: %clang_cc1 %s -cl-std=clc++ -pedantic -ast-dump -verify | FileCheck %s
22

3-
//CHECK: CXXMethodDecl {{.*}} constexpr operator() 'int (__private int) const __generic'
3+
//CHECK: CXXMethodDecl {{.*}} constexpr operator() 'int (__private int){{.*}} const __generic'
44
auto glambda = [](auto a) { return a; };
55

66
__kernel void test() {
77
int i;
8-
//CHECK: CXXMethodDecl {{.*}} constexpr operator() 'void () const __generic'
8+
//CHECK: CXXMethodDecl {{.*}} constexpr operator() 'void () {{.*}}const __generic'
99
auto llambda = [&]() {i++;};
1010
llambda();
1111
glambda(1);
1212
// Test lambda with default parameters
13-
//CHECK: CXXMethodDecl {{.*}} constexpr operator() 'void () const __generic'
13+
//CHECK: CXXMethodDecl {{.*}} constexpr operator() 'void () {{.*}}const __generic'
1414
[&] {i++;} ();
1515
__constant auto err = [&]() {}; //expected-note{{candidate function not viable: 'this' object is in address space '__constant', but method expects object in address space '__generic'}}
1616
err(); //expected-error-re{{no matching function for call to object of type '__constant (lambda at {{.*}})'}}
@@ -25,10 +25,10 @@ __kernel void test() {
2525
}
2626

2727
__kernel void test_qual() {
28-
//CHECK: |-CXXMethodDecl {{.*}} constexpr operator() 'void () const __private'
28+
//CHECK: |-CXXMethodDecl {{.*}} constexpr operator() 'void () {{.*}}const __private'
2929
auto priv1 = []() __private {};
3030
priv1();
31-
//CHECK: |-CXXMethodDecl {{.*}} constexpr operator() 'void () const __generic'
31+
//CHECK: |-CXXMethodDecl {{.*}} constexpr operator() 'void () {{.*}}const __generic'
3232
auto priv2 = []() __generic {};
3333
priv2();
3434
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() {
3838
const1(); //expected-error{{no matching function for call to object of type '__constant (lambda at}}
3939
__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 (*)()'}}
4040
const2(); //expected-error{{no matching function for call to object of type '__constant (lambda at}}
41-
//CHECK: |-CXXMethodDecl {{.*}} constexpr operator() 'void () const __constant'
41+
//CHECK: |-CXXMethodDecl {{.*}} constexpr operator() 'void () {{.*}}const __constant'
4242
__constant auto const3 = []() __constant{};
4343
const3();
4444

0 commit comments

Comments
 (0)