=?utf-8?q?Balázs_Kéri?= <balazs.k...@ericsson.com> Message-ID: In-Reply-To: <llvm.org/llvm/llvm-project/pull/147...@github.com>
================ @@ -1054,10 +1054,26 @@ const VarRegion *MemRegionManager::getVarRegion(const VarDecl *D, assert(!Ty.isNull()); if (Ty.isConstQualified()) { sReg = getGlobalsRegion(MemRegion::GlobalImmutableSpaceRegionKind); - } else if (Ctx.getSourceManager().isInSystemHeader(D->getLocation())) { - sReg = getGlobalsRegion(MemRegion::GlobalSystemSpaceRegionKind); } else { - sReg = getGlobalsRegion(MemRegion::GlobalInternalSpaceRegionKind); + StringRef N = D->getNameAsString(); ---------------- steakhal wrote: `getNameAsString()` returns a `std::string` prvalue, thus we bind a view to this temporary that gets immediately dangling after the full-expression. https://github.com/llvm/llvm-project/pull/147766 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits