Clang: Support skip warnings with LLVM9

+ move the macro to its single user.

Change-Id: I141357386e62f44f096ce4c50124cea8f618fb21
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Orgad Shaneh
2019-10-03 21:56:13 +03:00
committed by Orgad Shaneh
parent 83671ebdae
commit 962ca920d8
2 changed files with 2 additions and 6 deletions

View File

@@ -36,9 +36,4 @@ enum class PreferredTranslationUnit
LastUninitialized,
};
// CLANG-UPGRADE-CHECK: Remove IS_SKIPWARNINGSFROMINCLUDEDFILES_SUPPORTED
#if defined(CINDEX_VERSION_HAS_SKIPWARNINGSFROMINCLUDEDFILES_BACKPORTED)
# define IS_SKIPWARNINGSFROMINCLUDEDFILES_SUPPORTED
#endif
} // namespace ClangBackEnd

View File

@@ -179,7 +179,8 @@ uint TranslationUnitUpdater::defaultParseOptions()
| CXTranslationUnit_CreatePreambleOnFirstParse
| CXTranslationUnit_SkipFunctionBodies
| CXTranslationUnit_LimitSkipFunctionBodiesToPreamble
#ifdef IS_SKIPWARNINGSFROMINCLUDEDFILES_SUPPORTED
// CLANG-UPGRADE-CHECK: Remove when required version is 9
#if (LLVM_VERSION_MAJOR >= 9) || defined(CINDEX_VERSION_HAS_SKIPWARNINGSFROMINCLUDEDFILES_BACKPORTED)
| CXTranslationUnit_IgnoreNonErrorsFromIncludedFiles
#endif
| CXTranslationUnit_IncludeBriefCommentsInCodeCompletion