Bug 360112 - function-args-by-ref triggers on (deleted) copy ctor
Summary: function-args-by-ref triggers on (deleted) copy ctor
Status: RESOLVED FIXED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-05 10:58 UTC by Volker Krause
Modified: 2016-03-05 11:16 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 Volker Krause 2016-03-05 10:58:41 UTC
/k/qt5-dev/inst/include/QtCore/qmetatype.h:324:5: warning: Pass small and trivially-copyable type by value (const struct QtPrivate::AbstractConverterFunction &) [-Wclazy-function-args-by-ref]
    Q_DISABLE_COPY(AbstractConverterFunction)
    ^
/k/qt5-dev/inst/include/QtCore/qglobal.h:324:11: note: expanded from macro 'Q_DISABLE_COPY'
    Class(const Class &) Q_DECL_EQ_DELETE;\
          ^


Reproducible: Always



Expected Results:  
The check probably should ignore both copy ctors and deleted functions?
Comment 1 Sergio Martins 2016-03-05 11:12:05 UTC
Git commit b5e1d718ce41d3c76612c72e650c03923bf70231 by Sergio Martins.
Committed on 05/03/2016 at 11:11.
Pushed by smartins into branch 'master'.

function-args-by-ref: Don't warn for deleted functions

M  +3    -2    checks/function-args-by-ref.cpp
M  +5    -0    tests/function-args-by-ref/main.cpp
M  +5    -0    tests/function-args-by-ref/main.cpp_fixed.cpp.expected

http://commits.kde.org/clazy/b5e1d718ce41d3c76612c72e650c03923bf70231
Comment 2 Sergio Martins 2016-03-05 11:16:46 UTC
Git commit 103cd730dda8b6cfe36f514e5ee75f556cacf1a9 by Sergio Martins.
Committed on 05/03/2016 at 11:15.
Pushed by smartins into branch 'master'.

function-args-by-ref: Unit-test that we don't warn for copy-ctors

This was already the case.

M  +5    -0    tests/function-args-by-ref/main.cpp
M  +5    -0    tests/function-args-by-ref/main.cpp_fixed.cpp.expected

http://commits.kde.org/clazy/103cd730dda8b6cfe36f514e5ee75f556cacf1a9