]> granicus.if.org Git - clang/commitdiff
Get the number of errors reported from the diagnostic client, in clang_parseTranslati...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 18 Nov 2010 21:47:04 +0000 (21:47 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 18 Nov 2010 21:47:04 +0000 (21:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119745 91177308-0d34-0410-b5e6-96231b3b80d8

tools/libclang/CIndex.cpp

index 0080760189cbdb3cd3bbfa065e2387e6cf7b6add..9137172daf88e12663545b6b685b2231b7265fdf 100644 (file)
@@ -2219,7 +2219,7 @@ static void clang_parseTranslationUnit_Impl(void *UserData) {
     Args.push_back("-detailed-preprocessing-record");
   }
   
-  unsigned NumErrors = Diags->getNumErrors();
+  unsigned NumErrors = Diags->getClient()->getNumErrors();
   llvm::OwningPtr<ASTUnit> Unit(
     ASTUnit::LoadFromCommandLine(Args.data(), Args.data() + Args.size(),
                                  Diags,
@@ -2234,7 +2234,7 @@ static void clang_parseTranslationUnit_Impl(void *UserData) {
                                  CXXPrecompilePreamble,
                                  CXXChainedPCH));
 
-  if (NumErrors != Diags->getNumErrors()) {
+  if (NumErrors != Diags->getClient()->getNumErrors()) {
     // Make sure to check that 'Unit' is non-NULL.
     if (CXXIdx->getDisplayDiagnostics() && Unit.get()) {
       for (ASTUnit::stored_diag_iterator D = Unit->stored_diag_begin(),