[PATCH] D16750: Bug 15685 - OpenCL 'char' is not signed

Igor Chesnokov via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 30 08:58:30 PST 2016


ichesnokov created this revision.
ichesnokov added reviewers: asl, kraiskil.
ichesnokov added a subscriber: cfe-commits.
ichesnokov set the repository for this revision to rL LLVM.

A simple patch to ensure that char is signed. Check assumed for OpenCL only.

Repository:
  rL LLVM

http://reviews.llvm.org/D16750

Files:
  test/SemaOpenCL/ocl-char-is-not-signed.cl

Index: test/SemaOpenCL/ocl-char-is-not-signed.cl
===================================================================
--- test/SemaOpenCL/ocl-char-is-not-signed.cl
+++ test/SemaOpenCL/ocl-char-is-not-signed.cl
@@ -0,0 +1,3 @@
+// RUN: %clang_cc1 %s
+
+constant int CHECK = (char)(0xFFu) < 0 ? 0 : 1/0;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16750.46474.patch
Type: text/x-patch
Size: 301 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160130/3491da26/attachment.bin>


More information about the cfe-commits mailing list