[PATCH] D52315: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy
Jonas Toth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 20 10:22:20 PDT 2018
JonasToth added inline comments.
================
Comment at: clang-tidy/utils/TypeTraits.cpp:47
+
+ // Do not consider "expensive to copy" types not greater than a pointer
+ if (Context.getTypeSize(Type) <= Context.getTypeSize(Context.VoidPtrTy))
----------------
Please make that comment a sentence, and maybe don't use `not` twice.
What do you think about making this parameter configurable and/or set it in relation to the size of a cache-line.
This is of course target dependent, but given the CPU effects more accurate.
https://reviews.llvm.org/D52315
More information about the cfe-commits
mailing list