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