[all-commits] [llvm/llvm-project] b6b31e: [analyzer] Fix uninitialized base class with initi...
Ella Ma via All-commits
all-commits at lists.llvm.org
Wed Nov 1 02:50:15 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b6b31e791b5ada286bace4c48243910985b0ac10
https://github.com/llvm/llvm-project/commit/b6b31e791b5ada286bace4c48243910985b0ac10
Author: Ella Ma <alansnape3058 at gmail.com>
Date: 2023-11-01 (Wed, 01 Nov 2023)
Changed paths:
M clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
A clang/test/Analysis/issue-70464.cpp
Log Message:
-----------
[analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class
Fixes #70464
When ctor is not declared in the base class, initializing the base class
with the initializer list will not trigger a proper assignment of the
base region, as a CXXConstructExpr doing that is not available in the
AST.
This patch checks whether the init expr is an InitListExpr under a base
initializer, and adds a binding if so.
More information about the All-commits
mailing list