[all-commits] [llvm/llvm-project] cbce88: FunctionRef: Strip cv qualifiers in the converting...

David Blaikie via All-commits all-commits at lists.llvm.org
Fri Mar 27 16:34:31 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cbce88dd3a9ea7161da3c57749cf03873dc7ea79
      https://github.com/llvm/llvm-project/commit/cbce88dd3a9ea7161da3c57749cf03873dc7ea79
  Author: David Blaikie <dblaikie at gmail.com>
  Date:   2020-03-27 (Fri, 27 Mar 2020)

  Changed paths:
    M llvm/include/llvm/ADT/STLExtras.h
    M llvm/unittests/ADT/FunctionRefTest.cpp

  Log Message:
  -----------
  FunctionRef: Strip cv qualifiers in the converting constructor

Without this some instances of copy construction would use the
converting constructor & lead to the destination function_ref referring
to the source function_ref instead of the underlying functor.

Discovered in feedback from 857bf5da35af8e1f9425e1865dab5f5fce5e38f2

Thanks to Johannes Doerfert, Arthur O'Dwyer, and Richard Smith for the
discussion and debugging.




More information about the All-commits mailing list