[all-commits] [llvm/llvm-project] 1c1f79: Always allow std::function to be copied.

Felix Berger via All-commits all-commits at lists.llvm.org
Wed Oct 21 14:23:35 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1c1f794c2b645ba33a98f0359bc9d30bbef89920
      https://github.com/llvm/llvm-project/commit/1c1f794c2b645ba33a98f0359bc9d30bbef89920
  Author: Felix Berger <flx at google.com>
  Date:   2020-10-21 (Wed, 21 Oct 2020)

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

  Log Message:
  -----------
  Always allow std::function to be copied.

Since its call operator is const but can modify the state of its underlying
functor we cannot tell whether the copy is necessary or not.

This avoids false positives.

Reviewed-by: aaron.ballman, gribozavr2

Differential Revision: https://reviews.llvm.org/D89332




More information about the All-commits mailing list