[PATCH] D142739: Standalone checker for use of _Optional qualifier

Christopher Bazley via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 08:52:52 PST 2023


chrisbazley created this revision.
Herald added subscribers: steakhal, martong.
Herald added a reviewer: NoQ.
Herald added a project: All.
chrisbazley requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142739

Files:
  clang/docs/analyzer/checkers.rst
  clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
  clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt
  clang/lib/StaticAnalyzer/Checkers/OptionalityChecker.cpp
  llvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Checkers/BUILD.gn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142739.492787.patch
Type: text/x-patch
Size: 8801 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230127/200bdeba/attachment.bin>


More information about the llvm-commits mailing list