Qt-AutoUnexpectedQStringbuilder¶
Finds places where QStringBuilder is deduced instead of QString, which introduces crashes
Required inputs: IR
QStringBuilder is deduced instead of
QString for auto or lambda return values.Example:
#define QT_USE_QSTRINGBUILDER
#include <QtCore/QString>
(...)
const auto path = "hello " + QString::fromLatin1("world");
qDebug() << path; // CRASH
This rule is based on clazy rule auto-unexpected-qstringbuilder
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
auto_qstringbuilder |
Type for “auto” deduced to be QStringBuilder instead of QString. Possible crash. |
None |
False |
lambda_return_qstringbuilder |
Lambda return type deduced to be QStringBuilder instead of QString. Possible crash. |
None |
False |
Options¶
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
level¶
level : int = 1