[libclang] Create a diagnostic set to pass at the end of indexing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145557 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/CIndexDiagnostic.cpp b/tools/libclang/CIndexDiagnostic.cpp
index de0e8d4..a29e3a6 100644
--- a/tools/libclang/CIndexDiagnostic.cpp
+++ b/tools/libclang/CIndexDiagnostic.cpp
@@ -26,6 +26,7 @@
 using namespace clang;
 using namespace clang::cxloc;
 using namespace clang::cxstring;
+using namespace clang::cxdiag;
 using namespace llvm;
 
 
@@ -39,8 +40,8 @@
 
 CXDiagnosticImpl::~CXDiagnosticImpl() {}
 
-static CXDiagnosticSetImpl *lazyCreateDiags(CXTranslationUnit TU,
-                                            bool checkIfChanged = false) {
+CXDiagnosticSetImpl *cxdiag::lazyCreateDiags(CXTranslationUnit TU,
+                                             bool checkIfChanged) {
   ASTUnit *AU = static_cast<ASTUnit *>(TU->TUData);
 
   if (TU->Diagnostics && checkIfChanged) {