PiotrZSL wrote:

@sopyb 
Check is for modernize, not performance, so:
- Add entry in documentation that due to need of copy object into 
initialization list check may cause performance degradation, add entry that 
using std::ref, std::cref is recommended in such case:
`b = std::max({std::ref(i), std::ref(j), std::ref(k)});`
- Add option - IgnoreNonTrivialTypes - set by default to true
- Add option - IgnoreTrivialTypesOfSizeAbove - set by default to 32 bytes
Options should be easy to add, check other checks.
If you want quickly deliver version 1.0, then just limit check to built-in 
types.

As for copies of large types, that's more a thing for new performance check.

https://github.com/llvm/llvm-project/pull/85572
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to