[all-commits] [llvm/llvm-project] e3e908: [analyzer] Fix for incorrect handling of 0 length ...

isuckatcs via All-commits all-commits at lists.llvm.org
Thu Aug 25 03:42:25 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e3e9082b013ba948e3df6d4a2536df9d04656e76
      https://github.com/llvm/llvm-project/commit/e3e9082b013ba948e3df6d4a2536df9d04656e76
  Author: isuckatcs <65320245+isuckatcs at users.noreply.github.com>
  Date:   2022-08-25 (Thu, 25 Aug 2022)

  Changed paths:
    M clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
    M clang/lib/StaticAnalyzer/Core/RegionStore.cpp
    M clang/test/Analysis/array-init-loop.cpp
    M clang/test/Analysis/dtor-array.cpp
    A clang/test/Analysis/flexible-array-member.cpp
    A clang/test/Analysis/zero-size-non-pod-array.cpp

  Log Message:
  -----------
  [analyzer] Fix for incorrect handling of 0 length non-POD array construction

Prior to this patch when the analyzer encountered a non-POD 0 length array,
it still invoked the constructor for 1 element, which lead to false positives.
This patch makes sure that we no longer construct any elements when we see a
0 length array.

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




More information about the All-commits mailing list