data: stop indexing of files with fatal errors and store them as incomplete (issue 358)
* avoid AST traversial for CXX translation units with fatal errors * save all files within those translation units as incomplete * show number of complete files in finished indexing dialog and overview stats * display incomplete files hatched in graph view * display incomplete file titles hatched in code view * mention file incompleteness in tooltips * removed derived Indexer classes and set ParserType via template parameter instead * moved getSourceFileFromCDB from IndexerCxxCdb to IndexerCommandCxxCdb bug id = 358
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "data/parser/cxx/CxxAstVisitorComponentImplicitCode.h"
|
||||
#include "data/parser/cxx/CxxAstVisitorComponentIndexer.h"
|
||||
#include "data/parser/cxx/utilityCxxAstVisitor.h"
|
||||
#include "data/parser/ParserClient.h"
|
||||
|
||||
#include "data/parser/ParseLocation.h"
|
||||
|
||||
@@ -282,6 +283,11 @@ bool CxxAstVisitor::TraverseTemplateTemplateParmDecl(clang::TemplateTemplateParm
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CxxAstVisitor::VisitTranslationUnitDecl(clang::TranslationUnitDecl *d)
|
||||
{
|
||||
return !m_client->hasFatalErrors();
|
||||
}
|
||||
|
||||
bool CxxAstVisitor::TraverseNestedNameSpecifierLoc(clang::NestedNameSpecifierLoc loc)
|
||||
{
|
||||
bool ret = true;
|
||||
|
||||
@@ -117,6 +117,7 @@ public:
|
||||
virtual bool VisitNonTypeTemplateParmDecl(clang::NonTypeTemplateParmDecl* d);
|
||||
virtual bool VisitTemplateTypeParmDecl(clang::TemplateTypeParmDecl* d);
|
||||
virtual bool VisitTemplateTemplateParmDecl(clang::TemplateTemplateParmDecl* d);
|
||||
virtual bool VisitTranslationUnitDecl(clang::TranslationUnitDecl *d);
|
||||
|
||||
virtual bool VisitTypeLoc(clang::TypeLoc tl);
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ void CxxDiagnosticConsumer::HandleDiagnostic(clang::DiagnosticsEngine::Level lev
|
||||
|
||||
ParseLocation location(filePath, line, column);
|
||||
|
||||
m_client->onError(
|
||||
m_client->onErrorParsed(
|
||||
location,
|
||||
message,
|
||||
level == clang::DiagnosticsEngine::Fatal,
|
||||
|
||||
Reference in New Issue
Block a user