https://bugs.kde.org/show_bug.cgi?id=360338
Bug ID: 360338 Summary: qstring-ref check does not trigger for toFloat() calls on string temporaries Product: clazy Version: unspecified Platform: Other OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: general Assignee: unassigned-b...@kde.org Reporter: vkra...@kde.org CC: smart...@kde.org qtdeclarative/src/quick/util/qquickglobal.cpp contains example code that should trigger (s.left/mid().toFloat()), but does not. This seems to fix it: diff --git a/checks/qstringref.cpp b/checks/qstringref.cpp index 1ef8e88..45b5920 100644 --- a/checks/qstringref.cpp +++ b/checks/qstringref.cpp @@ -58,7 +58,7 @@ static bool isInterestingSecondMethod(CXXMethodDecl *method, const clang::LangOp return false; static const vector<string> list = { "compare", "contains", "count", "startsWith", "endsWith", "indexOf", - "isEmpty", "isNull", "lastIndexOf", "length", "size", "toDouble", "toInt", + "isEmpty", "isNull", "lastIndexOf", "length", "size", "toDouble", "toFloat", "toInt", "toUInt", "toULong", "toULongLong", "toUShort", "toUcs4"}; if (!clazy_std::contains(list, method->getNameAsString())) Reproducible: Always -- You are receiving this mail because: You are watching all bug changes.