[clang] [clang][analyzer] Add support for detecting uninitialized dynamically-allocated objects (PR #193001)
Arseniy Zaostrovnykh via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 29 07:47:07 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);
----------------
necto wrote:
Unfortunately, I have nothing to contribute here: indeed the code cited by Guillem seems to be the reason to never have UnknownVals for `this`
https://github.com/llvm/llvm-project/pull/193001
More information about the cfe-commits
mailing list