Audit all callers of SourceManager::getBufferData(); fix the one that
needs better error recovery.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98667 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp
index 663b32f..db27ffe 100644
--- a/tools/CIndex/CIndex.cpp
+++ b/tools/CIndex/CIndex.cpp
@@ -2101,6 +2101,8 @@
   bool Invalid = false;
   llvm::StringRef Buffer
     = SourceMgr.getBufferData(BeginLocInfo.first, &Invalid);
+  if (Invalid)
+    return;
   
   Lexer Lex(SourceMgr.getLocForStartOfFile(BeginLocInfo.first),
             CXXUnit->getASTContext().getLangOptions(),