DiagnosticOptions.def 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. #ifndef VALUE_DIAGOPT
  22. # define VALUE_DIAGOPT(Name, Bits, Default) \
  23. DIAGOPT(Name, Bits, Default)
  24. #endif
  25. #ifndef ENUM_DIAGOPT
  26. # define ENUM_DIAGOPT(Name, Type, Bits, Default) \
  27. DIAGOPT(Name, Bits, Default)
  28. #endif
  29. #ifndef SEMANTIC_DIAGOPT
  30. # define SEMANTIC_DIAGOPT(Name, Bits, Default) DIAGOPT(Name, Bits, Default)
  31. #endif
  32. #ifndef SEMANTIC_VALUE_DIAGOPT
  33. # define SEMANTIC_VALUE_DIAGOPT(Name, Bits, Default) \
  34. VALUE_DIAGOPT(Name, Bits, Default)
  35. #endif
  36. #ifndef SEMANTIC_ENUM_DIAGOPT
  37. # define SEMANTIC_ENUM_DIAGOPT(Name, Type, Bits, Default) \
  38. ENUM_DIAGOPT(Name, Type, Bits, Default)
  39. #endif
  40. SEMANTIC_DIAGOPT(IgnoreWarnings, 1, 0) /// -w
  41. DIAGOPT(NoRewriteMacros, 1, 0) /// -Wno-rewrite-macros
  42. DIAGOPT(Pedantic, 1, 0) /// -pedantic
  43. DIAGOPT(PedanticErrors, 1, 0) /// -pedantic-errors
  44. DIAGOPT(ShowLine, 1, 1) /// Show line number on diagnostics.
  45. DIAGOPT(ShowColumn, 1, 1) /// Show column number on diagnostics.
  46. DIAGOPT(ShowLocation, 1, 1) /// Show source location information.
  47. DIAGOPT(ShowLevel, 1, 1) /// Show diagnostic level.
  48. DIAGOPT(AbsolutePath, 1, 0) /// Use absolute paths.
  49. DIAGOPT(ShowCarets, 1, 1) /// Show carets in diagnostics.
  50. DIAGOPT(ShowFixits, 1, 1) /// Show fixit information.
  51. DIAGOPT(ShowSourceRanges, 1, 0) /// Show source ranges in numeric form.
  52. DIAGOPT(ShowParseableFixits, 1, 0) /// Show machine parseable fix-its.
  53. DIAGOPT(ShowPresumedLoc, 1, 0) /// Show presumed location for diagnostics.
  54. DIAGOPT(ShowOptionNames, 1, 0) /// Show the option name for mappable
  55. /// diagnostics.
  56. DIAGOPT(ShowNoteIncludeStack, 1, 0) /// Show include stacks for notes.
  57. VALUE_DIAGOPT(ShowCategories, 2, 0) /// Show categories: 0 -> none, 1 -> Number,
  58. /// 2 -> Full Name.
  59. ENUM_DIAGOPT(Format, TextDiagnosticFormat, 2, Clang) /// Format for diagnostics:
  60. DIAGOPT(ShowColors, 1, 0) /// Show diagnostics with ANSI color sequences.
  61. DIAGOPT(UseANSIEscapeCodes, 1, 0)
  62. ENUM_DIAGOPT(ShowOverloads, OverloadsShown, 1,
  63. Ovl_All) /// Overload candidates to show.
  64. DIAGOPT(VerifyDiagnostics, 1, 0) /// Check that diagnostics match the expected
  65. /// diagnostics, indicated by markers in the
  66. /// input source file.
  67. ENUM_DIAGOPT(VerifyIgnoreUnexpected, DiagnosticLevelMask, 4,
  68. DiagnosticLevelMask::None) /// Ignore unexpected diagnostics of
  69. /// the specified levels when using
  70. /// -verify.
  71. DIAGOPT(ElideType, 1, 0) /// Elide identical types in template diffing
  72. DIAGOPT(ShowTemplateTree, 1, 0) /// Print a template tree when diffing
  73. VALUE_DIAGOPT(ErrorLimit, 32, 0) /// Limit # errors emitted.
  74. /// Limit depth of macro expansion backtrace.
  75. VALUE_DIAGOPT(MacroBacktraceLimit, 32, DefaultMacroBacktraceLimit)
  76. /// Limit depth of instantiation backtrace.
  77. VALUE_DIAGOPT(TemplateBacktraceLimit, 32, DefaultTemplateBacktraceLimit)
  78. /// Limit depth of constexpr backtrace.
  79. VALUE_DIAGOPT(ConstexprBacktraceLimit, 32, DefaultConstexprBacktraceLimit)
  80. /// Limit number of times to perform spell checking.
  81. VALUE_DIAGOPT(SpellCheckingLimit, 32, DefaultSpellCheckingLimit)
  82. /// Limit number of lines shown in a snippet.
  83. VALUE_DIAGOPT(SnippetLineLimit, 32, DefaultSnippetLineLimit)
  84. VALUE_DIAGOPT(TabStop, 32, DefaultTabStop) /// The distance between tab stops.
  85. /// Column limit for formatting message diagnostics, or 0 if unused.
  86. VALUE_DIAGOPT(MessageLength, 32, 0)
  87. #undef DIAGOPT
  88. #undef ENUM_DIAGOPT
  89. #undef VALUE_DIAGOPT
  90. #undef SEMANTIC_DIAGOPT
  91. #undef SEMANTIC_ENUM_DIAGOPT
  92. #undef SEMANTIC_VALUE_DIAGOPT