summaryrefslogtreecommitdiff
path: root/src/tools/clangbackend/source/sourcelocation.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2018-04-17 11:53:55 +0200
committerNikolai Kosjar <nikolai.kosjar@qt.io>2018-05-17 12:46:37 +0000
commit319daa2612dcdd205e271cf2b4b5bf4532fad163 (patch)
treeb67dcbf4424c1cc00475b0ead75b218fb66e2942 /src/tools/clangbackend/source/sourcelocation.cpp
parentc49854f423af755191a375dc030157f929648ced (diff)
downloadqt-creator-319daa2612dcdd205e271cf2b4b5bf4532fad163.tar.gz
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>
Diffstat (limited to 'src/tools/clangbackend/source/sourcelocation.cpp')
-rw-r--r--src/tools/clangbackend/source/sourcelocation.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/tools/clangbackend/source/sourcelocation.cpp b/src/tools/clangbackend/source/sourcelocation.cpp
index 2450dcf590..7fbe8c03eb 100644
--- a/src/tools/clangbackend/source/sourcelocation.cpp
+++ b/src/tools/clangbackend/source/sourcelocation.cpp
@@ -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,