aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorAndrew Savonichev <andrew.savonichev@intel.com>2018-09-06 11:54:09 +0000
committerAndrew Savonichev <andrew.savonichev@intel.com>2018-09-06 11:54:09 +0000
commitd353e6d748e0c151884345f2c08f1b988c5e7b94 (patch)
tree4ddbb0e8d14ff14b249d4ac72378caee28378fe2 /clang/lib/CodeGen/CodeGenModule.cpp
parent5c4d6e66f0caa4b6deb8d7008372efbd1c0aae49 (diff)
downloadllvm-d353e6d748e0c151884345f2c08f1b988c5e7b94.zip
llvm-d353e6d748e0c151884345f2c08f1b988c5e7b94.tar.gz
llvm-d353e6d748e0c151884345f2c08f1b988c5e7b94.tar.bz2
[OpenCL] Disallow negative attribute arguments
Summary: Negative arguments in kernel attributes are silently bitcast'ed to unsigned, for example: __attribute__((reqd_work_group_size(1, -1, 1))) __kernel void k() {} is a complete equivalent of: __attribute__((reqd_work_group_size(1, 4294967294, 1))) __kernel void k() {} This is likely an error, so the patch forbids negative arguments in several OpenCL attributes. Users who really want 4294967294 can still use it as an unsigned representation. Reviewers: Anastasia, yaxunl, bader Reviewed By: Anastasia, yaxunl, bader Subscribers: bader, cfe-commits Differential Revision: https://reviews.llvm.org/D50259 llvm-svn: 341539
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions