[PATCH] D73360: [OpenCL] Restrict address space conversions in nested pointers

2020-02-07 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6064f426a183: [OpenCL] Restrict addr space conversions in nested pointers (authored by Anastasia). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D73360?vs=242312&id=24

[PATCH] D73360: [OpenCL] Restrict address space conversions in nested pointers

2020-02-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D73360#1857073 , @rjmccall wrote: > Okay, we can go with this for now, since it does fix a bug. Thanks! Btw I uploaded straw-man patch for improving the diagnostics: https://reviews.llvm.org/D74116. CHANGES SINCE LAST ACT

[PATCH] D73360: [OpenCL] Restrict address space conversions in nested pointers

2020-02-04 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Okay, we can go with this for now, since it does fix a bug. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73360/new/ https://reviews.llvm.org/D73360 ___

[PATCH] D73360: [OpenCL] Restrict address space conversions in nested pointers

2020-02-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 242312. Anastasia added a comment. Add warning into `IncompatiblePointerTypesDiscardsQualifiers` group. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73360/new/ https://reviews.llvm.org/D73360 Files: clang/include/clang/Basic/DiagnosticSemaKind

[PATCH] D73360: [OpenCL] Restrict address space conversions in nested pointers

2020-02-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D73360#1852147 , @rjmccall wrote: > If it's reasonable to persist the failure kind, that would probably be good, > but it might be a lot of work. I have looked at it earlier and it indeed affects a lot of Sema in C++ mode.

[PATCH] D73360: [OpenCL] Restrict address space conversions in nested pointers

2020-01-31 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. If it's reasonable to persist the failure kind, that would probably be good, but it might be a lot of work. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73360/new/ https://reviews.llvm.org/D73360 ___ cfe-commits

[PATCH] D73360: [OpenCL] Restrict address space conversions in nested pointers

2020-01-31 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D73360#1850001 , @rjmccall wrote: > Is there no follow-up code when actually emitting the failure diagnostic > which tries to figure out a more specific cause of failure? After looking at this a bit more it seems C++ part c

[PATCH] D73360: [OpenCL] Restrict address space conversions in nested pointers

2020-01-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Is there no follow-up code when actually emitting the failure diagnostic which tries to figure out a more specific cause of failure? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73360/new/ https://reviews.llvm.org/D73360 ___

[PATCH] D73360: [OpenCL] Restrict address space conversions in nested pointers

2020-01-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: clang/test/SemaOpenCL/address-spaces-conversions-cl2.0.cl:521 +#else +// expected-error@-5 {{assigning to '__generic int *__generic *' from incompatible type '__local int *__local *__private

[PATCH] D73360: [OpenCL] Restrict address space conversions in nested pointers

2020-01-29 Thread Jeroen Dobbelaere via Phabricator via cfe-commits
jeroen.dobbelaere accepted this revision. jeroen.dobbelaere added a comment. This patch looks good to me. I do agree with John that it would be good to add the warning to a warning group. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73360/new/ https://reviews.llvm.org/D73360 _

[PATCH] D73360: [OpenCL] Restrict address space conversions in nested pointers

2020-01-28 Thread John McCall via Phabricator via cfe-commits
rjmccall requested changes to this revision. rjmccall added inline comments. This revision now requires changes to proceed. Comment at: clang/test/Misc/warning-flags.c:41 CHECK-NEXT: warn_asm_label_on_auto_decl +CHECK-NEXT: warn_bad_cxx_cast_nested_pointer_addr_space CHECK-

[PATCH] D73360: [OpenCL] Restrict address space conversions in nested pointers

2020-01-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, jeroen.dobbelaere, bevinh. Herald added subscribers: ebevhan, yaxunl. This patch is fixing the issue reported in: http://lists.llvm.org/pipermail/cfe-dev/2020-January/064273.html and in the bug: https://bugs.llvm.org/show_bug.cg