-Wextra for compiler plugins
Change-Id: I246dcf1d2c099c510435d21f0dd47e3c098456f2
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
# You may occassionally want to override some of these
|
# You may occassionally want to override some of these
|
||||||
|
|
||||||
# Compile flags ('make CLANGCXXFLAGS=-g' if you need to debug the plugin)
|
# Compile flags ('make CLANGCXXFLAGS=-g' if you need to debug the plugin)
|
||||||
CLANGCXXFLAGS=-O2 -Wall -g
|
CLANGCXXFLAGS=-O2 -Wall -Wextra -g
|
||||||
|
|
||||||
# The uninteresting rest.
|
# The uninteresting rest.
|
||||||
|
|
||||||
|
@@ -216,12 +216,12 @@ void PluginHandler::HandleTranslationUnit( ASTContext& context )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ASTConsumer* LibreOfficeAction::CreateASTConsumer( CompilerInstance& Compiler, StringRef InFile )
|
ASTConsumer* LibreOfficeAction::CreateASTConsumer( CompilerInstance& Compiler, StringRef )
|
||||||
{
|
{
|
||||||
return new PluginHandler( Compiler.getASTContext(), _args );
|
return new PluginHandler( Compiler.getASTContext(), _args );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LibreOfficeAction::ParseArgs( const CompilerInstance& CI, const vector< string >& args )
|
bool LibreOfficeAction::ParseArgs( const CompilerInstance&, const vector< string >& args )
|
||||||
{
|
{
|
||||||
_args = args;
|
_args = args;
|
||||||
return true;
|
return true;
|
||||||
|
@@ -125,7 +125,7 @@ bool PostfixIncrementFix::canChangePostfixToPrefix( const CXXOperatorCallExpr* o
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool PostfixIncrementFix::canChangeInConditionStatement( const CXXOperatorCallExpr* op, const Expr* condition,
|
bool PostfixIncrementFix::canChangeInConditionStatement( const CXXOperatorCallExpr* op, const Expr* condition,
|
||||||
const StmtParents& parents, int parent_pos )
|
const StmtParents& parents, unsigned int parent_pos )
|
||||||
{
|
{
|
||||||
// cannot be changed in condition, can be changed in statements
|
// cannot be changed in condition, can be changed in statements
|
||||||
if( parent_pos == parents.size() - 1 )
|
if( parent_pos == parents.size() - 1 )
|
||||||
|
@@ -30,7 +30,7 @@ class PostfixIncrementFix
|
|||||||
void fixPostfixOperators( const Stmt* stmt, StmtParents& parents );
|
void fixPostfixOperators( const Stmt* stmt, StmtParents& parents );
|
||||||
bool canChangePostfixToPrefix( const CXXOperatorCallExpr* op, StmtParents& parents, int parent_pos );
|
bool canChangePostfixToPrefix( const CXXOperatorCallExpr* op, StmtParents& parents, int parent_pos );
|
||||||
bool canChangeInConditionStatement( const CXXOperatorCallExpr* op, const Expr* condition,
|
bool canChangeInConditionStatement( const CXXOperatorCallExpr* op, const Expr* condition,
|
||||||
const StmtParents& parents, int parent_pos );
|
const StmtParents& parents, unsigned int parent_pos );
|
||||||
bool shouldDoChange( const Expr* op );
|
bool shouldDoChange( const Expr* op );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user