mark all virtuals in the clang plugin as override
In order to help catch Clang API changes. Change-Id: I5738f5dff405f7a2dd377c983fb32c1c7a2ff921
This commit is contained in:
@@ -22,7 +22,7 @@ class BodyNotInBlock
|
||||
{
|
||||
public:
|
||||
explicit BodyNotInBlock( CompilerInstance& compiler );
|
||||
virtual void run();
|
||||
virtual void run() override;
|
||||
bool VisitFunctionDecl( const FunctionDecl* declaration );
|
||||
private:
|
||||
typedef vector< const Stmt* > StmtParents;
|
||||
|
@@ -31,12 +31,12 @@ class CheckConfigMacros
|
||||
{
|
||||
public:
|
||||
explicit CheckConfigMacros( CompilerInstance& compiler );
|
||||
virtual void run();
|
||||
virtual void MacroDefined( const Token& macroToken, const MacroInfo* info );
|
||||
virtual void MacroUndefined( const Token& macroToken , const MacroInfo* info );
|
||||
virtual void Ifdef( SourceLocation location, const Token& macroToken );
|
||||
virtual void Ifndef( SourceLocation location, const Token& macroToken );
|
||||
virtual void Defined( const Token& macroToken );
|
||||
virtual void run() override;
|
||||
virtual void MacroDefined( const Token& macroToken, const MacroInfo* info ) override;
|
||||
virtual void MacroUndefined( const Token& macroToken , const MacroInfo* info ) override;
|
||||
virtual void Ifdef( SourceLocation location, const Token& macroToken ) override;
|
||||
virtual void Ifndef( SourceLocation location, const Token& macroToken ) override;
|
||||
virtual void Defined( const Token& macroToken ) override;
|
||||
private:
|
||||
void checkMacro( const Token& macroToken, SourceLocation location );
|
||||
std::set< string > configMacros;
|
||||
|
@@ -23,7 +23,7 @@ class LiteralAlternative:
|
||||
public:
|
||||
explicit LiteralAlternative(CompilerInstance & compiler): Plugin(compiler) {}
|
||||
|
||||
virtual void run() { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||
|
||||
bool VisitCallExpr(const CallExpr * expr);
|
||||
};
|
||||
|
@@ -28,7 +28,7 @@ class PluginHandler
|
||||
public:
|
||||
PluginHandler( CompilerInstance& compiler, const vector< string >& args );
|
||||
virtual ~PluginHandler();
|
||||
virtual void HandleTranslationUnit( ASTContext& context );
|
||||
virtual void HandleTranslationUnit( ASTContext& context ) override;
|
||||
static void registerPlugin( Plugin* (*create)( CompilerInstance&, Rewriter& ), const char* optionName, bool isRewriter );
|
||||
private:
|
||||
void handleOption( const string& option );
|
||||
|
@@ -22,7 +22,7 @@ class PostfixIncrementFix
|
||||
{
|
||||
public:
|
||||
explicit PostfixIncrementFix( CompilerInstance& compiler, Rewriter& rewriter );
|
||||
virtual void run();
|
||||
virtual void run() override;
|
||||
bool VisitFunctionDecl( const FunctionDecl* declaration );
|
||||
private:
|
||||
typedef std::vector< const Stmt* > StmtParents;
|
||||
|
@@ -29,11 +29,11 @@ class RtlConstAsciiMacro
|
||||
{
|
||||
public:
|
||||
explicit RtlConstAsciiMacro( CompilerInstance& compiler, Rewriter& rewriter );
|
||||
virtual void run();
|
||||
virtual void run() override;
|
||||
bool VisitCXXConstructExpr( CXXConstructExpr* expr );
|
||||
bool VisitCXXTemporaryObjectExpr( CXXTemporaryObjectExpr* expr );
|
||||
bool VisitStringLiteral( const StringLiteral* literal );
|
||||
virtual void MacroExpands( const Token& macro, const MacroInfo* info, SourceRange range );
|
||||
virtual void MacroExpands( const Token& macro, const MacroInfo* info, SourceRange range ) override;
|
||||
private:
|
||||
map< SourceLocation, SourceLocation > expansions; // start location -> end location
|
||||
bool searchingForString;
|
||||
|
@@ -24,7 +24,7 @@ class SalLogAreas
|
||||
{
|
||||
public:
|
||||
explicit SalLogAreas( CompilerInstance& compiler );
|
||||
virtual void run();
|
||||
virtual void run() override;
|
||||
bool VisitFunctionDecl( const FunctionDecl* function );
|
||||
bool VisitCallExpr( const CallExpr* call );
|
||||
private:
|
||||
|
@@ -22,7 +22,7 @@ class LclStaticFix
|
||||
{
|
||||
public:
|
||||
explicit LclStaticFix( CompilerInstance& compiler, Rewriter& rewriter );
|
||||
virtual void run();
|
||||
virtual void run() override;
|
||||
bool VisitFunctionDecl( const FunctionDecl* declaration );
|
||||
};
|
||||
|
||||
|
@@ -22,7 +22,7 @@ class ReferenceCasting
|
||||
{
|
||||
public:
|
||||
explicit ReferenceCasting( CompilerInstance& compiler );
|
||||
virtual void run();
|
||||
virtual void run() override;
|
||||
bool VisitCXXConstructExpr( CXXConstructExpr* cce );
|
||||
};
|
||||
|
||||
|
@@ -22,7 +22,7 @@ class RemoveForwardStringDecl
|
||||
{
|
||||
public:
|
||||
explicit RemoveForwardStringDecl( CompilerInstance& compiler, Rewriter& rewriter );
|
||||
virtual void run();
|
||||
virtual void run() override;
|
||||
bool VisitNamespaceDecl( const NamespaceDecl* declaration );
|
||||
private:
|
||||
bool tryRemoveStringForwardDecl( const Decl* decl );
|
||||
|
@@ -27,7 +27,7 @@ class Tutorial1
|
||||
// Ctor, nothing special.
|
||||
Tutorial1( CompilerInstance& compiler );
|
||||
// The function that will be called to perform the actual action.
|
||||
virtual void run();
|
||||
virtual void run() override;
|
||||
// Function from Clang, it will be called for every return statement in the source.
|
||||
bool VisitReturnStmt( const ReturnStmt* returnstmt );
|
||||
};
|
||||
|
@@ -23,7 +23,7 @@ class Tutorial2
|
||||
{
|
||||
public:
|
||||
Tutorial2( CompilerInstance& compiler );
|
||||
virtual void run();
|
||||
virtual void run() override;
|
||||
// Will be called for every if statement.
|
||||
bool VisitIfStmt( const IfStmt* ifstmt );
|
||||
private:
|
||||
|
@@ -24,7 +24,7 @@ class Tutorial3
|
||||
public:
|
||||
// One more argument for ctor.
|
||||
Tutorial3( CompilerInstance& compiler, Rewriter& rewriter );
|
||||
virtual void run();
|
||||
virtual void run() override;
|
||||
// Will be called for every if statement.
|
||||
bool VisitIfStmt( const IfStmt* ifstmt );
|
||||
private:
|
||||
|
@@ -29,7 +29,7 @@ class UnusedCode
|
||||
{
|
||||
public:
|
||||
explicit UnusedCode( CompilerInstance& compiler, Rewriter& rewriter );
|
||||
virtual void run();
|
||||
virtual void run() override;
|
||||
bool VisitFunctionDecl( const FunctionDecl* declaration );
|
||||
};
|
||||
|
||||
|
@@ -22,7 +22,7 @@ class UnusedVariableCheck
|
||||
{
|
||||
public:
|
||||
explicit UnusedVariableCheck( CompilerInstance& compiler );
|
||||
virtual void run();
|
||||
virtual void run() override;
|
||||
bool VisitVarDecl( const VarDecl* var );
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user