]> granicus.if.org Git - clang/commit
[OpenCL] Traverse vector types for ocl extensions support
authorAlexey Sotkin <alexey.sotkin@intel.com>
Mon, 3 Sep 2018 11:43:22 +0000 (11:43 +0000)
committerAlexey Sotkin <alexey.sotkin@intel.com>
Mon, 3 Sep 2018 11:43:22 +0000 (11:43 +0000)
commit325385cbbea24349ef9b1cdf227e43f74bd670dc
tree3c6816436fe200f05b84abfb5b1ea83ed8ccf130
parent1bc73590ad1335313e8f262393547b8af67c9167
[OpenCL] Traverse vector types for ocl extensions support

Summary:
Given the following kernel:
__kernel void foo() {
  double d;
  double4 dd;
}

and cl_khr_fp64 is disabled, the compilation would fail due to
the presence of 'double d', but when removed, it passes.

The expectation is that extended vector types of unsupported types
will also be unsupported.

The patch adds the check for this scenario.

Patch by: Ofir Cohen

Reviewers: bader, Anastasia, AlexeySotkin, yaxunl

Reviewed By: Anastasia

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D51296

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341309 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/Sema.cpp
test/SemaOpenCL/extensions.cl