diff --git a/src/libs/3rdparty/cplusplus/AST.h b/src/libs/3rdparty/cplusplus/AST.h index 60374d2e0f4..be73cab1edb 100644 --- a/src/libs/3rdparty/cplusplus/AST.h +++ b/src/libs/3rdparty/cplusplus/AST.h @@ -26,6 +26,14 @@ namespace CPlusPlus { +// clang-cl needs an export for the subclass, while msvc fails to build in debug mode if +// the export is present. +#if defined(Q_CC_CLANG) && defined(Q_CC_MSVC) +#define CPLUSPLUS_EXPORT_SUBCLASS CPLUSPLUS_EXPORT +#else +#define CPLUSPLUS_EXPORT_SUBCLASS +#endif + template class CPLUSPLUS_EXPORT List: public Managed { @@ -76,7 +84,7 @@ public: Tptr value; List *next; - class CPLUSPLUS_EXPORT ListIterator + class CPLUSPLUS_EXPORT_SUBCLASS ListIterator { List *iter;