[PATCH] D31745: [OpenCL] Added diagnostic for implicit declaration of function in OpenCL

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 6 10:40:56 PDT 2017


Anastasia added inline comments.


================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8254
   "%0 cannot be used as the type of a kernel parameter">;
+def err_opencl_implicit_function_decl : Error<
+  "implicit declaration of function %0 is invalid in OpenCL">;
----------------
Could this be in OpenCL group please?


================
Comment at: test/SemaOpenCL/clang-builtin-version.cl:32
+  work_group_reserve_write_pipe(tmp, tmp); // expected-error{{implicit declaration of function 'work_group_reserve_write_pipe' is invalid in OpenCL}}
+  // expected-note at -1{{did you mean 'work_group_reserve_read_pipe'?}}
+  // expected-note at -2{{'work_group_reserve_write_pipe' declared here}}
----------------
Why do we get this note now? I believe work_group_reserve_read_pipe shouldn't be available either?


https://reviews.llvm.org/D31745





More information about the cfe-commits mailing list