From 036f963083f0416a15ada2120dec8abd9177a8af Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 12 Aug 2021 19:59:12 +0200 Subject: [PATCH] scudo: fix __attribute__((format)) The attribute should be in the header on declaration. It's almost pointless in the source file. Depends on D107977. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D107978 --- compiler-rt/lib/scudo/scudo_utils.cpp | 2 +- compiler-rt/lib/scudo/scudo_utils.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler-rt/lib/scudo/scudo_utils.cpp b/compiler-rt/lib/scudo/scudo_utils.cpp index b7ce8f9..b0aef75 100644 --- a/compiler-rt/lib/scudo/scudo_utils.cpp +++ b/compiler-rt/lib/scudo/scudo_utils.cpp @@ -39,7 +39,7 @@ extern int VSNPrintf(char *buff, int buff_length, const char *format, namespace __scudo { -FORMAT(1, 2) void NORETURN dieWithMessage(const char *Format, ...) { +void dieWithMessage(const char *Format, ...) { static const char ScudoError[] = "Scudo ERROR: "; static constexpr uptr PrefixSize = sizeof(ScudoError) - 1; // Our messages are tiny, 256 characters is more than enough. diff --git a/compiler-rt/lib/scudo/scudo_utils.h b/compiler-rt/lib/scudo/scudo_utils.h index b657c69..5a9b32f 100644 --- a/compiler-rt/lib/scudo/scudo_utils.h +++ b/compiler-rt/lib/scudo/scudo_utils.h @@ -27,7 +27,7 @@ inline Dest bit_cast(const Source& source) { return dest; } -void NORETURN dieWithMessage(const char *Format, ...); +void dieWithMessage(const char *Format, ...) NORETURN FORMAT(1, 2); bool hasHardwareCRC32(); -- 2.7.4