diff options
author | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2019-06-11 14:14:24 +0000 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2019-06-11 14:14:24 +0000 |
commit | f155583511df18fa507d05cb4e3cf4849715f39d (patch) | |
tree | 42db21d76608a6ee55c46a6589a73389a8cd240a /include/clang-c | |
parent | 2293e82f66df72b030a0598638a0e7a8bc4be932 (diff) | |
download | clang-f155583511df18fa507d05cb4e3cf4849715f39d.tar.gz |
[libclang] Allow skipping warnings from all included files
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.
Differential Revision: https://reviews.llvm.org/D48116
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363067 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang-c')
-rw-r--r-- | include/clang-c/Index.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h index a5ed91dd1c..07e71bd48d 100644 --- a/include/clang-c/Index.h +++ b/include/clang-c/Index.h @@ -32,7 +32,7 @@ * compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable. */ #define CINDEX_VERSION_MAJOR 0 -#define CINDEX_VERSION_MINOR 58 +#define CINDEX_VERSION_MINOR 59 #define CINDEX_VERSION_ENCODE(major, minor) ( \ ((major) * 10000) \ @@ -1346,7 +1346,17 @@ enum CXTranslationUnit_Flags { /** * Used to indicate that implicit attributes should be visited. */ - CXTranslationUnit_VisitImplicitAttributes = 0x2000 + CXTranslationUnit_VisitImplicitAttributes = 0x2000, + + /** + * 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 = 0x4000 }; /** |