[PATCH] D16873: Refactor MemRegionManager::getVarRegion to call two new functions, improving readability

Aleksei Sidorin via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 5 01:17:20 PST 2016


a.sidorin added inline comments.

================
Comment at: llvm/tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp:800
@@ -803,1 +799,3 @@
+  if (V.is<const VarRegion*>())
+    return V.get<const VarRegion*>();
 
----------------
Oops.
Lines above should stay in the caller function or be refactored. Otherwise, we'll get the subregion of `V.get<const VarRegion *` instead of returning it directly. This looks like a behaviour change. (And this is the only place where return type is not a `const MemSpaceRegion *`, btw).
This issue may also obsolete my comments about return type.


http://reviews.llvm.org/D16873





More information about the cfe-commits mailing list