Browse Source

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 years ago
parent
commit
d824372692
1 changed files with 2 additions and 4 deletions
  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;
 }
 
 //===----------------------------------------------------------------------===//