]> granicus.if.org Git - clang/commit
Follow-up fix for nonnull atomic non-member functions
authorJF Bastien <jfbastien@apple.com>
Fri, 25 May 2018 17:36:49 +0000 (17:36 +0000)
committerJF Bastien <jfbastien@apple.com>
Fri, 25 May 2018 17:36:49 +0000 (17:36 +0000)
commit4da5751b786136b1e400bc87356a800ebca4715b
tree85a77faab2f3db44c278c05a2a0654b0e40179ab
parent8def6e83038b43b798a935edab9d77476ec47372
Follow-up fix for nonnull atomic non-member functions

Handling of the third parameter was only checking for *_n and not for the C11 variant, which means that cmpxchg of a 'desired' 0 value was erroneously warning. Handle C11 properly, and add extgensive tests for this as well as NULL pointers in a bunch of places.

Fixes r333246 from D47229.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@333290 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaChecking.cpp
test/Sema/atomic-ops.c