From 924c0e34fdc36cd44100dafc2c68656ce32374e6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 20 Feb 2018 11:03:20 +0200 Subject: loplugin:changetoolsgen in svx and fix the regex in the plugin for matching += operator Change-Id: I26b3e3fac1d4ef3e756cc9431b983b5f27ee76d6 Reviewed-on: https://gerrit.libreoffice.org/50037 Tested-by: Jenkins Reviewed-by: Noel Grandin --- compilerplugins/clang/changetoolsgen.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compilerplugins') diff --git a/compilerplugins/clang/changetoolsgen.cxx b/compilerplugins/clang/changetoolsgen.cxx index 53246226eff8..0b072c5dcbde 100644 --- a/compilerplugins/clang/changetoolsgen.cxx +++ b/compilerplugins/clang/changetoolsgen.cxx @@ -214,13 +214,13 @@ bool ChangeToolsGen::ChangeBinaryOperatorPlusMinus(BinaryOperator const* binaryO std::string newText; if (binaryOp->getOpcode() == BO_AddAssign) { - newText = std::regex_replace(callText, std::regex(methodName + " *\\( *\\) +\\+= *"), + newText = std::regex_replace(callText, std::regex(methodName + " *\\( *\\) *\\+= *"), "Adjust" + methodName + "("); newText += " )"; } else { - newText = std::regex_replace(callText, std::regex(methodName + " *\\( *\\) +\\-= *"), + newText = std::regex_replace(callText, std::regex(methodName + " *\\( *\\) *\\-= *"), "Adjust" + methodName + "( -("); newText += ") )"; } -- cgit v1.2.3