forked from qt-creator/qt-creator
Clang: Require LLVM/Clang >= 6.0.0
Adapt versions and tests, remove code assuming clang < 6.0. Switch also to our custom repositories instead of dealing with patch files. LLVM/Clang 6 was released on 09 Mar 2018. Task-number: QTCREATORBUG-18535 Task-number: QTCREATORBUG-18552 Change-Id: I0ec2c2f56265e161ae7cbb5b03e7b8a182ba6cc6 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -163,8 +163,7 @@ static const char *builtinTypeToText(CXTypeKind kind)
|
||||
|
||||
// https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html
|
||||
case CXType_Float128: return "__float128";
|
||||
// CLANG-UPGRADE-CHECK: CXType_Float16 available with >= clang-6.0:
|
||||
// case CXType_Float16: return "_Float16";
|
||||
case CXType_Float16: return "_Float16";
|
||||
|
||||
// https://www.khronos.org/registry/OpenCL/sdk/2.1/docs/man/xhtml/scalarDataTypes.html
|
||||
case CXType_Half:
|
||||
|
||||
@@ -93,8 +93,6 @@ SourceLocation::SourceLocation(CXTranslationUnit cxTranslationUnit,
|
||||
return;
|
||||
|
||||
filePath_ = ClangString(clang_getFileName(cxFile));
|
||||
// CLANG-UPGRADE-CHECK: Remove HAS_GETFILECONTENTS_BACKPORTED check once we require clang >= 7.0
|
||||
#if defined(CINDEX_VERSION_HAS_GETFILECONTENTS_BACKPORTED) || CINDEX_VERSION_MINOR >= 47
|
||||
if (column_ > 1) {
|
||||
const uint lineStart = offset_ + 1 - column_;
|
||||
const char *contents = clang_getFileContents(cxTranslationUnit, cxFile, nullptr);
|
||||
@@ -106,7 +104,6 @@ SourceLocation::SourceLocation(CXTranslationUnit cxTranslationUnit,
|
||||
column_ = static_cast<uint>(QString::fromUtf8(&contents[lineStart],
|
||||
static_cast<int>(column_)).size());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
SourceLocation::SourceLocation(CXTranslationUnit cxTranslationUnit,
|
||||
|
||||
Reference in New Issue
Block a user