You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
655 B

// RUN: %clang_cc1 %s -cl-std=clc++ -pedantic -verify
namespace PointerRvalues {
void f(__global int *__constant *a, const __global int *__constant *b) {
using T = decltype(true ? +a : +b);
using T = const __global int *const __constant *;
}
void g(const __global int *a, __generic int *b) {
using T = decltype(true ? +a : +b);
using T = const __generic int *;
}
void h(const __global int **a, __generic int **b) {
using T = decltype(true ? +a : +b); // expected-error {{incompatible operand types}}
}
void i(__global int **a, __generic int **b) {
using T = decltype(true ? +a : +b); // expected-error {{incompatible operand types}}
}
}