1 //===--- DiagOptions.def - Diagnostic option database ------------- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
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
18 //===----------------------------------------------------------------------===//
20 # error Define the DIAGOPT macro to handle language options
24 # define VALUE_DIAGOPT(Name, Bits, Default) \
25 DIAGOPT(Name, Bits, Default)
29 # define ENUM_DIAGOPT(Name, Type, Bits, Default) \
30 DIAGOPT(Name, Bits, Default)
33 #ifndef SEMANTIC_DIAGOPT
34 # define SEMANTIC_DIAGOPT(Name, Bits, Default) DIAGOPT(Name, Bits, Default)
37 #ifndef SEMANTIC_VALUE_DIAGOPT
38 # define SEMANTIC_VALUE_DIAGOPT(Name, Bits, Default) \
39 VALUE_DIAGOPT(Name, Bits, Default)
42 #ifndef SEMANTIC_ENUM_DIAGOPT
43 # define SEMANTIC_ENUM_DIAGOPT(Name, Type, Bits, Default) \
44 ENUM_DIAGOPT(Name, Type, Bits, Default)
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(ShowCarets, 1, 1) /// Show carets in diagnostics.
54 DIAGOPT(ShowFixits, 1, 1) /// Show fixit information.
55 DIAGOPT(ShowSourceRanges, 1, 0) /// Show source ranges in numeric form.
56 DIAGOPT(ShowParseableFixits, 1, 0) /// Show machine parseable fix-its.
57 DIAGOPT(ShowOptionNames, 1, 0) /// Show the option name for mappable
59 DIAGOPT(ShowNoteIncludeStack, 1, 0) /// Show include stacks for notes.
60 VALUE_DIAGOPT(ShowCategories, 2, 0) /// Show categories: 0 -> none, 1 -> Number,
63 ENUM_DIAGOPT(Format, TextDiagnosticFormat, 2, Clang) /// Format for diagnostics:
65 DIAGOPT(ShowColors, 1, 0) /// Show diagnostics with ANSI color sequences.
66 ENUM_DIAGOPT(ShowOverloads, OverloadsShown, 1,
67 Ovl_All) /// Overload candidates to show.
68 DIAGOPT(VerifyDiagnostics, 1, 0) /// Check that diagnostics match the expected
69 /// diagnostics, indicated by markers in the
70 /// input source file.
72 DIAGOPT(ElideType, 1, 0) /// Elide identical types in template diffing
73 DIAGOPT(ShowTemplateTree, 1, 0) /// Print a template tree when diffing
75 VALUE_DIAGOPT(ErrorLimit, 32, 0) /// Limit # errors emitted.
76 /// Limit depth of macro expansion backtrace.
77 VALUE_DIAGOPT(MacroBacktraceLimit, 32, DefaultMacroBacktraceLimit)
78 /// Limit depth of instantiation backtrace.
79 VALUE_DIAGOPT(TemplateBacktraceLimit, 32, DefaultTemplateBacktraceLimit)
80 /// Limit depth of constexpr backtrace.
81 VALUE_DIAGOPT(ConstexprBacktraceLimit, 32, DefaultConstexprBacktraceLimit)
83 VALUE_DIAGOPT(TabStop, 32, DefaultTabStop) /// The distance between tab stops.
84 /// Column limit for formatting message diagnostics, or 0 if unused.
85 VALUE_DIAGOPT(MessageLength, 32, 0)
90 #undef SEMANTIC_DIAGOPT
91 #undef SEMANTIC_ENUM_DIAGOPT
92 #undef SEMANTIC_VALUE_DIAGOPT