From fe43c2d18f18276c548523f058bccce7ad4aa53b Mon Sep 17 00:00:00 2001 From: Wim Leflere Date: Sun, 11 Apr 2021 15:15:37 +0200 Subject: [PATCH] Fix: clang-cl build (#9018) Remove macro redefinitions Add final and fallthrough attributes for clang-cl --- src/stdafx.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/stdafx.h b/src/stdafx.h index 42a6106e8a..6ca183a9ce 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -112,7 +112,7 @@ #endif /* Stuff for GCC */ -#if defined(__GNUC__) || defined(__clang__) +#if defined(__GNUC__) || (defined(__clang__) && !defined(_MSC_VER)) # define NORETURN __attribute__ ((noreturn)) # define CDECL # define __int64 long long @@ -195,14 +195,10 @@ # define CDECL _cdecl # define WARN_FORMAT(string, args) -# ifndef __clang__ -# define FINAL sealed -# else -# define FINAL -# endif +# define FINAL final /* fallthrough attribute, VS 2017 */ -# if (_MSC_VER >= 1910) +# if (_MSC_VER >= 1910) || defined(__clang__) # define FALLTHROUGH [[fallthrough]] # else # define FALLTHROUGH