As documentation in https://developer.apple.com/reference/dispatch/dispatch_once_t says, only global or static variables should have type dispatch_once_t, otherwise the magic with fast memory barriers doesn't work, and using dispatch_once() would cause hard-to-catch errors.
There's already a check in MacOSXApiChecker that disallows stack variables here. The check is extended to warn upon heap and ivar predicates of type dispatch_once_t.
While ivars could have been handled on the AST level, heap variables could not.
Currently the analyzer core does not realize that all Objective-C objects always reside on the heap. I thought of stating that, say, any SymbolRegionValue of ObjCObjectPointerType type should produce a heap-based symbolic region. However, if i do this, it would no longer be true that different heap-based symbolic regions never alias. So a more complicated solution is necessary here. So for this checker i'm settling on the solution of "treat all ivars as heap regions in this checker".