|
1 |
| -//RUN: %clang_cc1 %s -cl-std=clc++ -pedantic -ast-dump -verify=expected,nowin32 | FileCheck %s |
2 |
| -//RUN: %clang_cc1 %s -cl-std=clc++ -pedantic -ast-dump -verify=expected,win32 -triple i386-windows | FileCheck %s |
| 1 | +//RUN: %clang_cc1 %s -cl-std=clc++ -pedantic -ast-dump -verify | FileCheck %s |
| 2 | +//RUN: %clang_cc1 %s -cl-std=clc++ -pedantic -ast-dump -verify -triple i386-windows | FileCheck %s |
3 | 3 |
|
4 | 4 | //CHECK: CXXMethodDecl {{.*}} constexpr operator() 'int (__private int){{.*}} const __generic'
|
5 | 5 | auto glambda = [](auto a) { return a; };
|
@@ -32,12 +32,27 @@ __kernel void test_qual() {
|
32 | 32 | //CHECK: |-CXXMethodDecl {{.*}} constexpr operator() 'void () {{.*}}const __generic'
|
33 | 33 | auto priv2 = []() __generic {};
|
34 | 34 | priv2();
|
35 |
| - auto priv3 = []() __global {}; //expected-note{{candidate function not viable: 'this' object is in address space '__private', but method expects object in address space '__global'}} //nowin32-note{{conversion candidate of type 'void (*)()'}}//win32-note{{conversion candidate of type 'void (*)() __attribute__((thiscall))'}} |
| 35 | + auto priv3 = []() __global {}; //expected-note{{candidate function not viable: 'this' object is in address space '__private', but method expects object in address space '__global'}} |
| 36 | +#if defined(_WIN32) && !defined(_WIN64) |
| 37 | + //expected-note@35{{conversion candidate of type 'void (*)() __attribute__((thiscall))'}} |
| 38 | +#else |
| 39 | + //expected-note@35{{conversion candidate of type 'void (*)()'}} |
| 40 | +#endif |
36 | 41 | priv3(); //expected-error{{no matching function for call to object of type}}
|
37 | 42 |
|
38 |
| - __constant auto const1 = []() __private{}; //expected-note{{candidate function not viable: 'this' object is in address space '__constant', but method expects object in address space '__private'}} //nowin32-note{{conversion candidate of type 'void (*)()'}} //win32-note{{conversion candidate of type 'void (*)() __attribute__((thiscall))'}} |
| 43 | + __constant auto const1 = []() __private{}; //expected-note{{candidate function not viable: 'this' object is in address space '__constant', but method expects object in address space '__private'}} |
| 44 | +#if defined(_WIN32) && !defined(_WIN64) |
| 45 | + //expected-note@43{{conversion candidate of type 'void (*)() __attribute__((thiscall))'}} |
| 46 | +#else |
| 47 | + //expected-note@43{{conversion candidate of type 'void (*)()'}} |
| 48 | +#endif |
39 | 49 | const1(); //expected-error{{no matching function for call to object of type '__constant (lambda at}}
|
40 |
| - __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'}} //nowin32-note{{conversion candidate of type 'void (*)()'}} //win32-note{{conversion candidate of type 'void (*)() __attribute__((thiscall))'}} |
| 50 | + __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'}} |
| 51 | +#if defined(_WIN32) && !defined(_WIN64) |
| 52 | + //expected-note@50{{conversion candidate of type 'void (*)() __attribute__((thiscall))'}} |
| 53 | +#else |
| 54 | + //expected-note@50{{conversion candidate of type 'void (*)()'}} |
| 55 | +#endif |
41 | 56 | const2(); //expected-error{{no matching function for call to object of type '__constant (lambda at}}
|
42 | 57 | //CHECK: |-CXXMethodDecl {{.*}} constexpr operator() 'void () {{.*}}const __constant'
|
43 | 58 | __constant auto const3 = []() __constant{};
|
|
0 commit comments