From d824372692cd31e44422a2076663f77c1ec02fbc Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 6 Mar 2014 05:37:28 +0000 Subject: [PATCH] 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 --- lib/StaticAnalyzer/Core/BugReporter.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/StaticAnalyzer/Core/BugReporter.cpp b/lib/StaticAnalyzer/Core/BugReporter.cpp index 5f88c5e2b4..c07596f145 100644 --- a/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/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; } //===----------------------------------------------------------------------===// -- 2.40.0