[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 20 04:07:40 PDT 2024
================
@@ -461,7 +446,7 @@ ProgramStateRef CStringChecker::checkInit(CheckerContext &C,
if (!ER)
return State;
- const TypedValueRegion *Orig = getOriginRegion(ER);
+ const auto *Orig = ER->getSuperRegion()->getAs<TypedValueRegion>();
----------------
NagyDonat wrote:
Nitpick: also change the name "`Orig`".
https://github.com/llvm/llvm-project/pull/95408
More information about the cfe-commits
mailing list