llvm-project/clang/test/SemaOpenCLCXX
Ole Strohm 85255a04e5 [C++][Sema] Ignore top-level qualifiers in casts
Ignore top-level qualifiers in casts, which fixes issues in reinterpret_cast.

This rule comes from [expr.type]/8.2.2 which explains that casting to a
pr-qualified type should actually cast to the unqualified type. In C++
this is only done for types that aren't classes or arrays.

Fixes: PR49221

Reviewed By: Anastasia

Differential Revision: https://reviews.llvm.org/D102689
2021-07-05 12:22:08 +01:00
..
address-space-castoperators.clcpp [OpenCL] Added distinct file extension for C++ for OpenCL. 2021-03-24 13:07:04 +00:00
address-space-cond.clcpp [OpenCL] Added distinct file extension for C++ for OpenCL. 2021-03-24 13:07:04 +00:00
address-space-deduction.clcpp [OpenCL] Added distinct file extension for C++ for OpenCL. 2021-03-24 13:07:04 +00:00
address-space-lambda.clcpp [clang] [C++2b] [P1102] Accept lambdas without parameter list (). 2021-03-24 14:42:27 +01:00
address-space-of-this-class-scope.clcpp [OpenCL] Added distinct file extension for C++ for OpenCL. 2021-03-24 13:07:04 +00:00
address-space-of-this.clcpp [OpenCL] Added distinct file extension for C++ for OpenCL. 2021-03-24 13:07:04 +00:00
address-space-references.clcpp [OpenCL] Added distinct file extension for C++ for OpenCL. 2021-03-24 13:07:04 +00:00
address-space-templates.clcpp [OpenCL] Fix AST check in address-space-templates test 2021-03-26 14:24:30 +00:00
address_space_overloading.clcpp [OpenCL] Added distinct file extension for C++ for OpenCL. 2021-03-24 13:07:04 +00:00
addrspace-auto.clcpp [OpenCL] Added distinct file extension for C++ for OpenCL. 2021-03-24 13:07:04 +00:00
addrspace-constructors.clcpp [OpenCL] Fix overloading resolution of addrspace constructors 2021-06-11 11:12:33 +01:00
addrspace_cast.clcpp [C++][Sema] Ignore top-level qualifiers in casts 2021-07-05 12:22:08 +01:00
addrspace_cast_ast_dump.clcpp [OpenCL] Added distinct file extension for C++ for OpenCL. 2021-03-24 13:07:04 +00:00
half.clcpp [OpenCL] Fix ICE with invalid use of half 2021-06-01 13:43:07 +01:00
invalid-kernel.clcpp [OpenCL] Add clang extension for non-portable kernel parameters. 2021-05-05 14:58:23 +01:00
members.clcpp [OpenCL] Added distinct file extension for C++ for OpenCL. 2021-03-24 13:07:04 +00:00
method-overload-address-space.clcpp [OpenCL] Added distinct file extension for C++ for OpenCL. 2021-03-24 13:07:04 +00:00
newdelete.clcpp [OpenCL] Added distinct file extension for C++ for OpenCL. 2021-03-24 13:07:04 +00:00
private-access-specifier.cpp
references.clcpp [OpenCL] Added distinct file extension for C++ for OpenCL. 2021-03-24 13:07:04 +00:00
reinterpret-cast.clcpp [C++][Sema] Ignore top-level qualifiers in casts 2021-07-05 12:22:08 +01:00
restricted.clcpp [OpenCL] Added distinct file extension for C++ for OpenCL. 2021-03-24 13:07:04 +00:00
template-astype.cl [OpenCL] Support template parameters for as_type 2021-03-22 11:59:05 +00:00
template-opencl-types.clcpp [C++4OpenCL] Add diagnostics for OpenCL types in templates. 2021-04-27 13:04:25 +01:00