Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 14 | pmbaty | 1 | //===--- DiagOptions.def - Diagnostic option database ------------- C++ -*-===// |
| 2 | // |
||
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
||
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
||
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
||
| 6 | // |
||
| 7 | //===----------------------------------------------------------------------===// |
||
| 8 | // |
||
| 9 | // This file defines the diagnostic options. Users of this file |
||
| 10 | // must define the DIAGOPT macro to make use of this information. |
||
| 11 | // Optionally, the user may also define ENUM_DIAGOPT (for options |
||
| 12 | // that have enumeration type and VALUE_DIAGOPT (for options that |
||
| 13 | // describe a value rather than a flag). The SEMANTIC_* variants of these macros |
||
| 14 | // indicate options that affect the processing of the program, rather than |
||
| 15 | // simply the output. |
||
| 16 | // |
||
| 17 | //===----------------------------------------------------------------------===// |
||
| 18 | #ifndef DIAGOPT |
||
| 19 | # error Define the DIAGOPT macro to handle language options |
||
| 20 | #endif |
||
| 21 | |||
| 22 | #ifndef VALUE_DIAGOPT |
||
| 23 | # define VALUE_DIAGOPT(Name, Bits, Default) \ |
||
| 24 | DIAGOPT(Name, Bits, Default) |
||
| 25 | #endif |
||
| 26 | |||
| 27 | #ifndef ENUM_DIAGOPT |
||
| 28 | # define ENUM_DIAGOPT(Name, Type, Bits, Default) \ |
||
| 29 | DIAGOPT(Name, Bits, Default) |
||
| 30 | #endif |
||
| 31 | |||
| 32 | #ifndef SEMANTIC_DIAGOPT |
||
| 33 | # define SEMANTIC_DIAGOPT(Name, Bits, Default) DIAGOPT(Name, Bits, Default) |
||
| 34 | #endif |
||
| 35 | |||
| 36 | #ifndef SEMANTIC_VALUE_DIAGOPT |
||
| 37 | # define SEMANTIC_VALUE_DIAGOPT(Name, Bits, Default) \ |
||
| 38 | VALUE_DIAGOPT(Name, Bits, Default) |
||
| 39 | #endif |
||
| 40 | |||
| 41 | #ifndef SEMANTIC_ENUM_DIAGOPT |
||
| 42 | # define SEMANTIC_ENUM_DIAGOPT(Name, Type, Bits, Default) \ |
||
| 43 | ENUM_DIAGOPT(Name, Type, Bits, Default) |
||
| 44 | #endif |
||
| 45 | |||
| 46 | SEMANTIC_DIAGOPT(IgnoreWarnings, 1, 0) /// -w |
||
| 47 | DIAGOPT(NoRewriteMacros, 1, 0) /// -Wno-rewrite-macros |
||
| 48 | DIAGOPT(Pedantic, 1, 0) /// -pedantic |
||
| 49 | DIAGOPT(PedanticErrors, 1, 0) /// -pedantic-errors |
||
| 50 | DIAGOPT(ShowLine, 1, 1) /// Show line number on diagnostics. |
||
| 51 | DIAGOPT(ShowColumn, 1, 1) /// Show column number on diagnostics. |
||
| 52 | DIAGOPT(ShowLocation, 1, 1) /// Show source location information. |
||
| 53 | DIAGOPT(ShowLevel, 1, 1) /// Show diagnostic level. |
||
| 54 | DIAGOPT(AbsolutePath, 1, 0) /// Use absolute paths. |
||
| 55 | DIAGOPT(ShowCarets, 1, 1) /// Show carets in diagnostics. |
||
| 56 | DIAGOPT(ShowFixits, 1, 1) /// Show fixit information. |
||
| 57 | DIAGOPT(ShowSourceRanges, 1, 0) /// Show source ranges in numeric form. |
||
| 58 | DIAGOPT(ShowParseableFixits, 1, 0) /// Show machine parseable fix-its. |
||
| 59 | DIAGOPT(ShowPresumedLoc, 1, 0) /// Show presumed location for diagnostics. |
||
| 60 | DIAGOPT(ShowOptionNames, 1, 0) /// Show the option name for mappable |
||
| 61 | /// diagnostics. |
||
| 62 | DIAGOPT(ShowNoteIncludeStack, 1, 0) /// Show include stacks for notes. |
||
| 63 | VALUE_DIAGOPT(ShowCategories, 2, 0) /// Show categories: 0 -> none, 1 -> Number, |
||
| 64 | /// 2 -> Full Name. |
||
| 65 | |||
| 66 | ENUM_DIAGOPT(Format, TextDiagnosticFormat, 2, Clang) /// Format for diagnostics: |
||
| 67 | |||
| 68 | DIAGOPT(ShowColors, 1, 0) /// Show diagnostics with ANSI color sequences. |
||
| 69 | DIAGOPT(UseANSIEscapeCodes, 1, 0) |
||
| 70 | ENUM_DIAGOPT(ShowOverloads, OverloadsShown, 1, |
||
| 71 | Ovl_All) /// Overload candidates to show. |
||
| 72 | DIAGOPT(VerifyDiagnostics, 1, 0) /// Check that diagnostics match the expected |
||
| 73 | /// diagnostics, indicated by markers in the |
||
| 74 | /// input source file. |
||
| 75 | ENUM_DIAGOPT(VerifyIgnoreUnexpected, DiagnosticLevelMask, 4, |
||
| 76 | DiagnosticLevelMask::None) /// Ignore unexpected diagnostics of |
||
| 77 | /// the specified levels when using |
||
| 78 | /// -verify. |
||
| 79 | DIAGOPT(ElideType, 1, 0) /// Elide identical types in template diffing |
||
| 80 | DIAGOPT(ShowTemplateTree, 1, 0) /// Print a template tree when diffing |
||
| 81 | |||
| 82 | VALUE_DIAGOPT(ErrorLimit, 32, 0) /// Limit # errors emitted. |
||
| 83 | /// Limit depth of macro expansion backtrace. |
||
| 84 | VALUE_DIAGOPT(MacroBacktraceLimit, 32, DefaultMacroBacktraceLimit) |
||
| 85 | /// Limit depth of instantiation backtrace. |
||
| 86 | VALUE_DIAGOPT(TemplateBacktraceLimit, 32, DefaultTemplateBacktraceLimit) |
||
| 87 | /// Limit depth of constexpr backtrace. |
||
| 88 | VALUE_DIAGOPT(ConstexprBacktraceLimit, 32, DefaultConstexprBacktraceLimit) |
||
| 89 | /// Limit number of times to perform spell checking. |
||
| 90 | VALUE_DIAGOPT(SpellCheckingLimit, 32, DefaultSpellCheckingLimit) |
||
| 91 | /// Limit number of lines shown in a snippet. |
||
| 92 | VALUE_DIAGOPT(SnippetLineLimit, 32, DefaultSnippetLineLimit) |
||
| 93 | |||
| 94 | VALUE_DIAGOPT(TabStop, 32, DefaultTabStop) /// The distance between tab stops. |
||
| 95 | /// Column limit for formatting message diagnostics, or 0 if unused. |
||
| 96 | VALUE_DIAGOPT(MessageLength, 32, 0) |
||
| 97 | |||
| 98 | #undef DIAGOPT |
||
| 99 | #undef ENUM_DIAGOPT |
||
| 100 | #undef VALUE_DIAGOPT |
||
| 101 | #undef SEMANTIC_DIAGOPT |
||
| 102 | #undef SEMANTIC_ENUM_DIAGOPT |
||
| 103 | #undef SEMANTIC_VALUE_DIAGOPT |