From 676b3f0157ceb6584ac9a3f4aae9bfb9420844b2 Mon Sep 17 00:00:00 2001 From: George Karpenkov Date: Mon, 30 Jul 2018 18:57:13 +0000 Subject: [PATCH] [analyzer] Store ValueDecl in DeclRegion All use cases of DeclRegion actually have ValueDecl there, and getting the name from declaration comes in very handy. Differential Revision: https://reviews.llvm.org/D49998 llvm-svn: 338286 --- clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h index f3846eb..9bc79a8 100644 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h @@ -897,9 +897,9 @@ public: class DeclRegion : public TypedValueRegion { protected: - const Decl *D; + const ValueDecl *D; - DeclRegion(const Decl *d, const MemRegion *sReg, Kind k) + DeclRegion(const ValueDecl *d, const MemRegion *sReg, Kind k) : TypedValueRegion(sReg, k), D(d) { assert(classof(this)); assert(d); @@ -909,7 +909,7 @@ protected: const MemRegion* superRegion, Kind k); public: - const Decl *getDecl() const { return D; } + const ValueDecl *getDecl() const { return D; } void Profile(llvm::FoldingSetNodeID& ID) const override; static bool classof(const MemRegion* R) { -- 2.7.4