It is very common to check callbacks and completion handlers for null.
This patch supports such checks using built-in functions:
- __builtin_expect
- __builtin_expect_with_probablity
- __builtin_unpredictable
rdar://73455388
Differential D96268
[-Wcompletion-handler] Support checks with builtins vsavchenko on Feb 8 2021, 7:53 AM. Authored by
Details
It is very common to check callbacks and completion handlers for null.
rdar://73455388
Diff Detail
Unit Tests Event TimelineComment Actions Aha, yup, makes sense!
|
Otherwise it's a compile error and analysis based warnings aren't run when there are compile errors, right? If it was a normal function call there's no way we would have gotten away with such assertion. Like, even if it was a standard library function the user could still override that. But for builtins I guess that should work.