From 83a63c7914365a5f3d1b0bb4f7418bd7c4f6f4b9 Mon Sep 17 00:00:00 2001 From: Ivan Donchevskii Date: Wed, 24 Oct 2018 09:46:38 +0200 Subject: [PATCH] Clang: Go through CLANG-UPGRADE-CHECK Change-Id: Iaaaea598d020a44bcdc60a8d06ee28a1f28386bb Reviewed-by: Nikolai Kosjar --- src/plugins/cpptools/compileroptionsbuilder.cpp | 2 ++ src/tools/clangbackend/source/clangbackend_global.h | 2 +- tests/unit/unittest/tokenprocessor-test.cpp | 3 +-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp index 1dbcff2e030..e01a10aecf1 100644 --- a/src/plugins/cpptools/compileroptionsbuilder.cpp +++ b/src/plugins/cpptools/compileroptionsbuilder.cpp @@ -503,6 +503,7 @@ static QStringList languageFeatureMacros() QLatin1String("__cpp_exceptions"), QLatin1String("__cpp_fold_expressions"), QLatin1String("__cpp_generic_lambdas"), + QLatin1String("__cpp_guaranteed_copy_elision"), QLatin1String("__cpp_hex_float"), QLatin1String("__cpp_if_constexpr"), QLatin1String("__cpp_inheriting_constructors"), @@ -514,6 +515,7 @@ static QStringList languageFeatureMacros() QLatin1String("__cpp_nested_namespace_definitions"), QLatin1String("__cpp_noexcept_function_type"), QLatin1String("__cpp_nontype_template_args"), + QLatin1String("__cpp_nontype_template_parameter_auto"), QLatin1String("__cpp_nsdmi"), QLatin1String("__cpp_range_based_for"), QLatin1String("__cpp_raw_strings"), diff --git a/src/tools/clangbackend/source/clangbackend_global.h b/src/tools/clangbackend/source/clangbackend_global.h index 5c27224ae4b..bca0937d592 100644 --- a/src/tools/clangbackend/source/clangbackend_global.h +++ b/src/tools/clangbackend/source/clangbackend_global.h @@ -51,7 +51,7 @@ enum class PreferredTranslationUnit # define IS_LIMITSKIPFUNCTIONBODIESTOPREAMBLE_SUPPORTED #endif -// CLANG-UPGRADE-CHECK: Remove IS_SKIPWARNINGSFROMINCLUDEDFILES_SUPPORTED once we require clang >= 7.0 +// CLANG-UPGRADE-CHECK: Remove IS_SKIPWARNINGSFROMINCLUDEDFILES_SUPPORTED #if defined(CINDEX_VERSION_HAS_SKIPWARNINGSFROMINCLUDEDFILES_BACKPORTED) # define IS_SKIPWARNINGSFROMINCLUDEDFILES_SUPPORTED #endif diff --git a/tests/unit/unittest/tokenprocessor-test.cpp b/tests/unit/unittest/tokenprocessor-test.cpp index c907517937c..a9cc385a24b 100644 --- a/tests/unit/unittest/tokenprocessor-test.cpp +++ b/tests/unit/unittest/tokenprocessor-test.cpp @@ -1485,8 +1485,7 @@ TEST_F(TokenProcessor, PreprocessorInclusionDirectiveWithKeyword) ASSERT_THAT(infos[3], HasOnlyType(HighlightingType::StringLiteral)); } -// CLANG-UPGRADE-CHECK: Enable once https://bugs.llvm.org//show_bug.cgi?id=12972 is resolved. -TEST_F(TokenProcessor, DISABLED_VariableInOperatorFunctionCall) +TEST_F(TokenProcessor, VariableInOperatorFunctionCall) { const auto infos = translationUnit.tokenInfosInRange(sourceRange(566, 12));