[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
Showing
- llvm/include/llvm/ADT/STLExtras.h 12 additions, 1 deletionllvm/include/llvm/ADT/STLExtras.h
- llvm/lib/AsmParser/LLParser.h 2 additions, 2 deletionsllvm/lib/AsmParser/LLParser.h
- llvm/lib/Bitcode/Reader/BitcodeReader.cpp 1 addition, 3 deletionsllvm/lib/Bitcode/Reader/BitcodeReader.cpp
- llvm/unittests/ADT/FunctionRefTest.cpp 11 additions, 0 deletionsllvm/unittests/ADT/FunctionRefTest.cpp
Loading
Please register or sign in to comment