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

Ted Kremenek kremenek at apple.com
Wed Mar 5 21:37:28 PST 2014


Author: kremenek
Date: Wed Mar  5 23:37:28 2014
New Revision: 203077

URL: http://llvm.org/viewvc/llvm-project?rev=203077&view=rev
Log:
Remove dead return in BugReporter (found via -Wunreachable-code).

Modified:
    cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp?rev=203077&r1=203076&r2=203077&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp Wed Mar  5 23:37:28 2014
@@ -2742,12 +2742,10 @@ PathDiagnosticLocation BugReport::getLoc
     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;
 }
 
 //===----------------------------------------------------------------------===//





More information about the cfe-commits mailing list