[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / address-space-arithmetic.cpp
blobaf72bc7624b328b68de3062d36abd625359efc6e
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 int *foo(__attribute__((opencl_private)) int *p,
4 __attribute__((opencl_local)) int *l) {
5 return p - l; // expected-error {{arithmetic operation with operands of type ('__private int *' and '__local int *') which are pointers to non-overlapping address spaces}}