forked from qt-creator/qt-creator
ProjectExplorer: Move built-in parser workarounds to built-in code model
...so that only the built-in code model parser sees them, but not the clang code model, which has problems with them. The specific case here is due to definition of __int32: winnt.h:3077:1: error: functions that differ only in their return type cannot be overloaded intrin.h:357:31: note: previous declaration is here While moving, drop __MSVCRT__, which seems to be a predefined macro of ancient MSVC versions, see https://sourceforge.net/p/mpg123/mailman/mpg123-devel/?viewmonth=201010&viewday=24 Change-Id: I4b8c49ed4bdc942a2190dbae3c260f3a1a8078a4 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -208,7 +208,14 @@ const char pp_configuration[] =
|
||||
"#define __finally\n"
|
||||
"#define __inline inline\n"
|
||||
"#define __forceinline inline\n"
|
||||
"#define __pragma(x)\n";
|
||||
"#define __pragma(x)\n"
|
||||
"#define __w64\n"
|
||||
"#define __int64 long long\n"
|
||||
"#define __int32 long\n"
|
||||
"#define __int16 short\n"
|
||||
"#define __int8 char\n"
|
||||
"#define __ptr32\n"
|
||||
"#define __ptr64\n";
|
||||
|
||||
QSet<QString> CppModelManager::timeStampModifiedFiles(const QList<Document::Ptr> &documentsToCheck)
|
||||
{
|
||||
|
@@ -270,23 +270,10 @@ bool AbstractMsvcToolChain::canClone() const
|
||||
}
|
||||
|
||||
// Function must be thread-safe!
|
||||
QByteArray AbstractMsvcToolChain::msvcPredefinedMacros(const QStringList cxxflags,
|
||||
const Utils::Environment& env) const
|
||||
QByteArray AbstractMsvcToolChain::msvcPredefinedMacros(const QStringList,
|
||||
const Utils::Environment&) const
|
||||
{
|
||||
Q_UNUSED(cxxflags);
|
||||
Q_UNUSED(env);
|
||||
|
||||
static const QByteArray predefinedMacros(
|
||||
"#define __MSVCRT__\n"
|
||||
"#define __w64\n"
|
||||
"#define __int64 long long\n"
|
||||
"#define __int32 long\n"
|
||||
"#define __int16 short\n"
|
||||
"#define __int8 char\n"
|
||||
"#define __ptr32\n"
|
||||
"#define __ptr64\n");
|
||||
|
||||
return predefinedMacros;
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
bool AbstractMsvcToolChain::generateEnvironmentSettings(const Utils::Environment &env,
|
||||
|
@@ -409,7 +409,7 @@ static QByteArray msvcCompilationFile()
|
||||
QByteArray MsvcToolChain::msvcPredefinedMacros(const QStringList cxxflags,
|
||||
const Utils::Environment &env) const
|
||||
{
|
||||
QByteArray predefinedMacros = AbstractMsvcToolChain::msvcPredefinedMacros(cxxflags, env);
|
||||
QByteArray predefinedMacros;
|
||||
|
||||
QStringList toProcess;
|
||||
foreach (const QString &arg, cxxflags) {
|
||||
|
Reference in New Issue
Block a user