Bug 408021

Summary: Warn if code contains the constant 0x9e3779b9 (hand-rolled boost::hash_combine)
Product: [Developer tools] clazy Reporter: Giuseppe D'Angelo <dangelog>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: REPORTED ---    
Severity: wishlist CC: smartins
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Giuseppe D'Angelo 2019-05-28 10:54:40 UTC
Check if the code contains the constant "0x9e3779b9".

It's VERY likely someone is hand-rolling QtPrivate::QHashCombine / boost::hash_combine. Suggest to use those instead.

E.g. https://codereview.qt-project.org/c/qt/qtbase/+/263115/4/src/network/ssl/qsslerror.cpp#b367