瀏覽代碼

Fixing a compile error that recently started happening for me in MSVC 2013. CFGTerminator has an explicit conversion to bool operator that we can make use of instead of using == 0.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198175 91177308-0d34-0410-b5e6-96231b3b80d8
Aaron Ballman 11 年之前
父節點
當前提交
aa5066bc4b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp

+ 1 - 1
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) {