[PATCH] D127306: [analyzer] Treat system globals as mutable if they are not const
Balázs Benics via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 9 10:49:18 PDT 2022
steakhal added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Core/MemRegion.cpp:979-980
+ if (Ty.isConstQualified() && Ty->isArithmeticType()) {
// TODO: We could walk the complex types here and see if everything is
// constified.
+ sReg = getGlobalsRegion(MemRegion::GlobalImmutableSpaceRegionKind);
----------------
martong wrote:
> Is this comment still meaningful? I don't think so because if the type is const, then it does not matter what sub-types it has.
Makes sense. However, I'm not sure. Is it the case @xazax.hun?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127306/new/
https://reviews.llvm.org/D127306
More information about the cfe-commits
mailing list