[all-commits] [llvm/llvm-project] cda28e: [analyzer] Support parenthesized list initializati...

Oleksandr T. via All-commits all-commits at lists.llvm.org
Fri Jul 18 00:34:38 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cda28e203d8f396af65cd4e19c62cfaa58480280
      https://github.com/llvm/llvm-project/commit/cda28e203d8f396af65cd4e19c62cfaa58480280
  Author: Oleksandr T. <oleksandr.tarasiuk at outlook.com>
  Date:   2025-07-18 (Fri, 18 Jul 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
    M clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
    M clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
    A clang/test/Analysis/div-zero-cxx20.cpp
    M clang/test/Analysis/div-zero.cpp

  Log Message:
  -----------
  [analyzer] Support parenthesized list initialization (CXXParenListInitExpr) (#148988)

This patch addresses the lack of support for parenthesized
initialization in the Clang Static Analyzer's `ExprEngine`. Previously,
initializations such as `V v(1, 2);` were not modeled properly, which
could lead to false negatives in analyses like `DivideZero`.

```cpp
struct A {
  int x;
  A(int v) : x(v) {}
};

int t() {
  A a(42);
  return 1 / (a.x - 42); // expected-warning {{Division by zero}}
}
```

Fixes #148875



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list