瀏覽代碼

Remove dead return in BugReporter (found via -Wunreachable-code).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203077 91177308-0d34-0410-b5e6-96231b3b80d8
Ted Kremenek 11 年之前
父節點
當前提交
d824372692
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      lib/StaticAnalyzer/Core/BugReporter.cpp

+ 2 - 4
lib/StaticAnalyzer/Core/BugReporter.cpp

@@ -2742,12 +2742,10 @@ PathDiagnosticLocation BugReport::getLocation(const SourceManager &SM) const {
     assert(!Location.isValid() &&
      "Either Location or ErrorNode should be specified but not both.");
     return PathDiagnosticLocation::createEndOfPath(ErrorNode, SM);
-  } else {
-    assert(Location.isValid());
-    return Location;
   }
 
-  return PathDiagnosticLocation();
+  assert(Location.isValid());
+  return Location;
 }
 
 //===----------------------------------------------------------------------===//