[all-commits] [llvm/llvm-project] af98b0: [clang][dataflow] Add analysis that detects unsafe...

Stanislav Gatev via All-commits all-commits at lists.llvm.org
Thu Mar 10 03:07:35 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: af98b0af6705df3859ee3c98525b57025d40d9e8
      https://github.com/llvm/llvm-project/commit/af98b0af6705df3859ee3c98525b57025d40d9e8
  Author: Stanislav Gatev <sgatev at google.com>
  Date:   2022-03-10 (Thu, 10 Mar 2022)

  Changed paths:
    A clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h
    M clang/lib/Analysis/FlowSensitive/CMakeLists.txt
    A clang/lib/Analysis/FlowSensitive/Models/CMakeLists.txt
    A clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp
    M clang/unittests/Analysis/FlowSensitive/CMakeLists.txt
    A clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp

  Log Message:
  -----------
  [clang][dataflow] Add analysis that detects unsafe accesses to optionals

This commit reverts e0cc28dfdc67105974924cce42bb8c85bd44925a and moves
UncheckedOptionalAccessModelTest.cpp into clang/unittests/Analysis/FlowSensitive,
to avoid build failures. The test will be moved back into a Models subdir
in a follow up patch that will address the build configuration issues.

Original description:

Adds a dataflow analysis that detects unsafe accesses to values of type
`std::optional`, `absl::optional`, or `base::Optional`.

Reviewed-by: ymandel, xazax.hun

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




More information about the All-commits mailing list