diff options
Diffstat (limited to 'contrib/llvm-project/clang/include/clang/Basic/DiagnosticOptions.h')
-rw-r--r-- | contrib/llvm-project/clang/include/clang/Basic/DiagnosticOptions.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticOptions.h b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticOptions.h index 17533b38ff5f..099982c3bdd5 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticOptions.h +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticOptions.h @@ -46,20 +46,20 @@ enum class DiagnosticLevelMask : unsigned { }; inline DiagnosticLevelMask operator~(DiagnosticLevelMask M) { - using UT = std::underlying_type<DiagnosticLevelMask>::type; + using UT = std::underlying_type_t<DiagnosticLevelMask>; return static_cast<DiagnosticLevelMask>(~static_cast<UT>(M)); } inline DiagnosticLevelMask operator|(DiagnosticLevelMask LHS, DiagnosticLevelMask RHS) { - using UT = std::underlying_type<DiagnosticLevelMask>::type; + using UT = std::underlying_type_t<DiagnosticLevelMask>; return static_cast<DiagnosticLevelMask>( static_cast<UT>(LHS) | static_cast<UT>(RHS)); } inline DiagnosticLevelMask operator&(DiagnosticLevelMask LHS, DiagnosticLevelMask RHS) { - using UT = std::underlying_type<DiagnosticLevelMask>::type; + using UT = std::underlying_type_t<DiagnosticLevelMask>; return static_cast<DiagnosticLevelMask>( static_cast<UT>(LHS) & static_cast<UT>(RHS)); } @@ -72,9 +72,10 @@ class DiagnosticOptions : public RefCountedBase<DiagnosticOptions>{ clang::DiagnosticsEngine *, bool); friend class CompilerInvocation; + friend class CompilerInvocationBase; public: - enum TextDiagnosticFormat { Clang, MSVC, Vi }; + enum TextDiagnosticFormat { Clang, MSVC, Vi, SARIF }; // Default values. enum { @@ -84,7 +85,8 @@ public: DefaultTemplateBacktraceLimit = 10, DefaultConstexprBacktraceLimit = 10, DefaultSpellCheckingLimit = 50, - DefaultSnippetLineLimit = 1, + DefaultSnippetLineLimit = 16, + DefaultShowLineNumbers = 1, }; // Define simple diagnostic options (with no accessors). @@ -122,6 +124,10 @@ public: /// default). std::vector<std::string> VerifyPrefixes; + /// The list of -Wsystem-header-in-module=... options used to override + /// whether -Wsystem-headers is enabled on a per-module basis. + std::vector<std::string> SystemHeaderWarningsModules; + public: // Define accessors/mutators for diagnostic options of enumeration type. #define DIAGOPT(Name, Bits, Default) |