view clang/test/SemaCXX/address-space-arithmetic.cpp @ 221:79ff65ed7e25

LLVM12 Original
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 15 Jun 2021 19:15:29 +0900
parents 0572611fdcc8
children
line wrap: on
line source

// RUN: %clang_cc1 -fsyntax-only -verify %s

int *foo(__attribute__((opencl_private)) int *p,
         __attribute__((opencl_local)) int *l) {
  return p - l; // expected-error {{arithmetic operation with operands of type  ('__private int *' and '__local int *') which are pointers to non-overlapping address spaces}}
}