brintos

brintos / llvm-project-archived public Read only

0
0
Text · 641 B · 1b45515 Raw
24 lines · plain
1// RUN: %clang_cc1 %s -pedantic -verify2 3namespace PointerRvalues {4 5void 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 10void g(const __global int *a, __generic int *b) {11  using T = decltype(true ? +a : +b);12  using T = const __generic int *;13}14 15void h(const __global int **a, __generic int **b) {16  using T = decltype(true ? +a : +b); // expected-error {{incompatible operand types}}17}18 19void i(__global int **a, __generic int **b) {20  using T = decltype(true ? +a : +b); // expected-error {{incompatible operand types}}21}22 23}24