Clang: fix CINDEX_VERSION_MINOR for clang_getFileContents

Change-Id: Id546906fb119be2415500ae13f64c2c0e1e6a81b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Ivan Donchevskii
2018-01-31 14:44:10 +01:00
parent 66d02773e7
commit b30643c4fa

View File

@@ -93,8 +93,8 @@ SourceLocation::SourceLocation(CXTranslationUnit cxTranslationUnit,
return; return;
filePath_ = ClangString(clang_getFileName(cxFile)); filePath_ = ClangString(clang_getFileName(cxFile));
// CLANG-UPGRADE-CHECK: Remove HAS_GETFILECONTENTS_BACKPORTED check once we require clang >= 6.0 // CLANG-UPGRADE-CHECK: Remove HAS_GETFILECONTENTS_BACKPORTED check once we require clang >= 7.0
#if defined(CINDEX_VERSION_HAS_GETFILECONTENTS_BACKPORTED) || CINDEX_VERSION_MINOR >= 44 #if defined(CINDEX_VERSION_HAS_GETFILECONTENTS_BACKPORTED) || CINDEX_VERSION_MINOR >= 47
if (column_ > 1) { if (column_ > 1) {
const uint lineStart = offset_ + 1 - column_; const uint lineStart = offset_ + 1 - column_;
const char *contents = clang_getFileContents(cxTranslationUnit, cxFile, nullptr); const char *contents = clang_getFileContents(cxTranslationUnit, cxFile, nullptr);