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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Sep 16 10:02:22 UTC 2018


 compilerplugins/clang/staticconstfield.cxx      |   10 +++++-----
 compilerplugins/clang/test/staticconstfield.cxx |    8 ++++----
 solenv/CompilerTest_compilerplugins_clang.mk    |    2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 7168fe32c9e79cf9cbbcf1e0b6a35d85781b1332
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Sep 13 15:07:13 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Sep 16 12:01:59 2018 +0200

    rename conststringfield loplugin to staticconstfield
    
    in preparation for making it more general
    
    Change-Id: I2fc8d0f99140dc7ef72341f8cbf28d6536ebd61f
    Reviewed-on: https://gerrit.libreoffice.org/60525
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/conststringfield.cxx b/compilerplugins/clang/staticconstfield.cxx
similarity index 83%
rename from compilerplugins/clang/conststringfield.cxx
rename to compilerplugins/clang/staticconstfield.cxx
index 23a7db9ebea2..7276d7e05c49 100644
--- a/compilerplugins/clang/conststringfield.cxx
+++ b/compilerplugins/clang/staticconstfield.cxx
@@ -14,11 +14,11 @@
 
 namespace
 {
-class ConstStringField : public loplugin::FilteringPlugin<ConstStringField>
+class StaticConstField : public loplugin::FilteringPlugin<StaticConstField>
 {
 public:
-    explicit ConstStringField(loplugin::InstantiationData const& data)
-        : loplugin::FilteringPlugin<ConstStringField>(data)
+    explicit StaticConstField(loplugin::InstantiationData const& data)
+        : loplugin::FilteringPlugin<StaticConstField>(data)
     {
     }
 
@@ -27,7 +27,7 @@ public:
     bool TraverseConstructorInitializer(CXXCtorInitializer* init);
 };
 
-bool ConstStringField::TraverseConstructorInitializer(CXXCtorInitializer* init)
+bool StaticConstField::TraverseConstructorInitializer(CXXCtorInitializer* init)
 {
     if (!init->getSourceLocation().isValid() || ignoreLocation(init->getSourceLocation()))
         return true;
@@ -51,7 +51,7 @@ bool ConstStringField::TraverseConstructorInitializer(CXXCtorInitializer* init)
     return RecursiveASTVisitor::TraverseConstructorInitializer(init);
 }
 
-loplugin::Plugin::Registration<ConstStringField> X("conststringfield", true);
+loplugin::Plugin::Registration<StaticConstField> X("staticconstfield", true);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/compilerplugins/clang/test/conststringfield.cxx b/compilerplugins/clang/test/staticconstfield.cxx
similarity index 91%
rename from compilerplugins/clang/test/conststringfield.cxx
rename to compilerplugins/clang/test/staticconstfield.cxx
index 1f34ee2530e2..49b326f7d76e 100644
--- a/compilerplugins/clang/test/conststringfield.cxx
+++ b/compilerplugins/clang/test/staticconstfield.cxx
@@ -12,10 +12,10 @@
 
 class Class1
 {
-    OUString const m_field1; // expected-note {{field here [loplugin:conststringfield]}}
+    OUString const m_field1; // expected-note {{field here [loplugin:staticconstfield]}}
     Class1()
         : m_field1("xxxx")
-    // expected-error at -1 {{string field can be static const [loplugin:conststringfield]}}
+    // expected-error at -1 {{string field can be static const [loplugin:staticconstfield]}}
     {
         (void)m_field1;
     }
@@ -23,10 +23,10 @@ class Class1
 
 class Class2
 {
-    OString const m_field1; // expected-note {{field here [loplugin:conststringfield]}}
+    OString const m_field1; // expected-note {{field here [loplugin:staticconstfield]}}
     Class2()
         : m_field1("xxxx")
-    // expected-error at -1 {{string field can be static const [loplugin:conststringfield]}}
+    // expected-error at -1 {{string field can be static const [loplugin:staticconstfield]}}
     {
         (void)m_field1;
     }
diff --git a/solenv/CompilerTest_compilerplugins_clang.mk b/solenv/CompilerTest_compilerplugins_clang.mk
index f56fd772e806..89085c5e4a8f 100644
--- a/solenv/CompilerTest_compilerplugins_clang.mk
+++ b/solenv/CompilerTest_compilerplugins_clang.mk
@@ -16,7 +16,6 @@ $(eval $(call gb_CompilerTest_add_exception_objects,compilerplugins_clang, \
     compilerplugins/clang/test/commaoperator \
     compilerplugins/clang/test/constfields \
     compilerplugins/clang/test/constparams \
-    compilerplugins/clang/test/conststringfield \
     compilerplugins/clang/test/convertlong \
     compilerplugins/clang/test/cppunitassertequals \
     compilerplugins/clang/test/cstylecast \
@@ -51,6 +50,7 @@ $(eval $(call gb_CompilerTest_add_exception_objects,compilerplugins_clang, \
     compilerplugins/clang/test/simplifybool \
     compilerplugins/clang/test/simplifyconstruct \
     compilerplugins/clang/test/simplifydynamiccast \
+    compilerplugins/clang/test/staticconstfield \
     compilerplugins/clang/test/stringbuffer \
     compilerplugins/clang/test/stringconstant \
     compilerplugins/clang/test/stringloop \


More information about the Libreoffice-commits mailing list