diff --git a/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp index 3a6ce2a04739..1ba7301ac421 100644 --- a/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp @@ -242,7 +242,7 @@ bool UnreachableCodeChecker::isInvalidPath(const CFGBlock *CB, bool UnreachableCodeChecker::isEmptyCFGBlock(const CFGBlock *CB) { return CB->getLabel() == 0 // No labels && CB->size() == 0 // No statements - && CB->getTerminator() == 0; // No terminator + && !CB->getTerminator(); // No terminator } void ento::registerUnreachableCodeChecker(CheckerManager &mgr) {