]> granicus.if.org Git - clang/commit
OpenCL: handle ternary operator when the condition is a vector
authorSameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>
Wed, 4 Feb 2015 06:38:18 +0000 (06:38 +0000)
committerSameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>
Wed, 4 Feb 2015 06:38:18 +0000 (06:38 +0000)
commitd64ea9423123d41842648a12b8f0cb9a7c1f67e2
tree48328f5d3876b23889c6cfe59f12ea24c5f893fd
parentc55f729746794e33c789e49fac7c20b146f4fce1
OpenCL: handle ternary operator when the condition is a vector

When the condition is a vector, OpenCL specifies additional
requirements on the operand types, and also the operations
required to determine the result type of the operator. This is a
combination of OpenCL v1.1 s6.3.i and s6.11.6, and the semantics
remain unchanged in later versions of OpenCL.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@228118 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaExpr.cpp
test/SemaOpenCL/cond.cl