Teach SourceManager::getPresumedLoc() how to fail gracefully if getLineNumber/getColumnNumber fail

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117990 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/TextDiagnosticPrinter.cpp b/lib/Frontend/TextDiagnosticPrinter.cpp
index 1e453a0..9e450d2 100644
--- a/lib/Frontend/TextDiagnosticPrinter.cpp
+++ b/lib/Frontend/TextDiagnosticPrinter.cpp
@@ -781,7 +781,7 @@
     }
 
     // Compute the column number.
-    if (DiagOpts->ShowLocation) {
+    if (DiagOpts->ShowLocation && PLoc.isValid()) {
       if (DiagOpts->ShowColors)
         OS.changeColor(savedColor, true);