[all-commits] [llvm/llvm-project] 4cae62: [ADT] function_ref's constructor is unavailable if...

Sam McCall via All-commits all-commits at lists.llvm.org
Wed Oct 7 07:31:37 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4cae6228d129d4c4dfb156c043977bb6b5690031
      https://github.com/llvm/llvm-project/commit/4cae6228d129d4c4dfb156c043977bb6b5690031
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2020-10-07 (Wed, 07 Oct 2020)

  Changed paths:
    M llvm/include/llvm/ADT/STLExtras.h
    M llvm/lib/AsmParser/LLParser.h
    M llvm/lib/Bitcode/Reader/BitcodeReader.cpp
    M llvm/unittests/ADT/FunctionRefTest.cpp

  Log Message:
  -----------
  [ADT] function_ref's constructor is unavailable if the argument is not callable.

This allows overload sets containing function_ref arguments to work correctly
Otherwise they're ambiguous as anything "could be" converted to a function_ref.

This matches proposed std::function_ref, absl::function_ref, etc.

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




More information about the All-commits mailing list