From: LLVM Packaging Team Date: Sun, 18 Jun 2017 17:12:15 +0000 (+0100) Subject: allow-opencl-pointer-to-bool X-Git-Tag: archive/raspbian/1%4.0.1-1+rpi1~4^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6853a52074b64dffabd6358d6e2f20d0921c8881;p=llvm-toolchain-4.0.git allow-opencl-pointer-to-bool Used by e.g. Blender on mesa-opencl-icd Author: Anastasia Stulova Origin: upstream https://reviews.llvm.org/rL294313 Bug: https://bugs.llvm.org/show_bug.cgi?id=30217 Bug-Debian: https://bugs.debian.org/857623 Gbp-Pq: Name 857623-allow-opencl-pointer-to-bool.diff --- diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 719e1e350..58aab003b 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -11424,7 +11424,7 @@ ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc, Context.getLangOpts().OpenCLVersion < 120) { // OpenCL v1.1 6.3.h: The logical operator not (!) does not // operate on scalar float types. - if (!resultType->isIntegerType()) + if (!resultType->isIntegerType() && !resultType->isPointerType()) return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr) << resultType << Input.get()->getSourceRange()); }