Without this change, the following code does
not generate "warning: Nullable pointer is dereferenced":
void test(void (*_Nullable fn)(void))
{
fn();
}
Paths
| Differential D142742
Generate ImplicitNullDerefEvent from CallAndMessageChecker Needs ReviewPublic Authored by chrisbazley on Jan 27 2023, 8:55 AM.
Details
Summary Without this change, the following code does void test(void (*_Nullable fn)(void)) fn(); }
Diff Detail
Event Timelinechrisbazley added a parent revision: D142741: Fix ProgramState::isNull for non-region symbols.Jan 27 2023, 8:56 AM chrisbazley added a child revision: D142743: Fix nullability checking of top-level functions.Jan 27 2023, 9:04 AM Comment Actions Please refer to https://discourse.llvm.org/t/rfc-optional-a-type-qualifier-to-indicate-pointer-nullability/ and https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3089.pdf for the wider context of this commit.
Revision Contents
Diff 492790 clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
|