From 113cfa0772d4efe006fecf040ef3ed15e31b807e Mon Sep 17 00:00:00 2001 From: Tim Shen Date: Wed, 10 Aug 2016 22:35:38 +0000 Subject: [ADT] Move LLVM_ATTRIBUTE_UNUSED_RESULT to the function, otherwise gcc 4.8 complains about it. It's a fix for the original patch r278251. llvm-svn: 278298 --- llvm/include/llvm/ADT/ScopeExit.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm') diff --git a/llvm/include/llvm/ADT/ScopeExit.h b/llvm/include/llvm/ADT/ScopeExit.h index 6786a61c0bf..28a1124773d 100644 --- a/llvm/include/llvm/ADT/ScopeExit.h +++ b/llvm/include/llvm/ADT/ScopeExit.h @@ -23,7 +23,7 @@ namespace llvm { namespace detail { -template class LLVM_ATTRIBUTE_UNUSED_RESULT scope_exit { +template class scope_exit { Callable ExitFunction; public: @@ -44,7 +44,7 @@ public: // Interface is specified by p0052r2. template detail::scope_exit::type> -make_scope_exit(Callable &&F) { + LLVM_ATTRIBUTE_UNUSED_RESULT make_scope_exit(Callable &&F) { return detail::scope_exit::type>( std::forward(F)); } -- cgit v1.2.3