Pārlūkot izejas kodu

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 gadi atpakaļ
vecāks
revīzija
d824372692
1 mainītis faili ar 2 papildinājumiem un 4 dzēšanām
  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() &&
     assert(!Location.isValid() &&
      "Either Location or ErrorNode should be specified but not both.");
      "Either Location or ErrorNode should be specified but not both.");
     return PathDiagnosticLocation::createEndOfPath(ErrorNode, SM);
     return PathDiagnosticLocation::createEndOfPath(ErrorNode, SM);
-  } else {
-    assert(Location.isValid());
-    return Location;
   }
   }
 
 
-  return PathDiagnosticLocation();
+  assert(Location.isValid());
+  return Location;
 }
 }
 
 
 //===----------------------------------------------------------------------===//
 //===----------------------------------------------------------------------===//