r338286 - [analyzer] Store ValueDecl in DeclRegion
George Karpenkov via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 30 11:57:13 PDT 2018
Author: george.karpenkov
Date: Mon Jul 30 11:57:13 2018
New Revision: 338286
URL: http://llvm.org/viewvc/llvm-project?rev=338286&view=rev
Log:
[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
Modified:
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h?rev=338286&r1=338285&r2=338286&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h Mon Jul 30 11:57:13 2018
@@ -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) {
More information about the cfe-commits
mailing list