MantisBT - Doomseeker
View Issue Details
0003811Doomseeker[All Projects] Cleanuppublic2020-06-07 04:342020-06-07 20:23
WubTheCaptain 
 
nonetweakalways
confirmedopen 
1.3.1 
 
0003811: Special member functions don't have "= default;" (modernize-use-equals-default)
I'll just quote clang-tidy on this one, because of difficulty to describe it:
Quote
This check replaces default bodies of special member functions with = default;. The explicitly defaulted function declarations enable more opportunities in optimization, because the compiler might treat explicitly defaulted functions as trivial.
$ grep -r "::~" src/ | grep '{}' | wc -l
2
$ grep -r "()" src/ | grep '{}' | wc -l
24
$ grep -r "= default;" src/ | wc -l
0


I'm not sure how to handle or search for this, if applicable:
something()
{
}
'https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-equals-default.html [^]'
No tags attached.
Issue History
2020-06-07 04:34WubTheCaptainNew Issue
2020-06-07 04:35WubTheCaptainDescription Updatedbug_revision_view_page.php?rev_id=13131#r13131
2020-06-07 20:22Pol MNote Added: 0021384
2020-06-07 20:23Pol MStatusnew => confirmed

Notes
(0021384)
Pol M   
2020-06-07 20:22   
Take note that = default does not apply for user-defined functions (like the something() you mention), but yeah, go for it :)