[PATCH] D107873: [WIP][clang-tidy] adds a const-qualified parameter check
Julien Marrec via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 11 08:10:28 PDT 2021
jmarrec added inline comments.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/performance-const-parameter-value-or-ref.rst:90
+Passing a ``shared_ptr`` by reference-to-``const`` is also acceptable in certain
+situaitons. As such, ``std::shared_ptr<T>`` and ``boost::shared_ptr<T>`` will
+not warn in either case by default.
----------------
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/performance-const-parameter-value-or-ref.rst:101
+
+The default value for ``SmallMaxSize`` was determined by through benchmarking
+when passing by value was no longer competetive with passing by reference for
----------------
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/performance-const-parameter-value-or-ref.rst:104
+various `boards <https://git.io/JRKGv>`_. The benchmark can be found on
+`Compiler Explorer <https://godbolt.org/z/rfW1Wqajh>`_, with the used to inform
+the threshold.
----------------
typo here, not sure what the intent was.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107873/new/
https://reviews.llvm.org/D107873
More information about the cfe-commits
mailing list