[PATCH] D52727: [clang-tidy] White List Option for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 1 08:58:36 PDT 2018


baloghadamsoftware created this revision.
baloghadamsoftware added reviewers: flx, alexfh, aaron.ballman, lebedev.ri.
baloghadamsoftware added a project: clang-tools-extra.

New option added to these three checks to be able to silence false positives on types that are intentionally passed by value or copied. Such types are e.g. intrusive reference counting pointer types like `llvm::IntrusiveRefCntPtr`. The new option is named `WhiteListTypes` and can contain a semicolon-separated list of names of these types. Regular expressions are allowed. Default is empty.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D52727

Files:
  clang-tidy/performance/ForRangeCopyCheck.cpp
  clang-tidy/performance/ForRangeCopyCheck.h
  clang-tidy/performance/UnnecessaryCopyInitialization.cpp
  clang-tidy/performance/UnnecessaryCopyInitialization.h
  clang-tidy/performance/UnnecessaryValueParamCheck.cpp
  clang-tidy/performance/UnnecessaryValueParamCheck.h
  docs/clang-tidy/checks/performance-for-range-copy.rst
  docs/clang-tidy/checks/performance-unnecessary-copy-initialization.rst
  docs/clang-tidy/checks/performance-unnecessary-value-param.rst
  test/clang-tidy/performance-for-range-copy.cpp
  test/clang-tidy/performance-unnecessary-copy-initialization.cpp
  test/clang-tidy/performance-unnecessary-value-param.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52727.167746.patch
Type: text/x-patch
Size: 15560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181001/8be0c748/attachment.bin>


More information about the cfe-commits mailing list