diff --git a/config_cpu.h b/config_cpu.h
index e7e51e639..129f5e58b 100644
--- a/config_cpu.h
+++ b/config_cpu.h
@@ -203,7 +203,7 @@
/// _MSC_VER nor __BORLANDC__ are defined.
#define CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY ...
#elif defined(CRYPTOPP_MSC_VERSION) || defined(__BORLANDC__) || \
- (defined(CRYPTOPP_WIN32_AVAILABLE) && defined(CRYPTOPP_LLVM_CLANG_VERSION))
+ defined(CRYPTOPP_MSVC_CLANG_VERSION)
#define CRYPTOPP_MS_STYLE_INLINE_ASSEMBLY 1
#else
#define CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY 1
diff --git a/config_ver.h b/config_ver.h
index 876584418..50e993707 100644
--- a/config_ver.h
+++ b/config_ver.h
@@ -58,6 +58,8 @@
// LLVM Clang version 3.7. Also see https://gist.github.com/yamaya/2924292
#if defined(__clang__) && defined(__apple_build_version__)
# define CRYPTOPP_APPLE_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
+#elif defined(__clang__) && defined(_MSC_VER)
+# define CRYPTOPP_MSVC_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
#elif defined(__clang__)
# define CRYPTOPP_LLVM_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
#endif