Restrict UnnecessaryCopyInitialization check to variables initialized from free funct...
authorFelix Berger <flx@google.com>
Tue, 15 Sep 2020 12:44:13 +0000 (08:44 -0400)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 15 Sep 2020 12:46:04 +0000 (08:46 -0400)
commit98e07b5596c8692c43770bc4e21a2b19467e35f7
tree9865b3d3541ef18f1ad9e3e309c09e6f4f247349
parentda104444fafbc8f657f06c2188ab2e8284563e3d
Restrict UnnecessaryCopyInitialization check to variables initialized from free functions without arguments

This restriction avoids cases where an alias is returned to an argument and
which could lead to to a false positive change.
clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp
clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-copy-initialization.cpp