[PATCH] D47229: Make atomic non-member functions as nonnull

2018-05-25 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. Fixed by r333290. Repository: rL LLVM https://reviews.llvm.org/D47229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47229: Make atomic non-member functions as nonnull

2018-05-25 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In https://reviews.llvm.org/D47229#1112549, @jakehehrlich wrote: > This is causing breaks in fuchsia, > > Code that looks like this > > uintptr_t last_unlogged = >atomic_load_explicit(_tail, memory_order_acquire); >do { >if (last_unlogged == 0) >

[PATCH] D47229: Make atomic non-member functions as nonnull

2018-05-25 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. This is causing breaks in fuchsia, Code that looks like this uintptr_t last_unlogged = atomic_load_explicit(_tail, memory_order_acquire); do { if (last_unlogged == 0) return; } while (!atomic_compare_exchange_weak_explicit(_tail,

[PATCH] D47229: Make atomic non-member functions as nonnull

2018-05-24 Thread JF Bastien via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333246: Make atomic non-member functions as nonnull (authored by jfb, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47229 Files:

[PATCH] D47229: Make atomic non-member functions as nonnull

2018-05-24 Thread JF Bastien via Phabricator via cfe-commits
jfb added inline comments. Comment at: lib/Sema/SemaChecking.cpp:3497 +else if (Form == Copy || Form == Xchg) { + if (!IsC11 && !IsN) +// The value pointer is always dereferenced, a nullptr is undefined. rsmith wrote: > arphaman

[PATCH] D47229: Make atomic non-member functions as nonnull

2018-05-24 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 148504. jfb marked an inline comment as done. jfb added a comment. - Address nit. - Change suggested by Richard Repository: rC Clang https://reviews.llvm.org/D47229 Files: lib/Sema/SemaChecking.cpp test/Sema/atomic-ops.c Index: test/Sema/atomic-ops.c

[PATCH] D47229: Make atomic non-member functions as nonnull

2018-05-24 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Either the previous version of this patch or a version with a `bool` factored out seem OK to me. Comment at: lib/Sema/SemaChecking.cpp:3497 +else if (Form == Copy

[PATCH] D47229: Make atomic non-member functions as nonnull

2018-05-24 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. Addressed nit. Repository: rC Clang https://reviews.llvm.org/D47229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47229: Make atomic non-member functions as nonnull

2018-05-24 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 148458. jfb marked an inline comment as done. jfb added a comment. - Address nit. Repository: rC Clang https://reviews.llvm.org/D47229 Files: lib/Sema/SemaChecking.cpp test/Sema/atomic-ops.c Index: test/Sema/atomic-ops.c

[PATCH] D47229: Make atomic non-member functions as nonnull

2018-05-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:3497 +else if (Form == Copy || Form == Xchg) { + if (!IsC11 && !IsN) +// The value pointer is always dereferenced, a nullptr is undefined. Nit: might make more

[PATCH] D47229: Make atomic non-member functions as nonnull

2018-05-22 Thread JF Bastien via Phabricator via cfe-commits
jfb created this revision. jfb added a reviewer: arphaman. Herald added subscribers: cfe-commits, aheejin. As a companion to libc++ patch https://reviews.llvm.org/D47225, mark builtin atomic non-member functions which accept pointers as nonnull. The atomic non-member functions accept pointers