forked from qt-creator/qt-creator
Clang: Require LLVM/Clang >= 5.0.0
...for the code model parts and declare 5.0 as the supported version for the clang static analyzer. Adapt versions and tests, remove code assuming clang <= 5.0. LLVM/Clang 5 was released on 07 Sep 2017. Task-number: QTCREATORBUG-18931 Task-number: QTCREATORBUG-18657 Task-number: QTCREATORBUG-17187 Task-number: QTCREATORBUG-14881 Change-Id: I53b00258ca06a1d2e57f9379dacc54b310687295 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -36,9 +36,4 @@ enum class PreferredTranslationUnit
|
||||
LastUninitialized,
|
||||
};
|
||||
|
||||
// CLANG-UPGRADE-CHECK: Remove IS_SUSPEND_SUPPORTED once we require clang >= 5.0
|
||||
#if defined(CINDEX_VERSION_HAS_BACKPORTED_SUSPEND) || CINDEX_VERSION_MINOR >= 41
|
||||
# define IS_SUSPEND_SUPPORTED
|
||||
#endif
|
||||
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -64,7 +64,6 @@ void categorizeHotColdDocuments(int hotDocumentsSize,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef IS_SUSPEND_SUPPORTED
|
||||
static int hotDocumentsSize()
|
||||
{
|
||||
static int hotDocuments = -1;
|
||||
@@ -108,17 +107,11 @@ static bool isResumable(const Document &document)
|
||||
&& document.isVisibleInEditor();
|
||||
}
|
||||
|
||||
#endif // IS_SUSPEND_SUPPORTED
|
||||
|
||||
SuspendResumeJobs createSuspendResumeJobs(const std::vector<Document> &documents,
|
||||
int customHotDocumentSize)
|
||||
{
|
||||
Q_UNUSED(documents);
|
||||
Q_UNUSED(customHotDocumentSize);
|
||||
|
||||
SuspendResumeJobs jobs;
|
||||
|
||||
#ifdef IS_SUSPEND_SUPPORTED
|
||||
std::vector<Document> hotDocuments;
|
||||
std::vector<Document> coldDocuments;
|
||||
|
||||
@@ -134,7 +127,6 @@ SuspendResumeJobs createSuspendResumeJobs(const std::vector<Document> &documents
|
||||
const std::vector<Document> toResume = Utils::filtered(hotDocuments, &isResumable);
|
||||
for (const Document &document : toResume)
|
||||
jobs += createJobs(document, JobRequest::Type::ResumeDocument);
|
||||
#endif // IS_SUSPEND_SUPPORTED
|
||||
|
||||
return jobs;
|
||||
}
|
||||
|
||||
@@ -108,12 +108,7 @@ TranslationUnitUpdateResult TranslationUnit::reparse(
|
||||
|
||||
bool TranslationUnit::suspend() const
|
||||
{
|
||||
#ifdef IS_SUSPEND_SUPPORTED
|
||||
return clang_suspendTranslationUnit(cxTranslationUnit());
|
||||
#else
|
||||
QTC_CHECK(false && "clang_suspendTranslationUnit() not supported.");
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
TranslationUnit::CodeCompletionResult TranslationUnit::complete(
|
||||
|
||||
Reference in New Issue
Block a user