From 7745a25a81e013e879a30edc8257e48e19555602 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 5 Nov 2024 17:33:45 +0100 Subject: [PATCH] Add clang::lifetimebound annotation to llvm::function_ref --- llvm/include/llvm/ADT/STLFunctionalExtras.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/include/llvm/ADT/STLFunctionalExtras.h b/llvm/include/llvm/ADT/STLFunctionalExtras.h index 6f172504b3c16..3b9d40959d714 100644 --- a/llvm/include/llvm/ADT/STLFunctionalExtras.h +++ b/llvm/include/llvm/ADT/STLFunctionalExtras.h @@ -16,6 +16,7 @@ #define LLVM_ADT_STLFUNCTIONALEXTRAS_H #include "llvm/ADT/STLForwardCompat.h" +#include "llvm/Support/Compiler.h" #include #include @@ -52,7 +53,7 @@ class function_ref { template function_ref( - Callable &&callable, + Callable &&callable LLVM_LIFETIME_BOUND, // This is not the copy-constructor. std::enable_if_t, function_ref>::value> * = nullptr,