diff options
| author | Martin Hořeňovský | 2019-12-28 18:57:24 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-02-13 16:28:30 +0100 |
| commit | b009d190bf3c75754391b739c8efd80033d6e133 (patch) | |
| tree | a875075bc99da59354003f177ccf618d07811b93 | |
| parent | ac83087bc2b774e19952753112d337786bb27e85 (diff) | |
| download | catch3-b009d190bf3c75754391b739c8efd80033d6e133.tar.gz | |
Avoid detecting Clang as having MSVC's traditional preprocessor
Fixes #1806
| -rw-r--r-- | src/catch2/catch_compiler_capabilities.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/catch2/catch_compiler_capabilities.h b/src/catch2/catch_compiler_capabilities.h index 97d08faa..e9a73259 100644 --- a/src/catch2/catch_compiler_capabilities.h +++ b/src/catch2/catch_compiler_capabilities.h @@ -149,9 +149,12 @@ // MSVC traditional preprocessor needs some workaround for __VA_ARGS__ // _MSVC_TRADITIONAL == 0 means new conformant preprocessor // _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor -# if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL) -# define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -# endif +# if !defined(__clang__) // Handle Clang masquerading for msvc +# if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL) +# define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +# endif // MSVC_TRADITIONAL +# endif // __clang__ + #endif // _MSC_VER #if defined(_REENTRANT) || defined(_MSC_VER) |