compilerplugins/clang/salunicodeliteral.cxx | 22 -
compilerplugins/clang/sfxpoolitem.cxx |7
compilerplugins/clang/sharedvisitor/sharedvisitor.cxx | 267 ++
compilerplugins/clang/staticaccess.cxx|8
compilerplugins/clang/staticanonymous.cxx | 10
compilerplugins/clang/stringconcat.cxx|8
compilerplugins/clang/typedefparam.cxx| 11
compilerplugins/clang/unicodetochar.cxx | 52 ++-
compilerplugins/clang/unnecessarycatchthrow.cxx |8
compilerplugins/clang/unoany.cxx | 17 +
compilerplugins/clang/unoquery.cxx| 20 +
compilerplugins/clang/weakbase.cxx| 19 +
sw/qa/extras/rtfexport/data/page-border.rtf |4
sw/qa/extras/rtfexport/rtfexport4.cxx | 17 +
14 files changed, 429 insertions(+), 41 deletions(-)
New commits:
commit 8d4fbc532e2058a906b06471501385404ff31541
Author: Noel Grandin
AuthorDate: Tue Jul 16 08:13:59 2019 +0200
Commit: Noel Grandin
CommitDate: Tue Jul 16 09:15:01 2019 +0200
convert some plugins to LO_CLANG_SHARED_PLUGINS
Change-Id: I7451a95377101004c7c53c918f3234415e06f555
Reviewed-on: https://gerrit.libreoffice.org/75670
Tested-by: Jenkins
Reviewed-by: Noel Grandin
diff --git a/compilerplugins/clang/salunicodeliteral.cxx
b/compilerplugins/clang/salunicodeliteral.cxx
index bdf83694b77e..4c2a00669ab0 100644
--- a/compilerplugins/clang/salunicodeliteral.cxx
+++ b/compilerplugins/clang/salunicodeliteral.cxx
@@ -6,6 +6,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#ifndef LO_CLANG_SHARED_PLUGINS
#include "check.hxx"
#include "plugin.hxx"
@@ -41,16 +42,18 @@ public:
return true;
}
-private:
-void run() override {
-if (compiler.getLangOpts().CPlusPlus
+bool preRun() override {
+return compiler.getLangOpts().CPlusPlus
&& compiler.getPreprocessor().getIdentifierInfo(
-"LIBO_INTERNAL_ONLY")->hasMacroDefinition())
-{
+"LIBO_INTERNAL_ONLY")->hasMacroDefinition();
+}
+
+void run() override {
+if (preRun())
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
-}
}
+private:
void check(ExplicitCastExpr const * expr) {
if (ignoreLocation(expr)
|| isInUnoIncludeFile(expr->getExprLoc()))
@@ -90,9 +93,10 @@ private:
}
};
-static loplugin::Plugin::Registration reg(
-"salunicodeliteral");
+static loplugin::Plugin::Registration
salunicodeliteral("salunicodeliteral");
-}
+} // namespace
+
+#endif // LO_CLANG_SHARED_PLUGINS
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s
cinkeys+=0=break: */
diff --git a/compilerplugins/clang/sfxpoolitem.cxx
b/compilerplugins/clang/sfxpoolitem.cxx
index bd2870fe06d3..ce52336c8e04 100644
--- a/compilerplugins/clang/sfxpoolitem.cxx
+++ b/compilerplugins/clang/sfxpoolitem.cxx
@@ -6,6 +6,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#ifndef LO_CLANG_SHARED_PLUGINS
#include
#include
@@ -124,8 +125,10 @@ bool SfxPoolItem::VisitCXXRecordDecl(const CXXRecordDecl*
decl)
}
-loplugin::Plugin::Registration< SfxPoolItem > X("sfxpoolitem");
+loplugin::Plugin::Registration< SfxPoolItem > sfxpoolitem("sfxpoolitem");
-}
+} // namespace
+
+#endif // LO_CLANG_SHARED_PLUGINS
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx
b/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx
index a6df13ca33b4..4532bbe250ca 100644
--- a/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx
+++ b/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx
@@ -26,13 +26,24 @@
#include "../loopvartoosmall.cxx"
#include "../privatebase.cxx"
#include "../reservedid.cxx"
+#include "../salunicodeliteral.cxx"
+#include "../sfxpoolitem.cxx"
#include "../simplifyconstruct.cxx"
+#include "../staticaccess.cxx"
+#include "../staticanonymous.cxx"
+#include "../stringconcat.cxx"
#include "../stringstatic.cxx"
#include "../subtlezeroinit.cxx"
+#include "../typedefparam.cxx"
+#include "../unicodetochar.cxx"
+#include "../unnecessarycatchthrow.cxx"
#include "../unnecessaryoverride.cxx"
#include "../unnecessaryparen.cxx"
+#include "../unoany.cxx"
+#include "../unoquery.cxx"
#include "../unreffun.cxx"
#include "../unusedvariablecheck.cxx"
+#include "../weakbase.cxx"
#include "../weakobject.cxx"
#include "../dyncastvisibility.cxx"
#include "../vclwidgets.cxx"
@@ -64,13 +75,24 @@ public:
, loopVarTooSmall( nullptr )
, privateBase( nullptr )
, reservedId( nullptr )
+, salUnicodeLiteral( nullptr )
+,