You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Objective-C: bitwise_ops counts the block caret and address-of (precision 0.01); thread_sleeps misses NSThread sleepForTimeInterval #8907
Objective-C bitwise_ops counts the block caret and address-of, and thread_sleeps misses the Foundation sleep call. Found with an Objective-C oracle on AFNetworking (752 functions matched; args 1.00 / 1.00 and branch 1.00 / 1.00, so the oracle reads functions correctly):
bitwise_ops precision 0.01: ^ as the block literal / block-pointer caret (void (^blk)(void) = ^{ ... };) and & as address-of (int *p = &a;) are read as XOR and AND. The contract counts a bitwise operator "applied between value operands ... in operator position": a block caret is a type and a literal opener, and a unary & is an address, not an operand operation.
thread_sleeps misses [NSThread sleepForTimeInterval:] (and, per the oracle's reading of "a sleep, a timed wait, a timeout-driven deferral", dispatch_after and performSelector:afterDelay:; those are a judgement call, the Foundation sleep is not).
Reproduce (pinned scanner; counts read from function_data)
voidblockCaret(void) { void (^blk)(void) = ^{ int x = 1; }; blk(); } // bitwise_ops == 2, should be 0intaddrOf(int a) { int *p = &a; return *p; } // bitwise_ops == 1, should be 0voidsleeper(void) { [NSThreadsleepForTimeInterval:1.0]; } // state_halt_hits == 0, should be 1
Expected
Anchor ^ and & on binary-operator position between operands (not after (, = or ,, and not before {); add sleepForTimeInterval: to the sleep rule.
The same text-rule shape as #8866 (generics, strings); a class fix for the C-family & and ^ is worth doing once.
Part of #8863. Time the change; rosetta:rebless-owed if counts move; add each case as a test.
Claimed by promoter-bot host melek, lease renewed 2026-11-24T12:53Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove the claim:melek label.
Activity
squid-protocol commentedon Nov 23, 2026
This issue's PR content landed via #9111 (merged as fcc440b). It was a 'Part of' change, so the issue stays open for the remaining work.
squid-protocol commentedon Nov 24, 2026
Claimed by promoter-bot host
melek, lease renewed 2026-11-24T12:53Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove theclaim:meleklabel.Objective-C: end-to-end tests for #8907's three repros (block caret, …