diff --git a/clang/test/SemaOpenCLCXX/address-space-castoperators.cl b/clang/test/SemaOpenCLCXX/address-space-castoperators.cl index d61a9a72573cdd..7fd7f728fda398 100644 --- a/clang/test/SemaOpenCLCXX/address-space-castoperators.cl +++ b/clang/test/SemaOpenCLCXX/address-space-castoperators.cl @@ -9,4 +9,9 @@ void nester_ptr() { gengen = static_cast(locgen); //expected-error{{static_cast from '__local int *__generic *' to '__generic int *__generic *' is not allowed}} // CHECK-NOT: AddressSpaceConversion gengen = reinterpret_cast(locgen); //expected-warning{{reinterpret_cast from '__local int *__generic *' to '__generic int *__generic *' changes address space of nested pointers}} + + gengen = const_cast(congen); //expected-error{{const_cast from '__constant int *__generic *' to '__generic int *__generic *' is not allowed}} + gengen = static_cast(congen); //expected-error{{static_cast from '__constant int *__generic *' to '__generic int *__generic *' is not allowed}} +// CHECK-NOT: AddressSpaceConversion + gengen = reinterpret_cast(congen); //expected-warning{{reinterpret_cast from '__constant int *__generic *' to '__generic int *__generic *' changes address space of nested pointers}} }