From 5ed2014684adaeaeb6d92efb4a3d6075f5cc43c3 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 26 Jun 2015 13:54:58 +0200 Subject: loplugin:stringconstant: handle OUString+=OUString(literal) Change-Id: I85a88eaca89bb2c89a3ad374be09547f9b2ed78f --- compilerplugins/clang/stringconstant.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compilerplugins') diff --git a/compilerplugins/clang/stringconstant.cxx b/compilerplugins/clang/stringconstant.cxx index 7522641ef0b7..7cc6d9a372c5 100644 --- a/compilerplugins/clang/stringconstant.cxx +++ b/compilerplugins/clang/stringconstant.cxx @@ -357,6 +357,12 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) { handleOUStringCtor(expr, 1, qname); return true; } + if (qname == "rtl::OUString::operator+=" && fdecl->getNumParams() == 1) { + handleOUStringCtor( + expr, dyn_cast(expr) == nullptr ? 0 : 1, + qname); + return true; + } if (qname == "rtl::OUString::equals" && fdecl->getNumParams() == 1) { unsigned n; bool non; -- cgit