[Libreoffice-commits] core.git: compilerplugins/clang

Luboš Luňák l.lunak at suse.cz
Thu Mar 28 10:11:34 PDT 2013


 compilerplugins/clang/store/lclstaticfix.cxx       |    6 +++---
 compilerplugins/clang/store/lclstaticfix.hxx       |    2 +-
 compilerplugins/clang/store/tutorial/tutorial1.cxx |    6 +++---
 compilerplugins/clang/store/tutorial/tutorial1.hxx |    2 +-
 compilerplugins/clang/store/tutorial/tutorial2.cxx |    6 +++---
 compilerplugins/clang/store/tutorial/tutorial2.hxx |    2 +-
 compilerplugins/clang/store/tutorial/tutorial3.cxx |    6 +++---
 compilerplugins/clang/store/tutorial/tutorial3.hxx |    2 +-
 8 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit c63e6c38c9b0be2a5141b356bdcb4fe9b361effc
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Thu Mar 28 18:07:09 2013 +0100

    adjust unused compiler plugins for ASTContext to CompilerInstance change too
    
    Change-Id: I415ed25586408d7e7df9457f7c637a8c6d13d35d

diff --git a/compilerplugins/clang/store/lclstaticfix.cxx b/compilerplugins/clang/store/lclstaticfix.cxx
index 6b3ba16..423a1ca 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 64e5b29..1fc485b 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 fa1ec44..42443af 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 0f5127d..cb56a3b 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 d5fc60b..63131fb 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 97c56ba..e0d31f3 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 e0589f6..95323a6 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 69747ee..af512c1 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 );


More information about the Libreoffice-commits mailing list