loplugin:stringconstant: handle OUString+=OUString(literal)

Change-Id: I85a88eaca89bb2c89a3ad374be09547f9b2ed78f
This commit is contained in:
Stephan Bergmann
2015-06-26 13:54:58 +02:00
parent 46a1538d14
commit 5ed2014684

View File

@@ -357,6 +357,12 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) {
handleOUStringCtor(expr, 1, qname); handleOUStringCtor(expr, 1, qname);
return true; return true;
} }
if (qname == "rtl::OUString::operator+=" && fdecl->getNumParams() == 1) {
handleOUStringCtor(
expr, dyn_cast<CXXOperatorCallExpr>(expr) == nullptr ? 0 : 1,
qname);
return true;
}
if (qname == "rtl::OUString::equals" && fdecl->getNumParams() == 1) { if (qname == "rtl::OUString::equals" && fdecl->getNumParams() == 1) {
unsigned n; unsigned n;
bool non; bool non;