https://bugs.kde.org/show_bug.cgi?id=391854
Bug ID: 391854 Summary: New check "Avoid duplicated QStringLiterals" Product: clazy Version: unspecified Platform: Other OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: general Assignee: unassigned-b...@kde.org Reporter: dism...@gmail.com CC: smart...@kde.org Target Milestone: --- I found two articles about QStringLiteral: https://woboq.com/blog/qstringliteral.html and http://blog.qt.io/blog/2014/06/13/qt-weekly-13-qstringliteral/. According to them there is binary overhead. For plain literals and QLatin1String, compilers try to consolidate identical literals so that they are not duplicated. For QStringLiteral, identical strings cannot be merged. It would be nice to have a check that can warn about this overhead. I am not sure which level to use to search duplicates (unit or whole project), but probably it should be possible at least mimic compiler optimization and warn about such cases. -- You are receiving this mail because: You are watching all bug changes.