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

Stanislav Gatev via All-commits all-commits at lists.llvm.org
Wed Mar 9 01:46:11 PST 2022


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

  Changed paths:
    A clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h
    A clang/include/clang/Analysis/FlowSensitive/TestingSupport.h
    M clang/lib/Analysis/FlowSensitive/CMakeLists.txt
    A clang/lib/Analysis/FlowSensitive/Models/CMakeLists.txt
    A clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp
    A clang/lib/Analysis/FlowSensitive/TestingSupport.cpp
    M clang/unittests/Analysis/FlowSensitive/CMakeLists.txt
    M clang/unittests/Analysis/FlowSensitive/DataflowEnvironmentTest.cpp
    M clang/unittests/Analysis/FlowSensitive/MatchSwitchTest.cpp
    A clang/unittests/Analysis/FlowSensitive/Models/CMakeLists.txt
    A clang/unittests/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModelTest.cpp
    M clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp
    M clang/unittests/Analysis/FlowSensitive/SingleVarConstantPropagationTest.cpp
    R clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp
    R clang/unittests/Analysis/FlowSensitive/TestingSupport.h
    M clang/unittests/Analysis/FlowSensitive/TestingSupportTest.cpp
    M clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
    M clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp

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

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