[all-commits] [llvm/llvm-project] d4fb82: [clang][dataflow] Relax validity assumptions in `U...

Yitzhak Mandelbaum via All-commits all-commits at lists.llvm.org
Wed Feb 1 07:57:55 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d4fb829b718059eb044843aea7b03d5b65556351
      https://github.com/llvm/llvm-project/commit/d4fb829b718059eb044843aea7b03d5b65556351
  Author: Yitzhak Mandelbaum <yitzhakm at google.com>
  Date:   2023-02-01 (Wed, 01 Feb 2023)

  Changed paths:
    M clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp
    M clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp

  Log Message:
  -----------
  [clang][dataflow] Relax validity assumptions in `UncheckedOptionalAccessModel`.

Currently, the interpretation of `swap` calls in the optional model assumes the
optional arguments are modeled (and therefore have valid storage locations and
values). This assumption is incorrect, for example, in the case of unmodeled
optional fields (which can be missing either value or location). This patch
relaxes these assumptions, to return rather than assert when either argument is
not modeled.

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




More information about the All-commits mailing list