build: clang warning cleanup
* unused member in undoredocontroller * int - size_t comparion * virtual destructor ASTVisitor added * braces when && and || in same if * 1 warning left: isNamedDeclUnnamed in ASTVisitor is unused
This commit is contained in:
@@ -115,8 +115,8 @@ void FeatureController::handleMessage(MessageZoom* message)
|
||||
int maxSize = settings->getFontSizeMax();
|
||||
int minSize = settings->getFontSizeMin();
|
||||
|
||||
if (fontSize >= maxSize && zoomIn
|
||||
|| fontSize <= minSize && !zoomIn)
|
||||
if ((fontSize >= maxSize && zoomIn)
|
||||
|| (fontSize <= minSize && !zoomIn))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
UndoRedoController::UndoRedoController(StorageAccess* storageAccess)
|
||||
: m_activationTranslator(storageAccess)
|
||||
, m_storageAccess(storageAccess)
|
||||
, m_lastCommand(nullptr, 0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -93,7 +93,6 @@ private:
|
||||
bool checkCommandCausesTokenActivation(const Command& command) const;
|
||||
|
||||
ActivationTranslator m_activationTranslator;
|
||||
StorageAccess* m_storageAccess;
|
||||
|
||||
Command m_lastCommand;
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ void Storage::onError(const ParseLocation& location, const std::string& message,
|
||||
|
||||
m_sqliteStorage.addError(message, fatal, location.filePath.str(), location.startLineNumber, location.startColumnNumber);
|
||||
|
||||
if (totalErrorCount != getErrorCount().total)
|
||||
if ((int)totalErrorCount != getErrorCount().total)
|
||||
{
|
||||
MessageShowErrors msg(getErrorCount());
|
||||
msg.setSendAsTask(false);
|
||||
|
||||
@@ -44,6 +44,10 @@ ASTVisitor::ASTVisitor(clang::ASTContext* context, clang::Preprocessor* preproce
|
||||
m_childContextNameGenerator = std::make_shared<ContextDeclNameGenerator>(nullptr, m_declNameCache);
|
||||
}
|
||||
|
||||
ASTVisitor::~ASTVisitor()
|
||||
{
|
||||
}
|
||||
|
||||
bool ASTVisitor::VisitTranslationUnitDecl(clang::TranslationUnitDecl* decl)
|
||||
{
|
||||
//decl->dump();
|
||||
@@ -860,8 +864,6 @@ bool ASTVisitor::VisitDecl(clang::Decl *d)
|
||||
|
||||
bool ASTVisitor::VisitTypeLoc(clang::TypeLoc tl)
|
||||
{
|
||||
clang::TypeLoc::TypeLocClass tlc = tl.getTypeLocClass();
|
||||
|
||||
if (!tl.getAs<clang::TagTypeLoc>().isNull())
|
||||
{
|
||||
const clang::TagTypeLoc &ttl = tl.castAs<clang::TagTypeLoc>();
|
||||
|
||||
@@ -120,10 +120,8 @@ public:
|
||||
std::shared_ptr<TypeNameCache> m_nameCache;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
ASTVisitor(clang::ASTContext* context, clang::Preprocessor* preprocessor, ParserClient* client, FileRegister* fileRegister);
|
||||
virtual ~ASTVisitor();
|
||||
|
||||
// Left for debugging purposes. Uncomment to see a colored ast-dump of the parsed file.
|
||||
virtual bool VisitTranslationUnitDecl(clang::TranslationUnitDecl* decl);
|
||||
|
||||
Reference in New Issue
Block a user