diff --git a/clang/include/clang/Analysis/PathSensitive/MemRegion.h b/clang/include/clang/Analysis/PathSensitive/MemRegion.h index 82f0e9189602..053ad4405339 100644 --- a/clang/include/clang/Analysis/PathSensitive/MemRegion.h +++ b/clang/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.