This is an archive of the discontinued LLVM Phabricator instance.

Standalone checker for use of _Optional qualifier
Needs ReviewPublic

Authored by chrisbazley on Jan 27 2023, 8:52 AM.

Details

Reviewers
NoQ
Summary

This checker tries to find violations in use of
pointers to _Optional objects which cannot be
detected by the type system alone. This requires
detection of null pointer dereferences at the
expression level, rather than at the level of
simulated memory accesses (which is already
implemented by other checkers).

Such expressions include those which implicitly
remove the _Optional qualifier from pointer
targets without actually accessing the pointed-to
object.

Diff Detail