Bug 458797 - Applying copyable-polymorphic fixit introduces compiler warning
Summary: Applying copyable-polymorphic fixit introduces compiler warning
Status: REPORTED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-06 15:49 UTC by a.saoutkin
Modified: 2022-09-06 15:57 UTC (History)
1 user (show)

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


Attachments
Expected diff produced by the fixit (438 bytes, patch)
2022-09-06 15:49 UTC, a.saoutkin
Details
Actual diff produced by the fixit (439 bytes, patch)
2022-09-06 15:50 UTC, a.saoutkin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description a.saoutkin 2022-09-06 15:49:52 UTC
Created attachment 151869 [details]
Expected diff produced by the fixit

SUMMARY
Applying the copyable-polymorphic fixit ironically introduces a compiler warning.

STEPS TO REPRODUCE
1. git clone https://invent.kde.org/system/kio-fuse
2. git reset --hard fbd09a339f9880fe8d018001d4d2561593f90530
3. export CLAZY_EXPORT_FIXES=ON && export CLAZY_CHECKS="copyable-polymorphic"
4. mkdir build && cd build && cmake .. -DCMAKE_CXX_COMPILER=clazy && make
4. clang-apply-replacements ..
5. make

OBSERVED RESULT
diff titled "actual.patch", which produces the following warning when built:
kiofusenode.h:44:2: warning: explicitly defaulted default constructor is implicitly deleted [-Wdefaulted-function-deleted]
        KIOFuseDirNode() = default;

EXPECTED RESULT
diff titled "expected.patch", which produces no warning when built

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 22.04
(available in About System)
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Clazy Version: 1.11
Ubuntu clang version 14.0.0-1ubuntu1
ADDITIONAL INFORMATION
Comment 1 a.saoutkin 2022-09-06 15:50:30 UTC
Created attachment 151870 [details]
Actual diff produced by the fixit
Comment 2 a.saoutkin 2022-09-06 15:57:49 UTC
Looking deeper, seems that not doing what is currently done can produce compiler errors. In my case, it doesn't so no need to add a default constructor. I wonder if there's a sane middle ground here.