* Remove isInSystemHeader() from DiagClient, move it to SourceManager
* Move FormatError() from TextDiagnostic up to DiagClient, remove now  
  empty class TextDiagnostic
* Make DiagClient optional for Diagnostic

This fixes the following problems:

* -html-diags (and probably others) does now output the same set of  
  warnings as console clang does
* nothing crashes if one forgets to call setHeaderSearch() on  
  TextDiagnostic
* some code duplication is removed




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54620 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Basic/SourceLocation.cpp b/lib/Basic/SourceLocation.cpp
index 83c264a..12a4962 100644
--- a/lib/Basic/SourceLocation.cpp
+++ b/lib/Basic/SourceLocation.cpp
@@ -79,6 +79,12 @@
   return SrcMgr->getFileEntryForLoc(Loc);
 }
 
+bool FullSourceLoc::isInSystemHeader() const {
+  assert (isValid());
+  return SrcMgr->isInSystemHeader(Loc);
+}
+
+
 const char * FullSourceLoc::getCharacterData() const {
   assert (isValid());
   return SrcMgr->getCharacterData(Loc);