diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-01 20:34:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-03 09:12:32 +0200 |
commit | ddef1e2c017b7d8e421dedc1a0ce722ff4208985 (patch) | |
tree | 54e52c86e4e33bcb61eee44706117b1616e99624 /compilerplugins | |
parent | 0a6d946694e4fcb39228c5e1fec58fcfd8a45989 (diff) |
add o3tl::equalsAscii
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/stringview.cxx | 7 | ||||
-rw-r--r-- | compilerplugins/clang/stringviewparam.cxx | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/compilerplugins/clang/stringview.cxx b/compilerplugins/clang/stringview.cxx index e1cac4195265..a3eb09faf97d 100644 --- a/compilerplugins/clang/stringview.cxx +++ b/compilerplugins/clang/stringview.cxx @@ -377,9 +377,10 @@ bool StringView::VisitCXXMemberCallExpr(CXXMemberCallExpr const* expr) { auto const dc = loplugin::DeclCheck(expr->getMethodDecl()); if (dc.Function("toInt32") || dc.Function("toUInt32") || dc.Function("toInt64") - || dc.Function("toDouble") || dc.Function("equalsIgnoreAsciiCase") - || dc.Function("compareToIgnoreAsciiCase") || dc.Function("trim") - || dc.Function("startsWith") || dc.Function("endsWith") || dc.Function("match")) + || dc.Function("toDouble") || dc.Function("equalsAscii") + || dc.Function("equalsIgnoreAsciiCase") || dc.Function("compareToIgnoreAsciiCase") + || dc.Function("trim") || dc.Function("startsWith") || dc.Function("endsWith") + || dc.Function("match")) { handleSubExprThatCouldBeView(expr->getImplicitObjectArgument()); } diff --git a/compilerplugins/clang/stringviewparam.cxx b/compilerplugins/clang/stringviewparam.cxx index a20691a3a4d1..dae4b9b1925f 100644 --- a/compilerplugins/clang/stringviewparam.cxx +++ b/compilerplugins/clang/stringviewparam.cxx @@ -141,7 +141,7 @@ DeclRefExpr const* relevantCXXMemberCallExpr(CXXMemberCallExpr const* expr) || n == "indexOf" || n == "lastIndexOf" || n == "compareTo" || n == "match" || n == "trim" || n == "toInt32" || n == "toUInt32" || n == "toInt64" || n == "toDouble" || n == "equalsIgnoreAsciiCase" || n == "compareToIgnoreAsciiCase" || n == "getToken" - || n == "copy") + || n == "copy" || n == "equalsAscii") { good = true; } |