[all-commits] [llvm/llvm-project] bc2c75: [analyzer] Fix assertion failure after getKnownVal...

Gabor Marton via All-commits all-commits at lists.llvm.org
Thu Jun 9 07:14:13 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bc2c759aeee7d1560840a24365ce18b8e8b63ded
      https://github.com/llvm/llvm-project/commit/bc2c759aeee7d1560840a24365ce18b8e8b63ded
  Author: Gabor Marton <gabor.marton at ericsson.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
    A clang/test/Analysis/svalbuilder-simplify-no-crash.c

  Log Message:
  -----------
  [analyzer] Fix assertion failure after getKnownValue call

Depends on D126560. `getKnownValue` has been changed by the parent patch
in a way that simplification was removed. This is not correct when the
function is called by the Checkers. Thus, a new internal function is
introduced, `getConstValue`, which simply queries the constraint manager.
This `getConstValue` is used internally in the `SimpleSValBuilder` when a
binop is evaluated, this way we avoid the recursion into the `Simplifier`.

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




More information about the All-commits mailing list