diff options
author | Anastasia Stulova <anastasia.stulova@arm.com> | 2016-07-11 13:46:02 +0000 |
---|---|---|
committer | Anastasia Stulova <anastasia.stulova@arm.com> | 2016-07-11 13:46:02 +0000 |
commit | 4d8500396454334975ab8bb6766d6521c5140b13 (patch) | |
tree | 7a98430197c60e9b0a425afd57ab5bac30c5225d /clang/lib/Sema/SemaDecl.cpp | |
parent | c73301bbe3dbcd6253b22a09e6acdb30eae31581 (diff) | |
download | bcm5719-llvm-4d8500396454334975ab8bb6766d6521c5140b13.tar.gz bcm5719-llvm-4d8500396454334975ab8bb6766d6521c5140b13.zip |
[OpenCL] Improved diagnostics of OpenCL types.
- Changes diagnostics for Blocks to be implicitly
const qualified OpenCL v2.0 s6.12.5.
- Added and unified diagnostics of some OpenCL special types:
blocks, images, samplers, pipes. These types are intended for use
with the OpenCL builtin functions only and, therefore, most regular
uses are not allowed including assignments, arithmetic operations,
pointer dereferencing, etc.
Review: http://reviews.llvm.org/D21989
llvm-svn: 275061
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index dd7a68cefb5..6f7a13d6322 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -11032,16 +11032,6 @@ ParmVarDecl *Sema::CheckParameter(DeclContext *DC, SourceLocation StartLoc, } } - // OpenCL v2.0 s6.9b - Pointer to image/sampler cannot be used. - // OpenCL v2.0 s6.13.16.1 - Pointer to pipe cannot be used. - if (getLangOpts().OpenCL && T->isPointerType()) { - const QualType PTy = T->getPointeeType(); - if (PTy->isImageType() || PTy->isSamplerT() || PTy->isPipeType()) { - Diag(NameLoc, diag::err_opencl_pointer_to_type) << PTy; - New->setInvalidDecl(); - } - } - return New; } |