[clang] [clang][analyzer] Add support for detecting uninitialized dynamically-allocated objects (PR #193001)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 22 02:55:19 PDT 2026
================
@@ -451,26 +451,44 @@ static void printTail(llvm::raw_ostream &Out,
// Utility functions.
//===----------------------------------------------------------------------===//
+static const SubRegion *
+getConstructedSubRegion(const CXXConstructorDecl *CtorDecl,
+ CheckerContext &Context) {
+ Loc ThisLoc =
+ Context.getSValBuilder().getCXXThis(CtorDecl, Context.getStackFrame());
+ SVal ObjectV = Context.getState()->getSVal(ThisLoc);
----------------
steakhal wrote:
Can't we call a placement new on the reinterpreted address?
https://github.com/llvm/llvm-project/pull/193001
More information about the cfe-commits
mailing list