[PATCH] D80317: [SYCL] Prohibit arithmetic operations for incompatible pointers
Alexey Bader via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 20 13:11:16 PDT 2020
bader marked an inline comment as done.
bader added inline comments.
================
Comment at: clang/lib/Sema/SemaExpr.cpp:10090
// if both are pointers check if operation is valid wrt address spaces
- if (S.getLangOpts().OpenCL && isLHSPointer && isRHSPointer) {
+ if ((S.getLangOpts().OpenCL || S.getLangOpts().SYCLIsDevice) &&
+ isLHSPointer && isRHSPointer) {
----------------
Alternative approach would be to remove `S.getLangOpts().OpenCL` to enable this check for all modes.
@Anastasia, do you know if it's safe to do?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80317/new/
https://reviews.llvm.org/D80317
More information about the cfe-commits
mailing list