[all-commits] [llvm/llvm-project] 469374: [clang][dataflow] Disallow setting properties on `...

martinboehme via All-commits all-commits at lists.llvm.org
Thu Dec 21 00:21:37 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 469374e5c4ba7c75327096a4db6b8ee92065c378
      https://github.com/llvm/llvm-project/commit/469374e5c4ba7c75327096a4db6b8ee92065c378
  Author: martinboehme <mboehme at google.com>
  Date:   2023-12-21 (Thu, 21 Dec 2023)

  Changed paths:
    M clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
    M clang/include/clang/Analysis/FlowSensitive/RecordOps.h
    M clang/include/clang/Analysis/FlowSensitive/Value.h
    M clang/lib/Analysis/FlowSensitive/RecordOps.cpp
    M clang/unittests/Analysis/FlowSensitive/RecordOpsTest.cpp
    M clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp

  Log Message:
  -----------
  [clang][dataflow] Disallow setting properties on `RecordValue`s. (#76042)

Instead, synthetic fields should now be used for the same purpose. These
have a
number of advantages, as described in
https://github.com/llvm/llvm-project/pull/73860, and longer-term, we
want to
eliminate `RecordValue` entirely.

As `RecordValue`s cannot have properties any more, I have replaced the
`OptionalIntAnalysis` with an equivalent analysis that tracks nullness
of
pointers (instead of whether an optional has a value). This serves the
same
purpose, namely to check whether the framework applies a custom
`merge()`
operation to widen properties.




More information about the All-commits mailing list