]> granicus.if.org Git - clang/commit
[analyzer] MacOSXAPIChecker: Disallow dispatch_once_t in ivars and heap.
authorArtem Dergachev <artem.dergachev@gmail.com>
Mon, 31 Oct 2016 17:27:26 +0000 (17:27 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Mon, 31 Oct 2016 17:27:26 +0000 (17:27 +0000)
commitb26779db433d6da679c62826ee3862f55c89c55d
treeb64a01ebe69ee7153dd73c94ed553abee7d42ca1
parent5d3e0abb4188b8fff042ab99b78e88dbc722dc79
[analyzer] MacOSXAPIChecker: Disallow dispatch_once_t in ivars and heap.

Unlike global/static variables, calloc etc. functions that allocate ObjC
objects behave differently in terms of memory barriers, and hacks that make
dispatch_once as fast as it possibly could be start failing.

Differential Revision: https://reviews.llvm.org/D25909

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285605 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp
lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
test/Analysis/dispatch-once.m [new file with mode: 0644]