[all-commits] [llvm/llvm-project] f13050: [analyzer][NFCi] Annotate major nonnull returning ...

Balazs Benics via All-commits all-commits at lists.llvm.org
Fri May 27 02:06:58 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f13050eca3564ebccc04ea39eb34a312f063c4e9
      https://github.com/llvm/llvm-project/commit/f13050eca3564ebccc04ea39eb34a312f063c4e9
  Author: Balazs Benics <balazs.benics at sigmatechnology.se>
  Date:   2022-05-27 (Fri, 27 May 2022)

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

  Log Message:
  -----------
  [analyzer][NFCi] Annotate major nonnull returning functions

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.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D126198




More information about the All-commits mailing list