fix: astvisitor fixes

* renaming files
* fix typo
* clang waringns
This commit is contained in:
Andreas Stallinger
2016-11-03 12:38:36 +01:00
parent 5b47d195ff
commit 98869e51a5
9 changed files with 19 additions and 17 deletions
+2 -2
View File
@@ -165,12 +165,12 @@ void ApplicationSettings::setLoggingEnabled(bool value)
setValue<bool>("application/logging_enabled", value);
}
bool ApplicationSettings::getVerboseInderxerLoggingEnabled() const
bool ApplicationSettings::getVerboseIndexerLoggingEnabled() const
{
return getValue<bool>("application/verbose_indexer_logging_enabled", false);
}
void ApplicationSettings::setVerboseInderxerLoggingEnabled(bool value)
void ApplicationSettings::setVerboseIndexerLoggingEnabled(bool value)
{
setValue<bool>("application/verbose_indexer_logging_enabled", value);
}
+2 -2
View File
@@ -50,8 +50,8 @@ public:
bool getLoggingEnabled() const;
void setLoggingEnabled(bool loggingEnabled);
bool getVerboseInderxerLoggingEnabled() const;
void setVerboseInderxerLoggingEnabled(bool loggingEnabled);
bool getVerboseIndexerLoggingEnabled() const;
void setVerboseIndexerLoggingEnabled(bool loggingEnabled);
// indexing
int getIndexerThreadCount() const;
@@ -2,15 +2,15 @@
ReaderWriterLock::ReaderWriterLock()
: m_readerCount(0)
, m_allowedWriters(1)
, m_allowedReaders(1)
, m_allowedWriters(1)
{
}
ReaderWriterLock::ReaderWriterLock(const ReaderWriterLock &lock)
: m_readerCount(0)
, m_allowedWriters(1)
, m_allowedReaders(1)
, m_allowedWriters(1)
{
}
+2 -2
View File
@@ -19,8 +19,8 @@ add_files(
data/parser/cxx/ASTConsumer.h
data/parser/cxx/CommentHandler.cpp
data/parser/cxx/CommentHandler.h
data/parser/cxx/CxxASTVisitor.cpp
data/parser/cxx/CxxASTVisitor.h
data/parser/cxx/CxxAstVisitor.cpp
data/parser/cxx/CxxAstVisitor.h
data/parser/cxx/CxxCompilationDatabaseSingle.cpp
data/parser/cxx/CxxCompilationDatabaseSingle.h
data/parser/cxx/CxxContext.cpp
+1 -1
View File
@@ -5,7 +5,7 @@
ASTConsumer::ASTConsumer(clang::ASTContext* context, clang::Preprocessor* preprocessor, ParserClient* client, FileRegister* fileRegister)
{
if (ApplicationSettings::getInstance()->getVerboseInderxerLoggingEnabled())
if (ApplicationSettings::getInstance()->getVerboseIndexerLoggingEnabled())
{
m_visitor = std::make_shared<CxxVerboseAstVisitor>(context, preprocessor, client, fileRegister);
}
@@ -1119,8 +1119,9 @@ AccessKind CxxAstVisitor::convertAccessSpecifier(clang::AccessSpecifier access)
return ACCESS_PROTECTED;
case clang::AS_private:
return ACCESS_PRIVATE;
case clang::AS_none:
return ACCESS_NONE;
}
return ACCESS_NONE;
}
SymbolKind CxxAstVisitor::convertTagKind(clang::TagTypeKind tagKind)
@@ -1135,11 +1136,12 @@ SymbolKind CxxAstVisitor::convertTagKind(clang::TagTypeKind tagKind)
return SYMBOL_CLASS;
case clang::TTK_Enum:
return SYMBOL_ENUM;
case clang::TTK_Interface:
return SYMBOL_KIND_MAX;
}
return SYMBOL_KIND_MAX;
}
NameHierarchy CxxAstVisitor::getContextName(const int skip) const
NameHierarchy CxxAstVisitor::getContextName(const size_t skip) const
{
if (m_contextStack.size() <= skip)
{
@@ -82,7 +82,7 @@ public:
virtual bool TraverseDeclRefExpr(clang::DeclRefExpr* s);
virtual bool TraverseTemplateSpecializationTypeLoc(clang::TemplateSpecializationTypeLoc loc);
virtual bool TraverseUnresolvedLookupExpr(clang::UnresolvedLookupExpr* s);
virtual bool TraverseTemplateArgumentLoc(const clang::TemplateArgumentLoc& loc);;
virtual bool TraverseTemplateArgumentLoc(const clang::TemplateArgumentLoc& loc);
void traverseDeclContextHelper(clang::DeclContext *d);
bool TraverseCallCommon(clang::CallExpr* s);
@@ -129,7 +129,7 @@ protected:
private:
typedef clang::RecursiveASTVisitor<CxxAstVisitor> base;
NameHierarchy getContextName(const int skip = 0) const;
NameHierarchy getContextName(const size_t skip = 0) const;
bool checkIgnoresTypeLoc(const clang::TypeLoc& tl);
struct FileIdHash
@@ -172,7 +172,7 @@ void QtProjectWizzardContentPreferences::load()
}
m_loggingEnabled->setChecked(appSettings->getLoggingEnabled());
m_verboseIndexerLoggingEnabled->setChecked(appSettings->getVerboseInderxerLoggingEnabled());
m_verboseIndexerLoggingEnabled->setChecked(appSettings->getVerboseIndexerLoggingEnabled());
m_verboseIndexerLoggingEnabled->setEnabled(m_loggingEnabled->isChecked());
m_scrollSpeed->setText(QString::number(appSettings->getScrollSpeed(), 'f', 1));
@@ -204,7 +204,7 @@ void QtProjectWizzardContentPreferences::save()
m_oldColorSchemeIndex = -1;
appSettings->setLoggingEnabled(m_loggingEnabled->isChecked());
appSettings->setVerboseInderxerLoggingEnabled(m_verboseIndexerLoggingEnabled->isChecked());
appSettings->setVerboseIndexerLoggingEnabled(m_verboseIndexerLoggingEnabled->isChecked());
float scrollSpeed = m_scrollSpeed->text().toFloat();
if (scrollSpeed) appSettings->setScrollSpeed(scrollSpeed);
+1 -1
View File
@@ -84,7 +84,7 @@ void JavaParser::parseFile(const FilePath& filePath, std::shared_ptr<TextAccess>
filePath.str(),
fileContent,
classPath,
ApplicationSettings::getInstance()->getVerboseInderxerLoggingEnabled() ? 1 : 0
ApplicationSettings::getInstance()->getVerboseIndexerLoggingEnabled() ? 1 : 0
);
}
}