[PATCH] D95442: [OpenCL] Add diagnostics for references to functions

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 26 08:09:27 PST 2021


Anastasia added inline comments.


================
Comment at: clang/test/SemaOpenCLCXX/references.cl:24
+void templ() {
+  // FIXME: We miss to diagnose the reference to function.
+  T loc; //expected-error{{declaration of reference variable 'loc' requires an initializer}}
----------------
I have created PR48887 for this because we also miss other diagnotics.


================
Comment at: clang/test/SemaOpenCLCXX/references.cl:29
+void foo();
+void test(void (&par)()) {
+  void (&loc)();
----------------
oops, I thought this was covered in my patch. I will see if there is a quick fix and if not I will create another PR.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95442/new/

https://reviews.llvm.org/D95442



More information about the cfe-commits mailing list