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

2021-02-02 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5bbf39704c2b: [OpenCL] Add diagnostics for references to functions (authored by Anastasia). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

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

2021-01-27 Thread Marco Antognini via Phabricator via cfe-commits
mantognini accepted this revision. mantognini added a comment. This revision is now accepted and ready to land. Right, thanks for the explanations. They make sense. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95442/new/ https://reviews.llvm.org/D95442

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

2021-01-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/SemaOpenCLCXX/members.cl:17 - -template struct remove_reference { typedef T type; }; -template struct remove_reference { typedef T type; }; mantognini wrote: > I wonder, do we lose coverage by removing the

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

2021-01-27 Thread Marco Antognini via Phabricator via cfe-commits
mantognini added a comment. Looks sensible to me. Comment at: clang/test/SemaOpenCLCXX/members.cl:17 - -template struct remove_reference { typedef T type; }; -template struct remove_reference { typedef T type; }; I wonder, do we lose coverage by removing thes

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

2021-01-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/SemaOpenCLCXX/references.cl:29 +void foo(); +void test(void (&par)()) { + void (&loc)(); Anastasia wrote: > oops, I thought this was covered in my patch. I will see if there is a quick > fix and if not I w

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

2021-01-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 319369. Anastasia added a comment. Improved diagnostics to cover more cases. NOTE that this now also contains similar improvements for the pointers to member functions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95442/new/ https://reviews.llv

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

2021-01-26 Thread Anastasia Stulova via Phabricator via cfe-commits
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 hav

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

2021-01-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: mantognini. Herald added subscribers: ebevhan, yaxunl. Anastasia requested review of this revision. References to functions are less permissive than pointers to functions and therefore some use cases could be allowed for example: - For