[all-commits] [llvm/llvm-project] d1522d: [-Wcompletion-handler] Support checks with builtins
Valeriy Savchenko via All-commits
all-commits at lists.llvm.org
Tue Feb 9 00:36:01 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d1522d349f4d4b960ff7a37303103e95aa535af3
https://github.com/llvm/llvm-project/commit/d1522d349f4d4b960ff7a37303103e95aa535af3
Author: Valeriy Savchenko <vsavchenko at apple.com>
Date: 2021-02-09 (Tue, 09 Feb 2021)
Changed paths:
M clang/lib/Analysis/CalledOnceCheck.cpp
M clang/test/SemaObjC/warn-called-once.m
Log Message:
-----------
[-Wcompletion-handler] Support checks with builtins
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 Revision: https://reviews.llvm.org/D96268
More information about the All-commits
mailing list