summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/changetoolsgen.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/changetoolsgen.cxx')
-rw-r--r--compilerplugins/clang/changetoolsgen.cxx4
1 files changed, 2 insertions, 2 deletions
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 += ") )";
}