diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
| commit | 9f4dbff6669c8037f3b036bcf580d14f1a4f12a5 (patch) | |
| tree | 47df2c12b57214af6c31e47404b005675b8b7ffc /lib/StaticAnalyzer/Core/Environment.cpp | |
| parent | f73d5f23a889b93d89ddef61ac0995df40286bb8 (diff) | |
Notes
Diffstat (limited to 'lib/StaticAnalyzer/Core/Environment.cpp')
| -rw-r--r-- | lib/StaticAnalyzer/Core/Environment.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/StaticAnalyzer/Core/Environment.cpp b/lib/StaticAnalyzer/Core/Environment.cpp index 7b133f6bf645..ae5a4cc8b4aa 100644 --- a/lib/StaticAnalyzer/Core/Environment.cpp +++ b/lib/StaticAnalyzer/Core/Environment.cpp @@ -54,7 +54,8 @@ static const Stmt *ignoreTransparentExprs(const Stmt *S) { EnvironmentEntry::EnvironmentEntry(const Stmt *S, const LocationContext *L) : std::pair<const Stmt *, const StackFrameContext *>(ignoreTransparentExprs(S), - L ? L->getCurrentStackFrame() : 0) {} + L ? L->getCurrentStackFrame() + : nullptr) {} SVal Environment::lookupExpr(const EnvironmentEntry &E) const { const SVal* X = ExprBindings.lookup(E); @@ -123,11 +124,11 @@ class MarkLiveCallback : public SymbolVisitor { SymbolReaper &SymReaper; public: MarkLiveCallback(SymbolReaper &symreaper) : SymReaper(symreaper) {} - bool VisitSymbol(SymbolRef sym) { + bool VisitSymbol(SymbolRef sym) override { SymReaper.markLive(sym); return true; } - bool VisitMemRegion(const MemRegion *R) { + bool VisitMemRegion(const MemRegion *R) override { SymReaper.markLive(R); return true; } @@ -204,11 +205,12 @@ void Environment::print(raw_ostream &Out, const char *NL, } const Stmt *S = En.getStmt(); - + assert(S != nullptr && "Expected non-null Stmt"); + Out << " (" << (const void*) En.getLocationContext() << ',' << (const void*) S << ") "; LangOptions LO; // FIXME. - S->printPretty(Out, 0, PrintingPolicy(LO)); + S->printPretty(Out, nullptr, PrintingPolicy(LO)); Out << " : " << I.getData(); } } |
