diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-04-11 03:52:18 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-04-11 03:52:18 +0000 |
commit | 9793428697f01b139443b7a0a882ea5dd1967e56 (patch) | |
tree | dbe00e05b2a6fe39b676340f71f427fa226bc238 /tools | |
parent | e722ed6f5464232e23be52f4976312ef526fae99 (diff) |
[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
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libclang/CIndex.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index df4c8eda66..67c56a2674 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -2484,27 +2484,6 @@ clang_createTranslationUnitFromSourceFile(CXIndex CIdx, 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 @@ void clang::setThreadBackgroundPriority() { #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() { |