llvm-project/clang/test/SemaOpenCLCXX/address-space-cond.clcpp
Anastasia Stulova d1c8a151df [OpenCL] Added distinct file extension for C++ for OpenCL.
Files compiled with C++ for OpenCL mode can now have a distinct
file extension - clcpp, then clang driver picks the compilation
mode automatically (-x clcpp) without the use of -cl-std=clc++.

Differential Revision: https://reviews.llvm.org/D96771
2021-03-24 13:07:04 +00:00

24 lines
641 B
Plaintext

// 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}}
}
}