]> granicus.if.org Git - clang/commit
[OpenCL] Fix type compatibility check and generic AS mangling.
authorAnastasia Stulova <anastasia.stulova@arm.com>
Fri, 10 Mar 2017 15:23:07 +0000 (15:23 +0000)
committerAnastasia Stulova <anastasia.stulova@arm.com>
Fri, 10 Mar 2017 15:23:07 +0000 (15:23 +0000)
commit7281b53f5303708cdbd595e471f6c30cd36f3513
treee0ffe3cb448738e7195d67d9c648250706bb69ba
parentc658c8caa228ebed6629ee2364f5c88c2234cbf8
[OpenCL] Fix type compatibility check and generic AS mangling.

1. Reimplemented conditional operator so that it checks
compatibility of unqualified pointees of the 2nd and
the 3rd operands (C99, OpenCL v2.0 6.5.15).

Define QualTypes compatibility for OpenCL as following:

   - corresponding types are compatible (C99 6.7.3)
   - CVR-qualifiers are equal (C99 6.7.3)
   - address spaces are equal (implementation defined)

2. Added generic address space to Itanium mangling.

Review: D30037

Patch by Dmitry Borisenkov!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297468 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ASTContext.cpp
lib/AST/ItaniumMangle.cpp
lib/Sema/SemaExpr.cpp
test/SemaOpenCL/address-spaces-conversions-cl2.0.cl
test/SemaOpenCL/overload_addrspace_resolution.cl [new file with mode: 0644]