[libclang] Fix "error: conflicts with new declaration with ā€˜Cā€™ linkage" that gcc
emits but not clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154475 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index df4c8ed..67c56a2 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -2484,27 +2484,6 @@
                                     Options);
 }
 
-void cxindex::printDiagsToStderr(ASTUnit *Unit) {
-  if (!Unit)
-    return;
-
-  for (ASTUnit::stored_diag_iterator D = Unit->stored_diag_begin(), 
-                                  DEnd = Unit->stored_diag_end();
-       D != DEnd; ++D) {
-    CXStoredDiagnostic Diag(*D, Unit->getASTContext().getLangOpts());
-    CXString Msg = clang_formatDiagnostic(&Diag,
-                                clang_defaultDiagnosticDisplayOptions());
-    fprintf(stderr, "%s\n", clang_getCString(Msg));
-    clang_disposeString(Msg);
-  }
-#ifdef LLVM_ON_WIN32
-  // On Windows, force a flush, since there may be multiple copies of
-  // stderr and stdout in the file system, all with different buffers
-  // but writing to the same device.
-  fflush(stderr);
-#endif
-}
-
 struct ParseTranslationUnitInfo {
   CXIndex CIdx;
   const char *source_filename;
@@ -5831,6 +5810,27 @@
 #endif
 }
 
+void cxindex::printDiagsToStderr(ASTUnit *Unit) {
+  if (!Unit)
+    return;
+
+  for (ASTUnit::stored_diag_iterator D = Unit->stored_diag_begin(), 
+                                  DEnd = Unit->stored_diag_end();
+       D != DEnd; ++D) {
+    CXStoredDiagnostic Diag(*D, Unit->getASTContext().getLangOpts());
+    CXString Msg = clang_formatDiagnostic(&Diag,
+                                clang_defaultDiagnosticDisplayOptions());
+    fprintf(stderr, "%s\n", clang_getCString(Msg));
+    clang_disposeString(Msg);
+  }
+#ifdef LLVM_ON_WIN32
+  // On Windows, force a flush, since there may be multiple copies of
+  // stderr and stdout in the file system, all with different buffers
+  // but writing to the same device.
+  fflush(stderr);
+#endif
+}
+
 extern "C" {
 
 CXString clang_getClangVersion() {