[all-commits] [llvm/llvm-project] 762cb1: [clang][dataflow] Create `Value`s for integer lite...

martinboehme via All-commits all-commits at lists.llvm.org
Mon Jun 19 01:37:59 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 762cb1d377362daff234ac5172c2c1db4918f6d3
      https://github.com/llvm/llvm-project/commit/762cb1d377362daff234ac5172c2c1db4918f6d3
  Author: Martin Braenne <mboehme at google.com>
  Date:   2023-06-19 (Mon, 19 Jun 2023)

  Changed paths:
    M clang/include/clang/Analysis/FlowSensitive/Arena.h
    M clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
    M clang/lib/Analysis/FlowSensitive/Arena.cpp
    M clang/lib/Analysis/FlowSensitive/Transfer.cpp
    M clang/unittests/Analysis/FlowSensitive/TransferTest.cpp

  Log Message:
  -----------
  [clang][dataflow] Create `Value`s for integer literals.

This patch includes a test that fails without the fix.

I discovered that we weren't creating `Value`s for integer literals when, in a
different patch, I tried to overwrite the value of a struct field with a literal
for the purposes of a test and was surprised to find that the struct compared
the same before and after the assignment.

This functionality therefore seems useful at least for tests, but is probably
also useful for actual analysis of code.

Reviewed By: ymandel, xazax.hun, gribozavr2

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




More information about the All-commits mailing list