From b62a976d20c5c5b186a9888a34e8557ee59f046d Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Wed, 10 Aug 2016 13:18:10 -0700 Subject: [PATCH] Mark FormatArg::error as noreturn Summary: Because, if no inlining is enabled, the absence of this attribute caused compile errors due to functions that were expected to return a value not returning a value. Reviewed By: meyering Differential Revision: D3698413 fbshipit-source-id: 8f3505b17a2fa7b9710e3fb56d18c6ca00feacb3 --- folly/FormatArg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/FormatArg.h b/folly/FormatArg.h index 6f25299e..701654b3 100644 --- a/folly/FormatArg.h +++ b/folly/FormatArg.h @@ -211,7 +211,7 @@ inline std::string FormatArg::errorStr(Args&&... args) const { } template -inline void FormatArg::error(Args&&... args) const { +[[noreturn]] inline void FormatArg::error(Args&&... args) const { throw BadFormatArg(errorStr(std::forward(args)...)); } -- 2.34.1