Bug 408871 - False positive with -Wclazy-qstring-left
Summary: False positive with -Wclazy-qstring-left
Status: REPORTED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-18 11:42 UTC by Andre Woebbeking
Modified: 2019-06-18 11:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andre Woebbeking 2019-06-18 11:42:34 UTC
Hi,

the following code

QString text;
QStringList list;
list.append(text.left(1));

gives me "warning: Use QString::at(0) instead of QString::left(1) to avoid temporary allocations". But append() needs a QString so there is no way to avoid the temporary.

I'm using clazy 1.5.

Cheers,
André