llvm-project/clang/test/SemaSYCL/special-class-attribute-on-non-sycl.cpp
Zahira Ammarguellat 8ba9c794fe Add support for sycl_special_class attribute.
Special classes such as accessor, sampler, and stream need additional
implementation when they are passed from host to device.

This patch is adding a new attribute “sycl_special_class” used to mark
SYCL classes/struct that need the additional compiler handling.
2022-01-25 14:17:09 -08:00

13 lines
350 B
C++

// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fsycl-is-device -verify %s
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -x c++ %s
#ifndef __SYCL_DEVICE_ONLY__
// expected-warning@+5 {{'sycl_special_class' attribute ignored}}
#else
// expected-no-diagnostics
#endif
class __attribute__((sycl_special_class)) special_class {
void __init(){}
};