diff --git a/src/shared/cplusplus/Parser.cpp b/src/shared/cplusplus/Parser.cpp
index c3f2016060bc391710c9ef25e9bbe1f57afe2361..1155f1c09fe5855ed12096b70d7524c501c16f0c 100644
--- a/src/shared/cplusplus/Parser.cpp
+++ b/src/shared/cplusplus/Parser.cpp
@@ -56,7 +56,7 @@
 #include "QtContextKeywords.h"
 #include <cstdio> // for putchar
 
-#ifndef _MSC_VER
+#ifdef _MSC_VER
 #    define va_copy(dst, src) ((dst) = (src))
 #endif
 
diff --git a/src/shared/cplusplus/TranslationUnit.cpp b/src/shared/cplusplus/TranslationUnit.cpp
index aac76ebdff1af8c46348b03f6ec8af69297d1e10..232b42a72230f9d4b430f911468083b0eb51e6c3 100644
--- a/src/shared/cplusplus/TranslationUnit.cpp
+++ b/src/shared/cplusplus/TranslationUnit.cpp
@@ -58,7 +58,7 @@
 #include <cstdarg>
 #include <algorithm>
 
-#ifndef _MSC_VER
+#ifdef _MSC_VER
 #    define va_copy(dst, src) ((dst) = (src))
 #endif