[PATCH] D106011: [clang-tidy] performance-unnecessary-copy-initialization: Disable check when variable and initializer have different replaced template param types.

Felix Berger via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 14 13:15:53 PDT 2021


flx created this revision.
flx added reviewers: aaron.ballman, ymandel, hokein.
Herald added a subscriber: xazax.hun.
flx requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

This can happen when a template with two parameter types is instantiated with a
single type. The fix would only be valid for this instantiation but fail for
others that rely on an implicit type conversion.

The test cases illustrate when the check should trigger and when not.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106011

Files:
  clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp
  clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-copy-initialization.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106011.358715.patch
Type: text/x-patch
Size: 7062 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210714/e7fd5e06/attachment.bin>


More information about the cfe-commits mailing list