forked from qt-creator/qt-creator
Clang: Add CLANG-UPGRADE-CHECK marker
...for things to watch out on an upgrade. Change-Id: I75b77a3c8fa238939b625d084c7db220ab429319 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -169,6 +169,8 @@ void setLastSentDocumentRevision(const QString &filePath, uint revision)
|
||||
document->sendTracker().setLastSentRevision(int(revision));
|
||||
}
|
||||
|
||||
// CLANG-UPGRADE-CHECK: Workaround still needed?
|
||||
// Remove once clang reports correct columns for lines with multi-byte utf8.
|
||||
int extraUtf8CharsShift(const QString &str, int column)
|
||||
{
|
||||
int shift = 0;
|
||||
|
||||
@@ -45,6 +45,7 @@ QString clangExecutableFromSettings(Core::Id toolchainType, bool *isValid);
|
||||
|
||||
QString createFullLocationString(const Debugger::DiagnosticLocation &location);
|
||||
|
||||
// CLANG-UPGRADE-CHECK: Adapt minimum version numbers.
|
||||
class ClangExecutableVersion : public QVersionNumber {
|
||||
public:
|
||||
ClangExecutableVersion() : QVersionNumber(-1, -1, -1) {}
|
||||
|
||||
@@ -340,6 +340,7 @@ void CompilerOptionsBuilder::addMsvcCompatibilityVersion()
|
||||
|
||||
static QStringList languageFeatureMacros()
|
||||
{
|
||||
// CLANG-UPGRADE-CHECK: Update known language features macros.
|
||||
// Collected with:
|
||||
// $ CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
|
||||
// $ D:\usr\llvm-3.8.0\bin\clang++.exe -fms-compatibility-version=19 -std=c++1y -dM -E D:\empty.cpp | grep __cpp_
|
||||
@@ -389,7 +390,7 @@ void CompilerOptionsBuilder::undefineCppLanguageFeatureMacrosForMsvc2015()
|
||||
|
||||
void CompilerOptionsBuilder::addDefineFloat128ForMingw()
|
||||
{
|
||||
// TODO: Remove once this is fixed in clang >= 3.9.
|
||||
// CLANG-UPGRADE-CHECK: Workaround still needed?
|
||||
// https://llvm.org/bugs/show_bug.cgi?id=30685
|
||||
if (m_projectPart.toolchainType == ProjectExplorer::Constants::MINGW_TOOLCHAIN_TYPEID)
|
||||
addDefine("#define __float128 void");
|
||||
|
||||
@@ -110,7 +110,7 @@ isEmpty(QTC_NO_CLANG_LIBTOOLING) {
|
||||
}
|
||||
|
||||
isEmpty(LLVM_VERSION): error("Cannot determine clang version at $$LLVM_INSTALL_DIR")
|
||||
!versionIsAtLeast($$LLVM_VERSION, 3, 9, 0): {
|
||||
!versionIsAtLeast($$LLVM_VERSION, 3, 9, 0): { # CLANG-UPGRADE-CHECK: Adapt minimum version numbers.
|
||||
error("LLVM/Clang version >= 3.9.0 required, version provided: $$LLVM_VERSION")
|
||||
}
|
||||
|
||||
|
||||
@@ -161,6 +161,7 @@ void HighlightingMark::overloadedDeclRefKind(const Cursor &cursor)
|
||||
{
|
||||
types.mainHighlightingType = HighlightingType::Function;
|
||||
|
||||
// CLANG-UPGRADE-CHECK: Workaround still needed?
|
||||
// Workaround https://bugs.llvm.org//show_bug.cgi?id=33256 - SomeType in
|
||||
// "using N::SomeType" is mistakenly considered as a CXCursor_OverloadedDeclRef.
|
||||
if (cursor.overloadedDeclarationsCount() >= 1
|
||||
|
||||
Reference in New Issue
Block a user