aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaOpenCLCXX/address-space-cond.clcpp
blob: 1b45515b1a150a765d5968b481b67284aa99e4e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// RUN: %clang_cc1 %s -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}}
}

}