1 // RUN: %clang_cc1 %s -pedantic -verify
3 namespace PointerRvalues {
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 *;
10 void g(const __global int *a, __generic int *b) {
11 using T = decltype(true ? +a : +b);
12 using T = const __generic int *;
15 void h(const __global int **a, __generic int **b) {
16 using T = decltype(true ? +a : +b); // expected-error {{incompatible operand types}}
19 void i(__global int **a, __generic int **b) {
20 using T = decltype(true ? +a : +b); // expected-error {{incompatible operand types}}