Skip to content

Commit b037bce

Browse files
authored
Add LLVM_GSL_POINTER to llvm::function_ref. (#120699)
This can enable clang to detect dangling assignment issues, see #120698.
1 parent 70ab81b commit b037bce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/include/llvm/ADT/STLFunctionalExtras.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ namespace llvm {
3636
/// a function_ref.
3737
template<typename Fn> class function_ref;
3838

39-
template<typename Ret, typename ...Params>
40-
class function_ref<Ret(Params...)> {
39+
template <typename Ret, typename... Params>
40+
class LLVM_GSL_POINTER function_ref<Ret(Params...)> {
4141
Ret (*callback)(intptr_t callable, Params ...params) = nullptr;
4242
intptr_t callable;
4343

0 commit comments

Comments
 (0)