Add PathDiagnosticRange to PathDiagnostics. These simply wrap SourceRange and
indicate whether or not the range represents an absolute range or should be
extended by lexing to the end of the token.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69834 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/PathDiagnostic.cpp b/lib/Analysis/PathDiagnostic.cpp
index fa075a3..946548e 100644
--- a/lib/Analysis/PathDiagnostic.cpp
+++ b/lib/Analysis/PathDiagnostic.cpp
@@ -158,12 +158,13 @@
   return FullSourceLoc(R.getBegin(), const_cast<SourceManager&>(*SM));
 }
 
-SourceRange PathDiagnosticLocation::asRange() const {
+PathDiagnosticRange PathDiagnosticLocation::asRange() const {
   assert(isValid());
   // Note that we want a 'switch' here so that the compiler can warn us in
   // case we add more cases.
   switch (K) {
     case SingleLocK:
+      return PathDiagnosticRange(R, true);
     case RangeK:
       break;
     case StmtK: {
@@ -201,7 +202,7 @@
       }
       else {
         SourceLocation L = D->getLocation();
-        return SourceRange(L, L);
+        return PathDiagnosticRange(SourceRange(L, L), true);
       }
   }