summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-05-27 02:45:47 +0000
committerCraig Topper <craig.topper@gmail.com>2014-05-27 02:45:47 +0000
commit0dbb783c7be1756482c491b3635dd07dd5fe712c (patch)
tree477bfcd6d42f6152fccaed23f0f20730b629da2a /clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
parent7b15cf888453aa9d0828b6121f7bd05138f8fe0a (diff)
downloadbcm5719-llvm-0dbb783c7be1756482c491b3635dd07dd5fe712c.tar.gz
bcm5719-llvm-0dbb783c7be1756482c491b3635dd07dd5fe712c.zip
[C++11] Use 'nullptr'. StaticAnalyzer edition.
llvm-svn: 209642
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
index 66c1acd9a86..d78de3c6f3a 100644
--- a/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
@@ -58,10 +58,10 @@ void UnreachableCodeChecker::checkEndAnalysis(ExplodedGraph &G,
if (Eng.hasWorkRemaining())
return;
- const Decl *D = 0;
- CFG *C = 0;
- ParentMap *PM = 0;
- const LocationContext *LC = 0;
+ const Decl *D = nullptr;
+ CFG *C = nullptr;
+ ParentMap *PM = nullptr;
+ const LocationContext *LC = nullptr;
// Iterate over ExplodedGraph
for (ExplodedGraph::node_iterator I = G.nodes_begin(), E = G.nodes_end();
I != E; ++I) {
@@ -201,7 +201,7 @@ const Stmt *UnreachableCodeChecker::getUnreachableStmt(const CFGBlock *CB) {
if (const Stmt *S = CB->getTerminator())
return S;
else
- return 0;
+ return nullptr;
}
// Determines if the path to this CFGBlock contained an element that infers this
@@ -245,7 +245,7 @@ bool UnreachableCodeChecker::isInvalidPath(const CFGBlock *CB,
// Returns true if the given CFGBlock is empty
bool UnreachableCodeChecker::isEmptyCFGBlock(const CFGBlock *CB) {
- return CB->getLabel() == 0 // No labels
+ return CB->getLabel() == nullptr // No labels
&& CB->size() == 0 // No statements
&& !CB->getTerminator(); // No terminator
}
OpenPOWER on IntegriCloud