summaryrefslogtreecommitdiffstats
path: root/test/Preprocessor/sycl-macro.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Preprocessor/sycl-macro.cpp')
-rw-r--r--test/Preprocessor/sycl-macro.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Preprocessor/sycl-macro.cpp b/test/Preprocessor/sycl-macro.cpp
new file mode 100644
index 0000000000..186df4ff56
--- /dev/null
+++ b/test/Preprocessor/sycl-macro.cpp
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 %s -E -dM | FileCheck %s
+// RUN: %clang_cc1 %s -fsycl-is-device -E -dM | FileCheck --check-prefix=CHECK-SYCL %s
+
+// CHECK-NOT:#define __SYCL_DEVICE_ONLY__ 1
+// CHECK-SYCL:#define __SYCL_DEVICE_ONLY__ 1