Bug 431870 - Proposal: Split range-loop check
Summary: Proposal: Split range-loop check
Status: RESOLVED FIXED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Christian Schärf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-21 12:31 UTC by Christian Schärf
Modified: 2021-02-22 19:57 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 Christian Schärf 2021-01-21 12:31:12 UTC
As of now, the range-loop checks warns about range-based for loops

* over non-const Qt containers that may detach, such as:
* where non-trivial types are accessed by value instead of const reference

I propose to split the check in two so these cases can be selected individually.

Thoughts?
Comment 1 Sergio Martins 2021-02-07 13:02:04 UTC
sounds good
Comment 2 Sergio Martins 2021-02-07 13:02:51 UTC
can you provide a patch ?
Comment 3 Christian Schärf 2021-02-21 21:05:36 UTC
(In reply to Sergio Martins from comment #2)
> can you provide a patch ?

I have opened a MR: https://invent.kde.org/sdk/clazy/-/merge_requests/35
Comment 4 Sergio Martins 2021-02-22 10:50:19 UTC
thanks, will check it soon!
Comment 5 Sergio Martins 2021-02-22 19:57:23 UTC
Git commit 83425dc3aada18a2046b5f33469d41a3a25838cb by Sergio Martins.
Committed on 22/02/2021 at 19:56.
Pushed by smartins into branch 'master'.

README: Add Christian Schärf to list of contributors

M  +1    -0    README.md

https://invent.kde.org/sdk/clazy/commit/83425dc3aada18a2046b5f33469d41a3a25838cb