[PATCH] D25909: [analyzer] MacOSXApiChecker: Disallow dispatch_once predicates on heap and in ivars.

Artem Dergachev via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 25 11:17:37 PDT 2016


NoQ added inline comments.


================
Comment at: test/Analysis/dispatch-once.m:13
+
+void test_stack() {
+  dispatch_once_t once;
----------------
dcoughlin wrote:
> Should the tests for dispatch_once in unix-fns.c be moved here?
In fact we need to de-duplicate code with unix.API's pthread_once check, which is an exact copy-paste for this checker. Not sure how to achieve that, maybe split both into a single *-once checker (and remove this checker because it becomes empty). Maybe then we'd deal with tests as well.


https://reviews.llvm.org/D25909





More information about the cfe-commits mailing list