]> granicus.if.org Git - clang/commitdiff
Remove dead return in BugReporter (found via -Wunreachable-code).
authorTed Kremenek <kremenek@apple.com>
Thu, 6 Mar 2014 05:37:28 +0000 (05:37 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 6 Mar 2014 05:37:28 +0000 (05:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203077 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Core/BugReporter.cpp

index 5f88c5e2b46ccb79f25c32a9255900dcaffed8df..c07596f145b681bc539703e41b85bdc8559d955c 100644 (file)
@@ -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;
 }
 
 //===----------------------------------------------------------------------===//