PR19957: [OpenCL] Incorrectly accepts implicit address space conversion with ternary...
authorYaxun Liu <Yaxun.Liu@amd.com>
Tue, 12 Apr 2016 19:43:36 +0000 (19:43 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Tue, 12 Apr 2016 19:43:36 +0000 (19:43 +0000)
commita1a87adf59f880f6ab64a160bd521efeb3ae2e54
tree1efb54acb5372c485f92f88479d6d7c6ecd80080
parent49bd58f1ebe28d97e4949e9c757bc5dfd8b2d72f
PR19957: [OpenCL] Incorrectly accepts implicit address space conversion with ternary operator.

Generates addrspacecast instead of bitcast for ternary operator when necessary, and diagnose ternary operator with incompatible second and third operands.

https://llvm.org/bugs/show_bug.cgi?id=19957

Differential Revision: http://reviews.llvm.org/D17412

llvm-svn: 266111
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/AST/ASTContext.cpp
clang/lib/Sema/SemaExpr.cpp
clang/test/CodeGenOpenCL/address-spaces-conversions.cl
clang/test/SemaOpenCL/address-spaces-conversions-cl2.0.cl