[all-commits] [llvm/llvm-project] c07258: [clang][dataflow] Generalize custom comparison to ...

Yitzhak Mandelbaum via All-commits all-commits at lists.llvm.org
Thu Nov 3 16:31:54 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c0725865b188f71f904ecd4dac56ef37268b30d2
      https://github.com/llvm/llvm-project/commit/c0725865b188f71f904ecd4dac56ef37268b30d2
  Author: Yitzhak Mandelbaum <yitzhakm at google.com>
  Date:   2022-11-03 (Thu, 03 Nov 2022)

  Changed paths:
    M clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
    M clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h
    M clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
    M clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp
    M clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp

  Log Message:
  -----------
  [clang][dataflow] Generalize custom comparison to return tri-value result.

Currently, the API for a model's custom value comparison returns a
boolean. Therefore, models cannot distinguish between situations where the
values are recognized by the model and different and those where the values are
just not recognized.  This patch changes the return value to a tri-valued enum,
allowing models to express "don't know".

This patch is essentially a NFC -- no practical differences result from this
change in this patch. But, it prepares for future patches (particularly,
upcoming patches for widening) which will take advantage of the new flexibility.

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




More information about the All-commits mailing list