[clang] [OpenCL] Add warning for reserved 'long long' type (PR #196002)
Wenju He via cfe-commits
cfe-commits at lists.llvm.org
Wed May 6 02:05:30 PDT 2026
================
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 %s -cl-std=CL1.0 -verify -fsyntax-only
+// RUN: %clang_cc1 %s -cl-std=CL1.2 -verify -fsyntax-only
+// RUN: %clang_cc1 %s -cl-std=CL2.0 -verify -fsyntax-only
+// RUN: %clang_cc1 %s -cl-std=CL3.0 -verify -fsyntax-only
+
+void kernel test_longlong() {
+ long long x = 0; // expected-warning{{'long long' is a reserved data type in OpenCL C}}
+ unsigned long long y = 0; // expected-warning{{'long long' is a reserved data type in OpenCL C}}
----------------
wenju-he wrote:
done
https://github.com/llvm/llvm-project/pull/196002
More information about the cfe-commits
mailing list