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/SymbolManager.cpp | |
| parent | f73d5f23a889b93d89ddef61ac0995df40286bb8 (diff) | |
Notes
Diffstat (limited to 'lib/StaticAnalyzer/Core/SymbolManager.cpp')
| -rw-r--r-- | lib/StaticAnalyzer/Core/SymbolManager.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/StaticAnalyzer/Core/SymbolManager.cpp b/lib/StaticAnalyzer/Core/SymbolManager.cpp index 1b56f82dc60f..cca0461a4748 100644 --- a/lib/StaticAnalyzer/Core/SymbolManager.cpp +++ b/lib/StaticAnalyzer/Core/SymbolManager.cpp @@ -326,11 +326,7 @@ QualType SymbolRegionValue::getType() const { } SymbolManager::~SymbolManager() { - for (SymbolDependTy::const_iterator I = SymbolDependencies.begin(), - E = SymbolDependencies.end(); I != E; ++I) { - delete I->second; - } - + llvm::DeleteContainerSeconds(SymbolDependencies); } bool SymbolManager::canSymbolicate(QualType T) { @@ -351,7 +347,7 @@ bool SymbolManager::canSymbolicate(QualType T) { void SymbolManager::addSymbolDependency(const SymbolRef Primary, const SymbolRef Dependent) { SymbolDependTy::iterator I = SymbolDependencies.find(Primary); - SymbolRefSmallVectorTy *dependencies = 0; + SymbolRefSmallVectorTy *dependencies = nullptr; if (I == SymbolDependencies.end()) { dependencies = new SymbolRefSmallVectorTy(); SymbolDependencies[Primary] = dependencies; @@ -365,7 +361,7 @@ const SymbolRefSmallVectorTy *SymbolManager::getDependentSymbols( const SymbolRef Primary) { SymbolDependTy::const_iterator I = SymbolDependencies.find(Primary); if (I == SymbolDependencies.end()) - return 0; + return nullptr; return I->second; } @@ -491,7 +487,7 @@ bool SymbolReaper::isLive(SymbolRef sym) { bool SymbolReaper::isLive(const Stmt *ExprVal, const LocationContext *ELCtx) const { - if (LCtx == 0) + if (LCtx == nullptr) return false; if (LCtx != ELCtx) { |
