xref: /llvm-project/clang/test/SemaSYCL/special-class-attribute-on-non-sycl.cpp (revision 8ba9c794feb30cd969b9776c39873def10c51bff)
1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -fsycl-is-device -verify %s
2 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -x c++ %s
3 
4 #ifndef __SYCL_DEVICE_ONLY__
5 // expected-warning@+5 {{'sycl_special_class' attribute ignored}}
6 #else
7 // expected-no-diagnostics
8 #endif
9 
10 class __attribute__((sycl_special_class)) special_class {
__init()11   void __init(){}
12 };
13