summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-03-28 18:07:09 +0100
committerLuboš Luňák <l.lunak@suse.cz>2013-03-28 18:08:05 +0100
commitc63e6c38c9b0be2a5141b356bdcb4fe9b361effc (patch)
tree94315094be6d349c84230a221d89a04a6dc46baf /compilerplugins
parent153a69cad2efdb38f7da50bcd25158d127a944f4 (diff)
adjust unused compiler plugins for ASTContext to CompilerInstance change too
Change-Id: I415ed25586408d7e7df9457f7c637a8c6d13d35d
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/store/lclstaticfix.cxx6
-rw-r--r--compilerplugins/clang/store/lclstaticfix.hxx2
-rw-r--r--compilerplugins/clang/store/tutorial/tutorial1.cxx6
-rw-r--r--compilerplugins/clang/store/tutorial/tutorial1.hxx2
-rw-r--r--compilerplugins/clang/store/tutorial/tutorial2.cxx6
-rw-r--r--compilerplugins/clang/store/tutorial/tutorial2.hxx2
-rw-r--r--compilerplugins/clang/store/tutorial/tutorial3.cxx6
-rw-r--r--compilerplugins/clang/store/tutorial/tutorial3.hxx2
8 files changed, 16 insertions, 16 deletions
diff --git a/compilerplugins/clang/store/lclstaticfix.cxx b/compilerplugins/clang/store/lclstaticfix.cxx
index 6b3ba167c656..423a1caa4af8 100644
--- a/compilerplugins/clang/store/lclstaticfix.cxx
+++ b/compilerplugins/clang/store/lclstaticfix.cxx
@@ -19,14 +19,14 @@ Check all lcl_ functions and prepend static if needed.
namespace loplugin
{
-LclStaticFix::LclStaticFix( ASTContext& context, Rewriter& rewriter )
- : RewritePlugin( context, rewriter )
+LclStaticFix::LclStaticFix( CompilerInstance& compiler, Rewriter& rewriter )
+ : RewritePlugin( compiler, rewriter )
{
}
void LclStaticFix::run()
{
- TraverseDecl( context.getTranslationUnitDecl());
+ TraverseDecl( compiler.getASTContext().getTranslationUnitDecl());
}
bool LclStaticFix::VisitFunctionDecl( FunctionDecl* declaration )
diff --git a/compilerplugins/clang/store/lclstaticfix.hxx b/compilerplugins/clang/store/lclstaticfix.hxx
index 64e5b2919461..1fc485b4c7e7 100644
--- a/compilerplugins/clang/store/lclstaticfix.hxx
+++ b/compilerplugins/clang/store/lclstaticfix.hxx
@@ -21,7 +21,7 @@ class LclStaticFix
, public RewritePlugin
{
public:
- explicit LclStaticFix( ASTContext& context, Rewriter& rewriter );
+ explicit LclStaticFix( CompilerInstance& compiler, Rewriter& rewriter );
virtual void run();
bool VisitFunctionDecl( FunctionDecl* declaration );
};
diff --git a/compilerplugins/clang/store/tutorial/tutorial1.cxx b/compilerplugins/clang/store/tutorial/tutorial1.cxx
index fa1ec44e351d..42443afa571c 100644
--- a/compilerplugins/clang/store/tutorial/tutorial1.cxx
+++ b/compilerplugins/clang/store/tutorial/tutorial1.cxx
@@ -20,8 +20,8 @@ namespace loplugin
{
// Ctor, nothing special, pass the argument(s).
-Tutorial1::Tutorial1( ASTContext& context )
- : Plugin( context )
+Tutorial1::Tutorial1( CompilerInstance& compiler )
+ : Plugin( compiler )
{
}
@@ -30,7 +30,7 @@ void Tutorial1::run()
{
// Traverse the whole AST of the translation unit (i.e. examine the whole source file).
// The Clang AST helper class will call VisitReturnStmt for every return statement.
- TraverseDecl( context.getTranslationUnitDecl());
+ TraverseDecl( compiler.getASTContext().getTranslationUnitDecl());
}
// This function is called for every return statement.
diff --git a/compilerplugins/clang/store/tutorial/tutorial1.hxx b/compilerplugins/clang/store/tutorial/tutorial1.hxx
index 0f5127db65a8..cb56a3bf16c7 100644
--- a/compilerplugins/clang/store/tutorial/tutorial1.hxx
+++ b/compilerplugins/clang/store/tutorial/tutorial1.hxx
@@ -25,7 +25,7 @@ class Tutorial1
{
public:
// Ctor, nothing special.
- Tutorial1( ASTContext& context );
+ Tutorial1( CompilerInstance& compiler );
// The function that will be called to perform the actual action.
virtual void run();
// Function from Clang, it will be called for every return statement in the source.
diff --git a/compilerplugins/clang/store/tutorial/tutorial2.cxx b/compilerplugins/clang/store/tutorial/tutorial2.cxx
index d5fc60b822a3..63131fb17544 100644
--- a/compilerplugins/clang/store/tutorial/tutorial2.cxx
+++ b/compilerplugins/clang/store/tutorial/tutorial2.cxx
@@ -21,15 +21,15 @@ if( a == 1 )
namespace loplugin
{
-Tutorial2::Tutorial2( ASTContext& context )
- : Plugin( context )
+Tutorial2::Tutorial2( CompilerInstance& compiler )
+ : Plugin( compiler )
{
}
void Tutorial2::run()
{
// The Clang AST helper class will call VisitIfStmt for every if statement.
- TraverseDecl( context.getTranslationUnitDecl());
+ TraverseDecl( compiler.getASTContext().getTranslationUnitDecl());
}
// This function is called for every if statement.
diff --git a/compilerplugins/clang/store/tutorial/tutorial2.hxx b/compilerplugins/clang/store/tutorial/tutorial2.hxx
index 97c56bad195b..e0d31f3c245d 100644
--- a/compilerplugins/clang/store/tutorial/tutorial2.hxx
+++ b/compilerplugins/clang/store/tutorial/tutorial2.hxx
@@ -22,7 +22,7 @@ class Tutorial2
, public Plugin
{
public:
- Tutorial2( ASTContext& context );
+ Tutorial2( CompilerInstance& compiler );
virtual void run();
// Will be called for every if statement.
bool VisitIfStmt( IfStmt* ifstmt );
diff --git a/compilerplugins/clang/store/tutorial/tutorial3.cxx b/compilerplugins/clang/store/tutorial/tutorial3.cxx
index e0589f64b671..95323a667452 100644
--- a/compilerplugins/clang/store/tutorial/tutorial3.cxx
+++ b/compilerplugins/clang/store/tutorial/tutorial3.cxx
@@ -21,14 +21,14 @@ namespace loplugin
{
// Ctor, pass arguments.
-Tutorial3::Tutorial3( ASTContext& context, Rewriter& rewriter )
- : RewritePlugin( context, rewriter )
+Tutorial3::Tutorial3( CompilerInstance& compiler, Rewriter& rewriter )
+ : RewritePlugin( compiler, rewriter )
{
}
void Tutorial3::run()
{
- TraverseDecl( context.getTranslationUnitDecl());
+ TraverseDecl( compiler.getASTContext().getTranslationUnitDecl());
}
bool Tutorial3::VisitIfStmt( IfStmt* ifstmt )
diff --git a/compilerplugins/clang/store/tutorial/tutorial3.hxx b/compilerplugins/clang/store/tutorial/tutorial3.hxx
index 69747ee8cf14..af512c1ac489 100644
--- a/compilerplugins/clang/store/tutorial/tutorial3.hxx
+++ b/compilerplugins/clang/store/tutorial/tutorial3.hxx
@@ -23,7 +23,7 @@ class Tutorial3
{
public:
// One more argument for ctor.
- Tutorial3( ASTContext& context, Rewriter& rewriter );
+ Tutorial3( CompilerInstance& compiler, Rewriter& rewriter );
virtual void run();
// Will be called for every if statement.
bool VisitIfStmt( IfStmt* ifstmt );