| 1 |
// RUN: %clang_cc1 %s -pedantic -verify |
| 2 |
|
| 3 |
namespace PointerRvalues { |
| 4 |
|
| 5 |
void f(__global int *__constant *a, const __global int *__constant *b) { |
| 6 |
using T = decltype(true ? +a : +b); |
| 7 |
using T = const __global int *const __constant *; |
| 8 |
} |
| 9 |
|
| 10 |
void g(const __global int *a, __generic int *b) { |
| 11 |
using T = decltype(true ? +a : +b); |
| 12 |
using T = const __generic int *; |
| 13 |
} |
| 14 |
|
| 15 |
void h(const __global int **a, __generic int **b) { |
| 16 |
using T = decltype(true ? +a : +b); // expected-error {{incompatible operand types}} |
| 17 |
} |
| 18 |
|
| 19 |
void i(__global int **a, __generic int **b) { |
| 20 |
using T = decltype(true ? +a : +b); // expected-error {{incompatible operand types}} |
| 21 |
} |
| 22 |
|
| 23 |
} |