- Add class PathDiagosticLocationPair.
- Have PathDiagnosticControlFlowPiece use a vector of PathDiagnosticLocationPairs to represent transitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67786 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/PathDiagnostic.cpp b/lib/Analysis/PathDiagnostic.cpp
index dd9a0a8..02fe165 100644
--- a/lib/Analysis/PathDiagnostic.cpp
+++ b/lib/Analysis/PathDiagnostic.cpp
@@ -147,10 +147,10 @@
     case Range:
       break;
     case Statement:
-      return FullSourceLoc(S->getLocStart(), const_cast<SourceManager&>(SM));
+      return FullSourceLoc(S->getLocStart(), const_cast<SourceManager&>(*SM));
   }
   
-  return FullSourceLoc(R.getBegin(), const_cast<SourceManager&>(SM));
+  return FullSourceLoc(R.getBegin(), const_cast<SourceManager&>(*SM));
 }
 
 SourceRange PathDiagnosticLocation::asRange() const {