Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 449 Bytes

README-auto-unexpected-qstringbuilder.md

File metadata and controls

16 lines (11 loc) · 449 Bytes

auto-unexpected-qstringbuilder

Finds places where auto is deduced to be QStringBuilder instead of QString, which introduces crashes. Also warns for lambdas returning QStringBuilder.

Example

#define QT_USE_QSTRINGBUILDER
#include <QtCore/QString>
(...)
const auto path = "hello " +  QString::fromLatin1("world");
qDebug() << path; // CRASH

Fixits

export CLAZY_FIXIT="fix-auto-unexpected-qstringbuilder"