diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/clang-c/Index.h | 13 | ||||
-rw-r--r-- | include/clang/Basic/Diagnostic.h | 7 | ||||
-rw-r--r-- | include/clang/Frontend/ASTUnit.h | 1 |
3 files changed, 20 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 }; /** diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h index d30ac14e02..89ccb3e0e2 100644 --- a/include/clang/Basic/Diagnostic.h +++ b/include/clang/Basic/Diagnostic.h @@ -213,6 +213,9 @@ private: // Suppress all diagnostics. bool SuppressAllDiagnostics = false; + // Suppress non-errors from all included files. + bool SuppressNonErrorsFromIncludedFiles = false; + // Elide common types of templates. bool ElideType = true; @@ -634,6 +637,10 @@ public: } bool getSuppressAllDiagnostics() const { return SuppressAllDiagnostics; } + void setSuppressNonErrorsFromIncludedFiles(bool Val = true) { + SuppressNonErrorsFromIncludedFiles = Val; + } + /// Set type eliding, to skip outputting same types occurring in /// template types. void setElideType(bool Val = true) { ElideType = Val; } diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h index a58cf53943..88c8370c24 100644 --- a/include/clang/Frontend/ASTUnit.h +++ b/include/clang/Frontend/ASTUnit.h @@ -43,6 +43,7 @@ #include <cstddef> #include <cstdint> #include <memory> +#include <mutex> #include <string> #include <utility> #include <vector> |