Bug 360112

Summary: function-args-by-ref triggers on (deleted) copy ctor
Product: [Developer tools] clazy Reporter: Volker Krause <vkrause>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: smartins
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

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