]> granicus.if.org Git - clang/commitdiff
Restructure code to silence bogus GCC warning.
authorTed Kremenek <kremenek@apple.com>
Thu, 26 Mar 2009 21:42:00 +0000 (21:42 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 26 Mar 2009 21:42:00 +0000 (21:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67775 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/PathDiagnostic.cpp

index 940a9e2d984b400ad15375c04e7035d294aaba29..d719aa88b508f24b67a3e899eda245a1c55c9289 100644 (file)
@@ -143,8 +143,10 @@ FullSourceLoc PathDiagnosticLocation::asLocation() const {
   switch (K) {
     case SingleLoc:
     case Range:
-      return FullSourceLoc(R.getBegin(), const_cast<SourceManager&>(SM));
+      break;
     case Statement:
       return FullSourceLoc(S->getLocStart(), const_cast<SourceManager&>(SM));
   }
+  
+  return FullSourceLoc(R.getBegin(), const_cast<SourceManager&>(SM));
 }