[PATCH] D126198: [analyzer][NFCi] Annotate major nonnull returning functions

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 23 05:18:39 PDT 2022


steakhal created this revision.
steakhal added reviewers: NoQ, martong, Szelethus.
Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun.
Herald added a project: All.
steakhal requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This patch annotates the most important analyzer function APIs.
Also adds a couple of assertions for uncovering any potential issues earlier in the constructor; in those cases, the member functions were already dereferencing the members unconditionally anyway.

Measurements showed no performance impact, nor crashes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126198

Files:
  clang/include/clang/Analysis/AnalysisDeclContext.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicType.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymExpr.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
  clang/lib/StaticAnalyzer/Core/MemRegion.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126198.431341.patch
Type: text/x-patch
Size: 20547 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220523/4d4f5438/attachment-0001.bin>


More information about the cfe-commits mailing list