aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2008-10-28 05:15:23 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2008-10-28 05:15:23 +0000
commitc540b261ac553b91840146eaa3fee3f11b1013a7 (patch)
tree7ff3be19ade2c8e76259851f2e2826679626a2fd
parent21ec0e4c5db85e45b59cafabca66d640e0ee2dcc (diff)
Add isGlobalsRegion() predicate to MemRegionManager.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58313 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Analysis/PathSensitive/MemRegion.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/clang/Analysis/PathSensitive/MemRegion.h b/include/clang/Analysis/PathSensitive/MemRegion.h
index 82f0e91896..053ad44053 100644
--- a/include/clang/Analysis/PathSensitive/MemRegion.h
+++ b/include/clang/Analysis/PathSensitive/MemRegion.h
@@ -418,6 +418,11 @@ public:
/// getUnknownRegion - Retrieve the memory region associated with unknown
/// memory space.
MemSpaceRegion* getUnknownRegion();
+
+ bool isGlobalsRegion(const MemRegion* R) {
+ assert(R && globals);
+ return R == globals;
+ }
/// getCompoundLiteralRegion - Retrieve the region associated with a
/// given CompoundLiteral.