[PATCH] D95776: [OpenCL] Add macro definitions of OpenCL C 3.0 features
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 4 05:11:41 PST 2021
Anastasia added inline comments.
================
Comment at: clang/test/SemaOpenCL/features.cl:1
+// RUN: %clang_cc1 -triple spir-unknown-unknown -finclude-default-header %s -E -dM -o - -x cl -cl-std=CL2.0 -cl-ext=-all \
+// RUN: | FileCheck -match-full-lines %s --check-prefix=FEATURES
----------------
since `-cl-ext=-all` doesn't affect the header functionality I suggest to drop it and use one one line with `-finclude-default-header`. Parsing time with this header is 300x slower so we should minimise its use in tests to avoid negative impact on clang testing.
Would it make sense to add a line without the header with `-cl-std=CL2.0` or/and `-cl-std=CL1.2` to check that there are indeed no macros defined?
================
Comment at: clang/test/SemaOpenCL/features.cl:14
+#ifndef __opencl_c_int64
+#error "Macro __opencl_c_int64 should be defined"
+#endif
----------------
Do you want to add -verify and expected-no-diagnostics directive for this or just change to FileCheck too?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95776/new/
https://reviews.llvm.org/D95776
More information about the cfe-commits
mailing list