Skip to content

Commit 7df0786

Browse files
committed
[Refactoring] Support Obj-C style bool flag checks
Add an additional case to `CallbackCondition` to support boolean checks, and add the necessary classification logic to determine whether a bool flag check is for a success or failure path. The logic currently first checks to see if the async alternative has a convention that specifies which parameter the flag is, and whether it's a success or failure flag. If so, it classifies the flag check accordingly. If there's no async convention specified, we use a heuristic to see if the error parameter is force unwrapped in the failure block. If so, we treat that as the error path. If there's no force unwrap of the error, we leave the condition unhandled. rdar://74063899
1 parent f33deef commit 7df0786

File tree

4 files changed

+738
-47
lines changed

4 files changed

+738
-47
lines changed

0 commit comments

Comments
 (0)