forked from qt-creator/qt-creator
		
	Clang*: Workaround parsing mingw's <type_traits> with clang 3.9
...for -std=gnu++0x. Define the unknown identifier/type "__float128" so at least the headers can be parsed successfully. Of course this does not help for parsing client code referencing that identifier, but this should be the less common case. Task-number: QTCREATORBUG-17126 Change-Id: Id321311713029d8aa77e068b02361d86debfada6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
		@@ -368,6 +368,14 @@ void CompilerOptionsBuilder::undefineCppLanguageFeatureMacrosForMsvc2015()
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CompilerOptionsBuilder::addDefineFloat128ForMingw()
 | 
			
		||||
{
 | 
			
		||||
    // TODO: Remove once this is fixed in clang >= 3.9.
 | 
			
		||||
    // https://llvm.org/bugs/show_bug.cgi?id=30685
 | 
			
		||||
    if (m_projectPart.toolchainType == ProjectExplorer::Constants::MINGW_TOOLCHAIN_TYPEID)
 | 
			
		||||
        addDefine("#define __float128 void");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QString CompilerOptionsBuilder::includeOption() const
 | 
			
		||||
{
 | 
			
		||||
    return QLatin1String("-I");
 | 
			
		||||
 
 | 
			
		||||
@@ -58,6 +58,8 @@ public:
 | 
			
		||||
    void addMsvcCompatibilityVersion();
 | 
			
		||||
    void undefineCppLanguageFeatureMacrosForMsvc2015();
 | 
			
		||||
 | 
			
		||||
    void addDefineFloat128ForMingw();
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
    virtual bool excludeDefineDirective(const QByteArray &defineDirective) const;
 | 
			
		||||
    virtual bool excludeHeaderPath(const QString &headerPath) const;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user