compilerplugins/clang/casttovoid.cxx | 12 ++++++------ compilerplugins/clang/dllprivate.cxx | 8 ++++---- compilerplugins/clang/dyncastvisibility.cxx | 9 +++++---- compilerplugins/clang/redundantcopy.cxx | 8 ++++---- compilerplugins/clang/redundantinline.cxx | 9 +++++---- compilerplugins/clang/salunicodeliteral.cxx | 9 +++++---- compilerplugins/clang/subtlezeroinit.cxx | 8 ++++---- compilerplugins/clang/unicodetochar.cxx | 8 ++++---- configure.ac | 2 +- solenv/gbuild/SdiTarget.mk | 2 +- solenv/gbuild/platform/com_GCC_defs.mk | 2 +- solenv/gbuild/platform/com_MSC_class.mk | 4 ++-- 12 files changed, 42 insertions(+), 39 deletions(-)
New commits: commit fbfe55e58c4b14f86cbb2c7b822f727e5b2e4a66 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Oct 9 16:25:27 2017 +0200 There appears to be no need for -I. in SOLARINC See the mail sub-thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-October/078609.html> "Re: C[++]: Normalizing include syntax ("" vs <>)". Change-Id: Ibb636be643789d455e771fcd54913dd3cdd03815 Reviewed-on: https://gerrit.libreoffice.org/43284 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/configure.ac b/configure.ac index 475e81a5f2f0..85b603060e3a 100644 --- a/configure.ac +++ b/configure.ac @@ -4296,7 +4296,7 @@ WORKDIR="${BUILDDIR}/workdir" INSTDIR="${BUILDDIR}/instdir" INSTROOTBASE=${INSTDIR}${INSTROOTBASESUFFIX} INSTROOT=${INSTROOTBASE}${INSTROOTCONTENTSUFFIX} -SOLARINC="-I. -I$SRC_ROOT/include $SOLARINC" +SOLARINC="-I$SRC_ROOT/include $SOLARINC" AC_SUBST(COM) AC_SUBST(CPUNAME) AC_SUBST(RTL_OS) diff --git a/solenv/gbuild/SdiTarget.mk b/solenv/gbuild/SdiTarget.mk index 3e64fda43fd7..d7febb92aced 100644 --- a/solenv/gbuild/SdiTarget.mk +++ b/solenv/gbuild/SdiTarget.mk @@ -63,7 +63,7 @@ $(call gb_SdiTarget_get_clean_target,%) : $(call gb_SdiTarget_get_target,$*)) define gb_SdiTarget_SdiTarget -$(call gb_SdiTarget_get_target,$(1)) : INCLUDE := $$(subst -I. ,-I$$(dir $(SRCDIR)/$(1)) ,$$(SOLARINC)) +$(call gb_SdiTarget_get_target,$(1)) : INCLUDE := $(SOLARINC) $(call gb_SdiTarget_get_target,$(1)) : EXPORTS := $(SRCDIR)/$(2).sdi ifeq ($(gb_FULLDEPS),$(true)) -include $(call gb_SdiTarget_get_dep_target,$(1)) diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 977aa0c1eac1..11b7871a3e6f 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -193,7 +193,7 @@ gb_DEBUG_CXXFLAGS := $(FNO_DEFAULT_INLINE) gb_LinkTarget_INCLUDE :=\ - $(subst -I. , ,$(SOLARINC)) \ + $(SOLARINC) \ -I$(BUILDDIR)/config_$(gb_Side) \ ifeq ($(COM_IS_CLANG),TRUE) diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk index 08f1fa28fd98..cb4bc73b88ac 100644 --- a/solenv/gbuild/platform/com_MSC_class.mk +++ b/solenv/gbuild/platform/com_MSC_class.mk @@ -109,7 +109,7 @@ gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) gb_LinkTarget_CXXCLRFLAGS := $(gb_CXXCLRFLAGS) gb_LinkTarget_INCLUDE :=\ - $(subst -I. , ,$(SOLARINC)) \ + $(SOLARINC) \ $(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \ -I$(BUILDDIR)/config_$(gb_Side) \ @@ -530,7 +530,7 @@ gb_AUTOCONF_WRAPPERS = \ LD="$(shell cygpath -w $(COMPATH)/bin/link.exe) -nologo" gb_ExternalProject_INCLUDE := \ - $(subst -I,,$(subst $(WHITESPACE),;,$(subst -I. , ,$(SOLARINC)))) + $(subst -I,,$(subst $(WHITESPACE),;,$(SOLARINC))) # InstallScript class commit 948c9c0a313d932d22cf275792077862eb4de334 Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Oct 11 10:45:27 2017 +0200 Use unique class names for better FlameGraph results ...of measuring loplugin performance, when gathering data with perf and all plugins that used "Visitor" as class name were lumped together. (Cf. <https://whatofhow.wordpress.com/2016/06/28/plugin-flamed/>.) Change-Id: Ie482f443faced7469528da4772e735bc2eda596d Reviewed-on: https://gerrit.libreoffice.org/43324 Reviewed-by: Stephan Bergmann <sberg...@redhat.com> Tested-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/compilerplugins/clang/casttovoid.cxx b/compilerplugins/clang/casttovoid.cxx index 10f1a6556d66..c6fccf07e7ab 100644 --- a/compilerplugins/clang/casttovoid.cxx +++ b/compilerplugins/clang/casttovoid.cxx @@ -43,11 +43,11 @@ Expr const * lookThroughInitListExpr(Expr const * expr) { return expr; } -class Visitor final: - public RecursiveASTVisitor<Visitor>, public loplugin::Plugin +class CastToVoid final: + public RecursiveASTVisitor<CastToVoid>, public loplugin::Plugin { public: - explicit Visitor(InstantiationData const & data): Plugin(data) {} + explicit CastToVoid(InstantiationData const & data): Plugin(data) {} bool TraverseCStyleCastExpr(CStyleCastExpr * expr) { auto const dre = checkCast(expr); @@ -325,13 +325,13 @@ private: DeclRefExpr const * firstConsumption = nullptr; }; - struct CastToVoid { + struct Cast { ExplicitCastExpr const * cast; DeclRefExpr const * sub; }; std::map<VarDecl const *, Usage> vars_; - std::stack<CastToVoid> castToVoid_; + std::stack<Cast> castToVoid_; std::stack<QualType> returnTypes_; void run() override { @@ -490,7 +490,7 @@ private: } }; -static loplugin::Plugin::Registration<Visitor> reg("casttovoid"); +static loplugin::Plugin::Registration<CastToVoid> reg("casttovoid"); } diff --git a/compilerplugins/clang/dllprivate.cxx b/compilerplugins/clang/dllprivate.cxx index 05cf26d7d5d2..3dc54e2fce64 100644 --- a/compilerplugins/clang/dllprivate.cxx +++ b/compilerplugins/clang/dllprivate.cxx @@ -11,11 +11,11 @@ namespace { -class Visitor final: - public RecursiveASTVisitor<Visitor>, public loplugin::Plugin +class DllPrivate final: + public RecursiveASTVisitor<DllPrivate>, public loplugin::Plugin { public: - explicit Visitor(InstantiationData const & data): Plugin(data) {} + explicit DllPrivate(InstantiationData const & data): Plugin(data) {} bool VisitNamedDecl(NamedDecl const * decl) { if (!decl->getLocation().isInvalid()&&ignoreLocation(decl)) { @@ -72,7 +72,7 @@ private: } }; -static loplugin::Plugin::Registration<Visitor> reg("dllprivate"); +static loplugin::Plugin::Registration<DllPrivate> reg("dllprivate"); } diff --git a/compilerplugins/clang/dyncastvisibility.cxx b/compilerplugins/clang/dyncastvisibility.cxx index 8cae22fbe534..e6e1f6eb79df 100644 --- a/compilerplugins/clang/dyncastvisibility.cxx +++ b/compilerplugins/clang/dyncastvisibility.cxx @@ -75,11 +75,11 @@ StringRef vis(Visibility v) { } } -class Visitor final: - public RecursiveASTVisitor<Visitor>, public loplugin::Plugin +class DynCastVisibility final: + public RecursiveASTVisitor<DynCastVisibility>, public loplugin::Plugin { public: - explicit Visitor(InstantiationData const & data): Plugin(data) {} + explicit DynCastVisibility(InstantiationData const & data): Plugin(data) {} bool shouldVisitTemplateInstantiations() const { return true; } @@ -156,7 +156,8 @@ private: } }; -static loplugin::Plugin::Registration<Visitor> reg("dyncastvisibility"); +static loplugin::Plugin::Registration<DynCastVisibility> reg( + "dyncastvisibility"); } diff --git a/compilerplugins/clang/redundantcopy.cxx b/compilerplugins/clang/redundantcopy.cxx index 18190f1eb0e4..b1216689dbb4 100644 --- a/compilerplugins/clang/redundantcopy.cxx +++ b/compilerplugins/clang/redundantcopy.cxx @@ -13,11 +13,11 @@ namespace { -class Visitor final: - public RecursiveASTVisitor<Visitor>, public loplugin::Plugin +class RedundantCopy final: + public RecursiveASTVisitor<RedundantCopy>, public loplugin::Plugin { public: - explicit Visitor(InstantiationData const & data): Plugin(data) {} + explicit RedundantCopy(InstantiationData const & data): Plugin(data) {} bool VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr const * expr) { if (ignoreLocation(expr)) { @@ -51,7 +51,7 @@ private: } }; -static loplugin::Plugin::Registration<Visitor> reg("redundantcopy"); +static loplugin::Plugin::Registration<RedundantCopy> reg("redundantcopy"); } diff --git a/compilerplugins/clang/redundantinline.cxx b/compilerplugins/clang/redundantinline.cxx index 88c870d75465..8ef9e040a997 100644 --- a/compilerplugins/clang/redundantinline.cxx +++ b/compilerplugins/clang/redundantinline.cxx @@ -13,11 +13,12 @@ namespace { -class Visitor: - public RecursiveASTVisitor<Visitor>, public loplugin::RewritePlugin +class RedundantInline: + public RecursiveASTVisitor<RedundantInline>, public loplugin::RewritePlugin { public: - explicit Visitor(InstantiationData const & data): RewritePlugin(data) {} + explicit RedundantInline(InstantiationData const & data): + RewritePlugin(data) {} void run() override { if (compiler.getLangOpts().CPlusPlus) { @@ -120,7 +121,7 @@ private: } }; -loplugin::Plugin::Registration<Visitor> reg("redundantinline", true); +loplugin::Plugin::Registration<RedundantInline> reg("redundantinline", true); } diff --git a/compilerplugins/clang/salunicodeliteral.cxx b/compilerplugins/clang/salunicodeliteral.cxx index 410a1aba45c9..a095da8267d9 100644 --- a/compilerplugins/clang/salunicodeliteral.cxx +++ b/compilerplugins/clang/salunicodeliteral.cxx @@ -19,11 +19,11 @@ bool isAsciiCharacterLiteral(Expr const * expr) { return false; } -class Visitor final: - public RecursiveASTVisitor<Visitor>, public loplugin::Plugin +class SalUnicodeLiteral final: + public RecursiveASTVisitor<SalUnicodeLiteral>, public loplugin::Plugin { public: - explicit Visitor(InstantiationData const & data): Plugin(data) {} + explicit SalUnicodeLiteral(InstantiationData const & data): Plugin(data) {} bool VisitCXXStaticCastExpr(CXXStaticCastExpr const * expr) { check(expr); @@ -89,7 +89,8 @@ private: } }; -static loplugin::Plugin::Registration<Visitor> reg("salunicodeliteral"); +static loplugin::Plugin::Registration<SalUnicodeLiteral> reg( + "salunicodeliteral"); } diff --git a/compilerplugins/clang/subtlezeroinit.cxx b/compilerplugins/clang/subtlezeroinit.cxx index c6c3486bd8c0..0871dbbabc67 100644 --- a/compilerplugins/clang/subtlezeroinit.cxx +++ b/compilerplugins/clang/subtlezeroinit.cxx @@ -17,11 +17,11 @@ namespace { -class Visitor final: - public RecursiveASTVisitor<Visitor>, public loplugin::Plugin +class SubtleZeroInit final: + public RecursiveASTVisitor<SubtleZeroInit>, public loplugin::Plugin { public: - explicit Visitor(InstantiationData const & data): Plugin(data) {} + explicit SubtleZeroInit(InstantiationData const & data): Plugin(data) {} bool VisitCXXNewExpr(CXXNewExpr const * expr) { if (ignoreLocation(expr)) { @@ -52,7 +52,7 @@ private: } }; -static loplugin::Plugin::Registration<Visitor> reg("subtlezeroinit"); +static loplugin::Plugin::Registration<SubtleZeroInit> reg("subtlezeroinit"); } diff --git a/compilerplugins/clang/unicodetochar.cxx b/compilerplugins/clang/unicodetochar.cxx index 92660a118722..ad25c9b4508e 100644 --- a/compilerplugins/clang/unicodetochar.cxx +++ b/compilerplugins/clang/unicodetochar.cxx @@ -17,11 +17,11 @@ namespace { -class Visitor final: - public RecursiveASTVisitor<Visitor>, public loplugin::Plugin +class UnicodeToChar final: + public RecursiveASTVisitor<UnicodeToChar>, public loplugin::Plugin { public: - explicit Visitor(InstantiationData const & data): Plugin(data) {} + explicit UnicodeToChar(InstantiationData const & data): Plugin(data) {} bool TraverseCStyleCastExpr(CStyleCastExpr * expr) { subExprs_.push(expr->getSubExpr()); @@ -81,7 +81,7 @@ private: std::stack<Expr const *> subExprs_; }; -static loplugin::Plugin::Registration<Visitor> reg("unicodetochar"); +static loplugin::Plugin::Registration<UnicodeToChar> reg("unicodetochar"); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits