summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-13 15:07:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-16 12:01:59 +0200
commit7168fe32c9e79cf9cbbcf1e0b6a35d85781b1332 (patch)
treeca7573fadfa32bbcfb541b7d5352b00fd2391620 /compilerplugins
parent7595fce391ba2aca49db87c93006302d0c2a64f2 (diff)
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@collabora.co.uk>
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/staticconstfield.cxx (renamed from compilerplugins/clang/conststringfield.cxx)10
-rw-r--r--compilerplugins/clang/test/staticconstfield.cxx (renamed from compilerplugins/clang/test/conststringfield.cxx)8
2 files changed, 9 insertions, 9 deletions
diff --git a/compilerplugins/clang/conststringfield.cxx b/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
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@-1 {{string field can be static const [loplugin:conststringfield]}}
+ // expected-error@-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@-1 {{string field can be static const [loplugin:conststringfield]}}
+ // expected-error@-1 {{string field can be static const [loplugin:staticconstfield]}}
{
(void)m_field1;
}