diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-06-26 13:54:58 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-06-26 13:55:36 +0200 |
commit | 5ed2014684adaeaeb6d92efb4a3d6075f5cc43c3 (patch) | |
tree | 6cb667aeb05a3fb1b57ba6868749bd3ec8277394 /compilerplugins | |
parent | 46a1538d1445aa2f8b56eaf1e6ad185295753d74 (diff) |
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I85a88eaca89bb2c89a3ad374be09547f9b2ed78f
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/stringconstant.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
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<CXXOperatorCallExpr>(expr) == nullptr ? 0 : 1, + qname); + return true; + } if (qname == "rtl::OUString::equals" && fdecl->getNumParams() == 1) { unsigned n; bool non; |