Warning, /include/clang/Basic/DiagnosticOptions.def is written in an unsupported language. File is not indexed.
0001 //===--- DiagOptions.def - Diagnostic option database ------------- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file defines the diagnostic options. Users of this file
0010 // must define the DIAGOPT macro to make use of this information.
0011 // Optionally, the user may also define ENUM_DIAGOPT (for options
0012 // that have enumeration type and VALUE_DIAGOPT (for options that
0013 // describe a value rather than a flag). The SEMANTIC_* variants of these macros
0014 // indicate options that affect the processing of the program, rather than
0015 // simply the output.
0016 //
0017 //===----------------------------------------------------------------------===//
0018 #ifndef DIAGOPT
0019 # error Define the DIAGOPT macro to handle language options
0020 #endif
0021
0022 #ifndef VALUE_DIAGOPT
0023 # define VALUE_DIAGOPT(Name, Bits, Default) \
0024 DIAGOPT(Name, Bits, Default)
0025 #endif
0026
0027 #ifndef ENUM_DIAGOPT
0028 # define ENUM_DIAGOPT(Name, Type, Bits, Default) \
0029 DIAGOPT(Name, Bits, Default)
0030 #endif
0031
0032 #ifndef SEMANTIC_DIAGOPT
0033 # define SEMANTIC_DIAGOPT(Name, Bits, Default) DIAGOPT(Name, Bits, Default)
0034 #endif
0035
0036 #ifndef SEMANTIC_VALUE_DIAGOPT
0037 # define SEMANTIC_VALUE_DIAGOPT(Name, Bits, Default) \
0038 VALUE_DIAGOPT(Name, Bits, Default)
0039 #endif
0040
0041 #ifndef SEMANTIC_ENUM_DIAGOPT
0042 # define SEMANTIC_ENUM_DIAGOPT(Name, Type, Bits, Default) \
0043 ENUM_DIAGOPT(Name, Type, Bits, Default)
0044 #endif
0045
0046 SEMANTIC_DIAGOPT(IgnoreWarnings, 1, 0) /// -w
0047 DIAGOPT(NoRewriteMacros, 1, 0) /// -Wno-rewrite-macros
0048 DIAGOPT(Pedantic, 1, 0) /// -pedantic
0049 DIAGOPT(PedanticErrors, 1, 0) /// -pedantic-errors
0050 DIAGOPT(ShowLine, 1, 1) /// Show line number on diagnostics.
0051 DIAGOPT(ShowColumn, 1, 1) /// Show column number on diagnostics.
0052 DIAGOPT(ShowLocation, 1, 1) /// Show source location information.
0053 DIAGOPT(ShowLevel, 1, 1) /// Show diagnostic level.
0054 DIAGOPT(AbsolutePath, 1, 0) /// Use absolute paths.
0055 DIAGOPT(ShowCarets, 1, 1) /// Show carets in diagnostics.
0056 DIAGOPT(ShowFixits, 1, 1) /// Show fixit information.
0057 DIAGOPT(ShowSourceRanges, 1, 0) /// Show source ranges in numeric form.
0058 DIAGOPT(ShowParseableFixits, 1, 0) /// Show machine parseable fix-its.
0059 DIAGOPT(ShowPresumedLoc, 1, 0) /// Show presumed location for diagnostics.
0060 DIAGOPT(ShowOptionNames, 1, 0) /// Show the option name for mappable
0061 /// diagnostics.
0062 DIAGOPT(ShowNoteIncludeStack, 1, 0) /// Show include stacks for notes.
0063 VALUE_DIAGOPT(ShowCategories, 2, 0) /// Show categories: 0 -> none, 1 -> Number,
0064 /// 2 -> Full Name.
0065
0066 ENUM_DIAGOPT(Format, TextDiagnosticFormat, 2, Clang) /// Format for diagnostics:
0067
0068 DIAGOPT(ShowColors, 1, 0) /// Show diagnostics with ANSI color sequences.
0069 DIAGOPT(UseANSIEscapeCodes, 1, 0)
0070 ENUM_DIAGOPT(ShowOverloads, OverloadsShown, 1,
0071 Ovl_All) /// Overload candidates to show.
0072 DIAGOPT(VerifyDiagnostics, 1, 0) /// Check that diagnostics match the expected
0073 /// diagnostics, indicated by markers in the
0074 /// input source file.
0075 ENUM_DIAGOPT(VerifyIgnoreUnexpected, DiagnosticLevelMask, 4,
0076 DiagnosticLevelMask::None) /// Ignore unexpected diagnostics of
0077 /// the specified levels when using
0078 /// -verify.
0079 DIAGOPT(ElideType, 1, 0) /// Elide identical types in template diffing
0080 DIAGOPT(ShowTemplateTree, 1, 0) /// Print a template tree when diffing
0081
0082 VALUE_DIAGOPT(ErrorLimit, 32, 0) /// Limit # errors emitted.
0083 /// Limit depth of macro expansion backtrace.
0084 VALUE_DIAGOPT(MacroBacktraceLimit, 32, DefaultMacroBacktraceLimit)
0085 /// Limit depth of instantiation backtrace.
0086 VALUE_DIAGOPT(TemplateBacktraceLimit, 32, DefaultTemplateBacktraceLimit)
0087 /// Limit depth of constexpr backtrace.
0088 VALUE_DIAGOPT(ConstexprBacktraceLimit, 32, DefaultConstexprBacktraceLimit)
0089 /// Limit number of times to perform spell checking.
0090 VALUE_DIAGOPT(SpellCheckingLimit, 32, DefaultSpellCheckingLimit)
0091 /// Limit number of lines shown in a snippet.
0092 VALUE_DIAGOPT(SnippetLineLimit, 32, DefaultSnippetLineLimit)
0093 /// Show line number column on the left of snippets.
0094 VALUE_DIAGOPT(ShowLineNumbers, 1, DefaultShowLineNumbers)
0095
0096 VALUE_DIAGOPT(TabStop, 32, DefaultTabStop) /// The distance between tab stops.
0097 /// Column limit for formatting message diagnostics, or 0 if unused.
0098 VALUE_DIAGOPT(MessageLength, 32, 0)
0099
0100 DIAGOPT(ShowSafeBufferUsageSuggestions, 1, 0)
0101
0102 #undef DIAGOPT
0103 #undef ENUM_DIAGOPT
0104 #undef VALUE_DIAGOPT
0105 #undef SEMANTIC_DIAGOPT
0106 #undef SEMANTIC_ENUM_DIAGOPT
0107 #undef SEMANTIC_VALUE_DIAGOPT