diff options
Diffstat (limited to 'include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h')
| -rw-r--r-- | include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h index 5d27f8654eb00..873f773b459da 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h @@ -65,12 +65,9 @@ public: virtual void dumpToStream(raw_ostream &os) const {} - virtual QualType getType(ASTContext&) const = 0; + virtual QualType getType() const = 0; virtual void Profile(llvm::FoldingSetNodeID& profile) = 0; - // Implement isa<T> support. - static inline bool classof(const SymExpr*) { return true; } - /// \brief Iterator over symbols that the current symbol depends on. /// /// For SymbolData, it's the symbol itself; for expressions, it's the @@ -144,7 +141,7 @@ public: virtual void dumpToStream(raw_ostream &os) const; - QualType getType(ASTContext&) const; + QualType getType() const; // Implement isa<T> support. static inline bool classof(const SymExpr *SE) { @@ -173,7 +170,7 @@ public: unsigned getCount() const { return Count; } const void *getTag() const { return SymbolTag; } - QualType getType(ASTContext&) const; + QualType getType() const; virtual void dumpToStream(raw_ostream &os) const; @@ -211,7 +208,7 @@ public: SymbolRef getParentSymbol() const { return parentSymbol; } const TypedValueRegion *getRegion() const { return R; } - QualType getType(ASTContext&) const; + QualType getType() const; virtual void dumpToStream(raw_ostream &os) const; @@ -244,7 +241,7 @@ public: const SubRegion *getRegion() const { return R; } - QualType getType(ASTContext&) const; + QualType getType() const; virtual void dumpToStream(raw_ostream &os) const; @@ -283,7 +280,7 @@ public: unsigned getCount() const { return Count; } const void *getTag() const { return Tag; } - QualType getType(ASTContext&) const; + QualType getType() const; virtual void dumpToStream(raw_ostream &os) const; @@ -320,7 +317,7 @@ public: SymbolCast(const SymExpr *In, QualType From, QualType To) : SymExpr(CastSymbolKind), Operand(In), FromTy(From), ToTy(To) { } - QualType getType(ASTContext &C) const { return ToTy; } + QualType getType() const { return ToTy; } const SymExpr *getOperand() const { return Operand; } @@ -358,7 +355,7 @@ public: // FIXME: We probably need to make this out-of-line to avoid redundant // generation of virtual functions. - QualType getType(ASTContext &C) const { return T; } + QualType getType() const { return T; } BinaryOperator::Opcode getOpcode() const { return Op; } @@ -399,7 +396,7 @@ public: const SymExpr *rhs, QualType t) : SymExpr(IntSymKind), LHS(lhs), Op(op), RHS(rhs), T(t) {} - QualType getType(ASTContext &C) const { return T; } + QualType getType() const { return T; } BinaryOperator::Opcode getOpcode() const { return Op; } @@ -446,7 +443,7 @@ public: // FIXME: We probably need to make this out-of-line to avoid redundant // generation of virtual functions. - QualType getType(ASTContext &C) const { return T; } + QualType getType() const { return T; } virtual void dumpToStream(raw_ostream &os) const; @@ -495,18 +492,17 @@ public: /// \brief Make a unique symbol for MemRegion R according to its kind. const SymbolRegionValue* getRegionValueSymbol(const TypedValueRegion* R); - const SymbolConjured* getConjuredSymbol(const Stmt *E, - const LocationContext *LCtx, - QualType T, - unsigned VisitCount, - const void *SymbolTag = 0); + const SymbolConjured* conjureSymbol(const Stmt *E, + const LocationContext *LCtx, + QualType T, + unsigned VisitCount, + const void *SymbolTag = 0); - const SymbolConjured* getConjuredSymbol(const Expr *E, - const LocationContext *LCtx, - unsigned VisitCount, - const void *SymbolTag = 0) { - return getConjuredSymbol(E, LCtx, E->getType(), - VisitCount, SymbolTag); + const SymbolConjured* conjureSymbol(const Expr *E, + const LocationContext *LCtx, + unsigned VisitCount, + const void *SymbolTag = 0) { + return conjureSymbol(E, LCtx, E->getType(), VisitCount, SymbolTag); } const SymbolDerived *getDerivedSymbol(SymbolRef parentSymbol, @@ -541,7 +537,7 @@ public: const SymExpr *rhs, QualType t); QualType getType(const SymExpr *SE) const { - return SE->getType(Ctx); + return SE->getType(); } /// \brief Add artificial symbol dependency. @@ -584,9 +580,11 @@ public: /// /// If the statement is NULL, everything is this and parent contexts is /// considered live. - SymbolReaper(const LocationContext *ctx, const Stmt *s, SymbolManager& symmgr, + /// If the stack frame context is NULL, everything on stack is considered + /// dead. + SymbolReaper(const StackFrameContext *Ctx, const Stmt *s, SymbolManager& symmgr, StoreManager &storeMgr) - : LCtx(ctx->getCurrentStackFrame()), Loc(s), SymMgr(symmgr), + : LCtx(Ctx), Loc(s), SymMgr(symmgr), reapedStore(0, storeMgr) {} ~SymbolReaper() {} |
