diff options
author | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2018-06-13 09:48:32 +0200 |
---|---|---|
committer | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-10-02 06:30:13 +0000 |
commit | 518cdebf02e01588cb18760aa39bd34f9df75f78 (patch) | |
tree | bd7646ccc52d6f4665dc520824cadd0b32e52b67 /include/clang-c/Index.h | |
parent | 9e8237e257bcff8dbf501994837cf8e7b94591e5 (diff) |
[libclang] Allow skipping warnings from all included files
------------------------------------------------------------------
* https://reviews.llvm.org/D48116
------------------------------------------------------------------
Depending on the included files and the used warning flags, e.g. -
Weverything, a huge number of warnings can be reported for included
files. As processing that many diagnostics comes with a performance
impact and not all clients are interested in those diagnostics, add a
flag to skip them.
This is a cherry pick from commit cc84b351940f2aa9177d0cb83e827be06f219d8f
Change-Id: Ia738a9382b43d210046bff68b3be8cb9dd89206f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'include/clang-c/Index.h')
-rw-r--r-- | include/clang-c/Index.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h index 65dada38b0..0dce9f2f27 100644 --- a/include/clang-c/Index.h +++ b/include/clang-c/Index.h @@ -33,6 +33,7 @@ */ #define CINDEX_VERSION_MAJOR 0 #define CINDEX_VERSION_MINOR 49 +#define CINDEX_VERSION_HAS_SKIPWARNINGSFROMINCLUDEDFILES_BACKPORTED #define CINDEX_VERSION_ENCODE(major, minor) ( \ ((major) * 10000) \ @@ -1332,7 +1333,17 @@ enum CXTranslationUnit_Flags { * * The function bodies of the main file are not skipped. */ - CXTranslationUnit_LimitSkipFunctionBodiesToPreamble = 0x800 + CXTranslationUnit_LimitSkipFunctionBodiesToPreamble = 0x800, + + /** + * Used to indicate that non-errors from included files should be ignored. + * + * If set, clang_getDiagnosticSetFromTU() will not report e.g. warnings from + * included files anymore. This speeds up clang_getDiagnosticSetFromTU() for + * the case where these warnings are not of interest, as for an IDE for + * example, which typically shows only the diagnostics in the main file. + */ + CXTranslationUnit_IgnoreNonErrorsFromIncludedFiles = 0x1000 }; /** |