[all-commits] [llvm/llvm-project] ace965: [clang-tidy] performance-unnecessary-copy-initiali...
Felix Berger via All-commits
all-commits at lists.llvm.org
Mon Nov 16 14:09:19 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: ace9653c11c6308401dcda2e8b26bf97e6e66e30
https://github.com/llvm/llvm-project/commit/ace9653c11c6308401dcda2e8b26bf97e6e66e30
Author: Felix Berger <flx at google.com>
Date: 2020-11-16 (Mon, 16 Nov 2020)
Changed paths:
M clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp
M clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-copy-initialization.cpp
Log Message:
-----------
[clang-tidy] performance-unnecessary-copy-initialization: Check for const reference arguments that are replaced template parameter type.
This fixes false positive cases where a non-const reference is passed to a
std::function but interpreted as a const reference.
Fix the definition of the fake std::function added in the test to match
std::function and make the bug reproducible.
Reviewed-by: aaron.ballman
Differential Revision: https://reviews.llvm.org/D90042
More information about the All-commits
mailing list