Summary: | suggest simplification: `$smartpointer.data()->` to `$smartpointer->` | ||
---|---|---|---|
Product: | [Developer tools] clazy | Reporter: | Milian Wolff <mail> |
Component: | general | Assignee: | Unassigned bugs mailing-list <unassigned-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | smartins |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/sdk/clazy/commit/74686cc8c884dbcfabb12ea7a926e0eec486846d | Version Fixed In: | |
Sentry Crash Report: |
Description
Milian Wolff
2018-01-16 14:19:43 UTC
There's some gcc version that doesn't support this, but maybe old enough to ignore https://codereview.qt-project.org/#/c/230337/ is an example of gcc 4.8 nagging about missing data() Git commit 74686cc8c884dbcfabb12ea7a926e0eec486846d by Sergio Martins, on behalf of Waqar Ahmed. Committed on 23/07/2021 at 19:33. Pushed by smartins into branch 'master'. Add use-arrow-operator Suggest to use arrow operator with qt smart pointers instead of .data()->someFunc() print parent class name in warning Signed-off-by: Waqar Ahmed <waqar.17a@gmail.com> M +1 -0 CheckSources.cmake M +1 -0 ClazyTests.cmake M +7 -0 checks.json M +2 -0 src/Checks.h A +90 -0 src/checks/manuallevel/use-arrow-operator.cpp [License: LGPL (v2+)] A +39 -0 src/checks/manuallevel/use-arrow-operator.h [License: LGPL (v2+)] A +8 -0 tests/use-arrow-operator/config.json A +20 -0 tests/use-arrow-operator/main.cpp * A +3 -0 tests/use-arrow-operator/main.cpp.expected The files marked with a * at the end have a non valid license. Please read: https://community.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page. https://invent.kde.org/sdk/clazy/commit/74686cc8c884dbcfabb12ea7a926e0eec486846d |