[PATCH] D16873: Refactor MemRegionManager::getVarRegion to call two new functions, improving readability
Aleksei Sidorin via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 8 01:37:44 PST 2016
a.sidorin added inline comments.
================
Comment at: llvm/tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp:792
@@ +791,3 @@
+
+const MemRegion* MemRegionManager::getMemSpaceForLocalVariable(const VarDecl *D, llvm::PointerUnion<const StackFrameContext *, const VarRegion *> &V) {
+ const StackFrameContext *STC = V.get<const StackFrameContext*>();
----------------
That needs to be formatted. Also, you may pass `const StackFrameContext *` instead of `PointerUnion` (as Devin pointed) because it is only used once to get SFC.
And I still think that making these function return `const MemSpaceRegion *` is a good idea.
http://reviews.llvm.org/D16873
More information about the cfe-commits
mailing list