[PATCH] D96268: [-Wcompletion-handler] Support checks with builtins
Valeriy Savchenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 8 07:53:29 PST 2021
vsavchenko created this revision.
vsavchenko added a reviewer: NoQ.
Herald added a subscriber: Charusso.
vsavchenko requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
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
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D96268
Files:
clang/lib/Analysis/CalledOnceCheck.cpp
clang/test/SemaObjC/warn-called-once.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96268.322111.patch
Type: text/x-patch
Size: 3615 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210208/5b1967d2/attachment.bin>
More information about the cfe-commits
mailing list