[PATCH] D16873: Refactor MemRegionManager::getVarRegion to call two new functions, improving readability
Alexander Riccio via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 7 19:08:55 PST 2016
ariccio added a comment.
Bump?
================
Comment at: llvm/tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp:792
@@ -783,12 +791,3 @@
- // Treat other globals as GlobalInternal unless they are constants.
- } else {
- QualType GQT = D->getType();
- const Type *GT = GQT.getTypePtrOrNull();
- // TODO: We could walk the complex types here and see if everything is
- // constified.
- if (GT && GQT.isConstQualified() && GT->isArithmeticType())
- sReg = getGlobalsRegion(MemRegion::GlobalImmutableSpaceRegionKind);
- else
- sReg = getGlobalsRegion();
- }
+const MemRegion* MemRegionManager::getMemRegionStaticLocal(const VarDecl *D, const LocationContext *LC) {
+ // FIXME: Once we implement scope handling, we will need to properly lookup
----------------
ariccio wrote:
> dcoughlin wrote:
> > It looks to me like this function operates on both locals *and* static locals. I would change the name to reflect that.
> So, `getMemRegionStaticLocalOrLocal`?
Bump?
http://reviews.llvm.org/D16873
More information about the cfe-commits
mailing list