@@ -241,8 +241,6 @@ def mno_mpx : Flag<["-"], "mno-mpx">, Group<clang_ignored_legacy_options_Group>;
241
241
def clang_ignored_gcc_optimization_f_Group : OptionGroup<
242
242
"<clang_ignored_gcc_optimization_f_Group>">, Group<f_Group>, Flags<[Ignored]>;
243
243
244
- class IsDiag { string MacroPrefix = "DIAG_"; }
245
-
246
244
// A boolean option which is opt-in in CC1. The positive option exists in CC1 and
247
245
// Args.hasArg(OPT_ffoo) is used to check that the flag is enabled.
248
246
// This is useful if the option is usually disabled.
@@ -757,7 +755,7 @@ def Wp_COMMA : CommaJoined<["-"], "Wp,">,
757
755
def Wundef_prefix_EQ : CommaJoined<["-"], "Wundef-prefix=">, Group<W_value_Group>,
758
756
Flags<[CC1Option, CoreOption, HelpHidden]>, MetaVarName<"<arg>">,
759
757
HelpText<"Enable warnings for undefined macros with a prefix in the comma separated list <arg>">,
760
- MarshallingInfoStringVector<"UndefPrefixes">, IsDiag ;
758
+ MarshallingInfoStringVector<"DiagnosticOpts-> UndefPrefixes">;
761
759
def Wwrite_strings : Flag<["-"], "Wwrite-strings">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
762
760
def Wno_write_strings : Flag<["-"], "Wno-write-strings">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
763
761
def W_Joined : Joined<["-"], "W">, Group<W_Group>, Flags<[CC1Option, CoreOption]>,
@@ -1190,9 +1188,7 @@ defm borland_extensions : BoolFOption<"borland-extensions",
1190
1188
def fbuiltin : Flag<["-"], "fbuiltin">, Group<f_Group>, Flags<[CoreOption]>;
1191
1189
def fbuiltin_module_map : Flag <["-"], "fbuiltin-module-map">, Group<f_Group>,
1192
1190
Flags<[NoXarchOption]>, HelpText<"Load the clang builtins module map file.">;
1193
- defm caret_diagnostics : BoolFOption<"caret-diagnostics",
1194
- "ShowCarets", DefaultsToTrue,
1195
- ChangedBy<NegFlag>, ResetBy<PosFlag>>, IsDiag;
1191
+ defm caret_diagnostics : OptOutFFlag<"caret-diagnostics", "", "">;
1196
1192
def fclang_abi_compat_EQ : Joined<["-"], "fclang-abi-compat=">, Group<f_clang_Group>,
1197
1193
Flags<[CC1Option]>, MetaVarName<"<version>">, Values<"<major>.<minor>,latest">,
1198
1194
HelpText<"Attempt to match the ABI of Clang <version>">;
@@ -1204,7 +1200,7 @@ def fdiagnostics_color : Flag<["-"], "fdiagnostics-color">, Group<f_Group>,
1204
1200
def fdiagnostics_color_EQ : Joined<["-"], "fdiagnostics-color=">, Group<f_Group>;
1205
1201
def fansi_escape_codes : Flag<["-"], "fansi-escape-codes">, Group<f_Group>,
1206
1202
Flags<[CoreOption, CC1Option]>, HelpText<"Use ANSI escape codes for diagnostics">,
1207
- MarshallingInfoFlag<"UseANSIEscapeCodes">, IsDiag ;
1203
+ MarshallingInfoFlag<"DiagnosticOpts-> UseANSIEscapeCodes">;
1208
1204
def fcomment_block_commands : CommaJoined<["-"], "fcomment-block-commands=">, Group<f_clang_Group>, Flags<[CC1Option]>,
1209
1205
HelpText<"Treat each comma separated argument in <arg> as a documentation comment block command">,
1210
1206
MetaVarName<"<arg>">, MarshallingInfoStringVector<"LangOpts->CommentOpts.BlockCommandNames">;
@@ -1257,16 +1253,11 @@ def fdebug_pass_structure : Flag<["-"], "fdebug-pass-structure">, Group<f_Group>
1257
1253
def fdepfile_entry : Joined<["-"], "fdepfile-entry=">,
1258
1254
Group<f_clang_Group>, Flags<[CC1Option]>;
1259
1255
def fdiagnostics_fixit_info : Flag<["-"], "fdiagnostics-fixit-info">, Group<f_clang_Group>;
1260
- def fno_diagnostics_fixit_info : Flag<["-"], "fno-diagnostics-fixit-info">, Group<f_Group>,
1261
- Flags<[CC1Option]>, HelpText<"Do not include fixit information in diagnostics">,
1262
- MarshallingInfoNegativeFlag<"ShowFixits">, IsDiag;
1263
1256
def fdiagnostics_parseable_fixits : Flag<["-"], "fdiagnostics-parseable-fixits">, Group<f_clang_Group>,
1264
- Flags<[CoreOption, CC1Option]>, HelpText<"Print fix-its in machine parseable form">,
1265
- MarshallingInfoFlag<"ShowParseableFixits">, IsDiag;
1257
+ Flags<[CoreOption, CC1Option]>, HelpText<"Print fix-its in machine parseable form">;
1266
1258
def fdiagnostics_print_source_range_info : Flag<["-"], "fdiagnostics-print-source-range-info">,
1267
1259
Group<f_clang_Group>, Flags<[CC1Option]>,
1268
- HelpText<"Print source range spans in numeric form">,
1269
- MarshallingInfoFlag<"ShowSourceRanges">, IsDiag;
1260
+ HelpText<"Print source range spans in numeric form">;
1270
1261
defm diagnostics_show_hotness : BoolFOption<"diagnostics-show-hotness",
1271
1262
"CodeGenOpts.DiagnosticsWithHotness", DefaultsToFalse,
1272
1263
ChangedBy<PosFlag, [], "Enable profile hotness information in diagnostic line">,
@@ -1275,19 +1266,15 @@ def fdiagnostics_hotness_threshold_EQ : Joined<["-"], "fdiagnostics-hotness-thre
1275
1266
Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<value>">,
1276
1267
HelpText<"Prevent optimization remarks from being output if they do not have at least this profile count. "
1277
1268
"Use 'auto' to apply the threshold from profile summary">;
1278
- defm diagnostics_show_option : BoolFOption<"diagnostics-show-option",
1279
- "ShowOptionNames", DefaultsToTrue,
1280
- ChangedBy<NegFlag>, ResetBy<PosFlag, [], "Print option name with mappable diagnostics">>, IsDiag;
1281
- defm diagnostics_show_note_include_stack : BoolFOption<"diagnostics-show-note-include-stack",
1282
- "ShowNoteIncludeStack", DefaultsToFalse,
1283
- ChangedBy<PosFlag, [], "Display include stacks for diagnostic notes">,
1284
- ResetBy<NegFlag>, BothFlags<[CC1Option]>>, IsDiag;
1269
+ def fdiagnostics_show_option : Flag<["-"], "fdiagnostics-show-option">, Group<f_Group>,
1270
+ HelpText<"Print option name with mappable diagnostics">;
1271
+ def fdiagnostics_show_note_include_stack : Flag<["-"], "fdiagnostics-show-note-include-stack">,
1272
+ Group<f_Group>, Flags<[CC1Option]>, HelpText<"Display include stacks for diagnostic notes">;
1285
1273
def fdiagnostics_format_EQ : Joined<["-"], "fdiagnostics-format=">, Group<f_clang_Group>;
1286
1274
def fdiagnostics_show_category_EQ : Joined<["-"], "fdiagnostics-show-category=">, Group<f_clang_Group>;
1287
1275
def fdiagnostics_show_template_tree : Flag<["-"], "fdiagnostics-show-template-tree">,
1288
1276
Group<f_Group>, Flags<[CC1Option]>,
1289
- HelpText<"Print a template comparison tree for differing templates">,
1290
- MarshallingInfoFlag<"ShowTemplateTree">, IsDiag;
1277
+ HelpText<"Print a template comparison tree for differing templates">;
1291
1278
def fdeclspec : Flag<["-"], "fdeclspec">, Group<f_clang_Group>,
1292
1279
HelpText<"Allow __declspec as a keyword">, Flags<[CC1Option]>;
1293
1280
def fdiscard_value_names : Flag<["-"], "fdiscard-value-names">, Group<f_clang_Group>,
@@ -1307,8 +1294,7 @@ defm elide_constructors : BoolFOption<"elide-constructors",
1307
1294
ResetBy<PosFlag>>;
1308
1295
def fno_elide_type : Flag<["-"], "fno-elide-type">, Group<f_Group>,
1309
1296
Flags<[CC1Option]>,
1310
- HelpText<"Do not elide types when printing diagnostics">,
1311
- MarshallingInfoNegativeFlag<"ElideType">, IsDiag;
1297
+ HelpText<"Do not elide types when printing diagnostics">;
1312
1298
def feliminate_unused_debug_symbols : Flag<["-"], "feliminate-unused-debug-symbols">, Group<f_Group>;
1313
1299
defm eliminate_unused_debug_types : OptOutFFlag<"eliminate-unused-debug-types",
1314
1300
"Do not emit ", "Emit ", " debug info for defined but unused types">;
@@ -1812,8 +1798,7 @@ defm merge_all_constants : BoolFOption<"merge-all-constants",
1812
1798
ChangedBy<PosFlag, [CoreOption], "Allow">, ResetBy<NegFlag, [], "Disallow">,
1813
1799
BothFlags<[], " merging of constants">>;
1814
1800
def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group<f_Group>, Flags<[CC1Option]>,
1815
- HelpText<"Format message diagnostics so that they fit within N columns">,
1816
- MarshallingInfoStringInt<"MessageLength">, IsDiag;
1801
+ HelpText<"Format message diagnostics so that they fit within N columns">;
1817
1802
def fms_extensions : Flag<["-"], "fms-extensions">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
1818
1803
HelpText<"Accept some non-standard constructs supported by the Microsoft compiler">;
1819
1804
def fms_compatibility : Flag<["-"], "fms-compatibility">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
@@ -1980,6 +1965,11 @@ def fno_common : Flag<["-"], "fno-common">, Group<f_Group>, Flags<[CC1Option]>,
1980
1965
HelpText<"Compile common globals like normal definitions">;
1981
1966
def fno_cxx_modules : Flag <["-"], "fno-cxx-modules">, Group<f_Group>,
1982
1967
Flags<[NoXarchOption]>;
1968
+ def fno_diagnostics_fixit_info : Flag<["-"], "fno-diagnostics-fixit-info">, Group<f_Group>,
1969
+ Flags<[CC1Option]>, HelpText<"Do not include fixit information in diagnostics">;
1970
+ def fno_diagnostics_show_option : Flag<["-"], "fno-diagnostics-show-option">, Group<f_Group>, Flags<[CC1Option]>;
1971
+ def fno_diagnostics_show_note_include_stack : Flag<["-"], "fno-diagnostics-show-note-include-stack">,
1972
+ Flags<[CC1Option]>, Group<f_Group>;
1983
1973
def fdigraphs : Flag<["-"], "fdigraphs">, Group<f_Group>, Flags<[CC1Option]>,
1984
1974
HelpText<"Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default)">;
1985
1975
def fno_digraphs : Flag<["-"], "fno-digraphs">, Group<f_Group>, Flags<[CC1Option]>,
@@ -2027,9 +2017,10 @@ def fno_omit_frame_pointer : Flag<["-"], "fno-omit-frame-pointer">, Group<f_Grou
2027
2017
def fno_operator_names : Flag<["-"], "fno-operator-names">, Group<f_Group>,
2028
2018
HelpText<"Do not treat C++ operator name keywords as synonyms for operators">,
2029
2019
Flags<[CC1Option]>;
2020
+ def fno_show_source_location : Flag<["-"], "fno-show-source-location">, Group<f_Group>,
2021
+ Flags<[CC1Option]>, HelpText<"Do not include source location information with diagnostics">;
2030
2022
def fdiagnostics_absolute_paths : Flag<["-"], "fdiagnostics-absolute-paths">, Group<f_Group>,
2031
- Flags<[CC1Option, CoreOption]>, HelpText<"Print absolute paths in diagnostics">,
2032
- MarshallingInfoFlag<"AbsolutePath">, IsDiag;
2023
+ Flags<[CC1Option, CoreOption]>, HelpText<"Print absolute paths in diagnostics">;
2033
2024
def fno_stack_protector : Flag<["-"], "fno-stack-protector">, Group<f_Group>,
2034
2025
HelpText<"Disable the use of stack protectors">;
2035
2026
def fno_strict_aliasing : Flag<["-"], "fno-strict-aliasing">, Group<f_Group>,
@@ -2240,17 +2231,9 @@ def fno_short_wchar : Flag<["-"], "fno-short-wchar">, Group<f_Group>,
2240
2231
HelpText<"Force wchar_t to be an unsigned int">;
2241
2232
def fshow_overloads_EQ : Joined<["-"], "fshow-overloads=">, Group<f_Group>, Flags<[CC1Option]>,
2242
2233
HelpText<"Which overload candidates to show when overload resolution fails: "
2243
- "best|all; defaults to all">, Values<"best,all">,
2244
- NormalizedValues<["Ovl_Best", "Ovl_All"]>,
2245
- MarshallingInfoString<"ShowOverloads", "Ovl_All">, AutoNormalizeEnum, IsDiag;
2246
- defm show_column : BoolFOption<"show-column",
2247
- "ShowColumn", DefaultsToTrue,
2248
- ChangedBy<NegFlag, [], "Do not include column number on diagnostics">,
2249
- ResetBy<PosFlag>>, IsDiag;
2250
- defm show_source_location : BoolFOption<"show-source-location",
2251
- "ShowLocation", DefaultsToTrue,
2252
- ChangedBy<NegFlag, [], "Do not include source location information with diagnostics">,
2253
- ResetBy<PosFlag>>, IsDiag;
2234
+ "best|all; defaults to all">, Values<"best,all">;
2235
+ defm show_column : OptOutFFlag<"show-column", "", "Do not include column number on diagnostics">;
2236
+ def fshow_source_location : Flag<["-"], "fshow-source-location">, Group<f_Group>;
2254
2237
defm spell_checking : BoolFOption<"spell-checking",
2255
2238
"LangOpts->SpellChecking", DefaultsToTrue,
2256
2239
ChangedBy<NegFlag, [], "Disable spell-checking">, ResetBy<PosFlag>>;
@@ -3376,10 +3359,8 @@ def o : JoinedOrSeparate<["-"], "o">, Flags<[NoXarchOption, RenderAsInput,
3376
3359
MarshallingInfoString<"FrontendOpts.OutputFile">;
3377
3360
def pagezero__size : JoinedOrSeparate<["-"], "pagezero_size">;
3378
3361
def pass_exit_codes : Flag<["-", "--"], "pass-exit-codes">, Flags<[Unsupported]>;
3379
- def pedantic_errors : Flag<["-", "--"], "pedantic-errors">, Group<pedantic_Group>, Flags<[CC1Option]>,
3380
- MarshallingInfoFlag<"PedanticErrors">, IsDiag;
3381
- def pedantic : Flag<["-", "--"], "pedantic">, Group<pedantic_Group>, Flags<[CC1Option]>,
3382
- MarshallingInfoFlag<"Pedantic">, IsDiag;
3362
+ def pedantic_errors : Flag<["-", "--"], "pedantic-errors">, Group<pedantic_Group>, Flags<[CC1Option]>;
3363
+ def pedantic : Flag<["-", "--"], "pedantic">, Group<pedantic_Group>, Flags<[CC1Option]>;
3383
3364
def pg : Flag<["-"], "pg">, HelpText<"Enable mcount instrumentation">, Flags<[CC1Option]>,
3384
3365
MarshallingInfoFlag<"CodeGenOpts.InstrumentForProfiling">;
3385
3366
def pipe : Flag<["-", "--"], "pipe">,
@@ -3547,8 +3528,7 @@ def weak__library : Separate<["-"], "weak_library">, Flags<[LinkerInput]>;
3547
3528
def weak__reference__mismatches : Separate<["-"], "weak_reference_mismatches">;
3548
3529
def whatsloaded : Flag<["-"], "whatsloaded">;
3549
3530
def whyload : Flag<["-"], "whyload">;
3550
- def w : Flag<["-"], "w">, HelpText<"Suppress all warnings">, Flags<[CC1Option]>,
3551
- MarshallingInfoFlag<"IgnoreWarnings">, IsDiag;
3531
+ def w : Flag<["-"], "w">, HelpText<"Suppress all warnings">, Flags<[CC1Option]>;
3552
3532
def x : JoinedOrSeparate<["-"], "x">, Flags<[NoXarchOption,CC1Option]>,
3553
3533
HelpText<"Treat subsequent input files as having type <language>">,
3554
3534
MetaVarName<"<language>">;
@@ -4666,59 +4646,45 @@ def show_includes : Flag<["--"], "show-includes">,
4666
4646
//===----------------------------------------------------------------------===//
4667
4647
4668
4648
def diagnostic_log_file : Separate<["-"], "diagnostic-log-file">,
4669
- HelpText<"Filename (or -) to log diagnostics to">,
4670
- MarshallingInfoString<"DiagnosticLogFile">, IsDiag;
4649
+ HelpText<"Filename (or -) to log diagnostics to">;
4671
4650
def diagnostic_serialized_file : Separate<["-"], "serialize-diagnostic-file">,
4672
4651
MetaVarName<"<filename>">,
4673
4652
HelpText<"File for serializing diagnostics in a binary format">;
4674
4653
4675
4654
def fdiagnostics_format : Separate<["-"], "fdiagnostics-format">,
4676
- HelpText<"Change diagnostic formatting to match IDE and command line tools">, Values<"clang,msvc,msvc-fallback,vi">,
4677
- NormalizedValuesScope<"DiagnosticOptions">, NormalizedValues<["Clang", "MSVC", "MSVC", "Vi"]>,
4678
- MarshallingInfoString<"Format", "Clang">, AutoNormalizeEnum, IsDiag;
4655
+ HelpText<"Change diagnostic formatting to match IDE and command line tools">, Values<"clang,msvc,msvc-fallback,vi">;
4679
4656
def fdiagnostics_show_category : Separate<["-"], "fdiagnostics-show-category">,
4680
- HelpText<"Print diagnostic category">, Values<"none,id,name">,
4681
- NormalizedValues<["0", "1", "2"]>,
4682
- MarshallingInfoString<"ShowCategories", "0">, AutoNormalizeEnum, IsDiag;
4657
+ HelpText<"Print diagnostic category">, Values<"none,id,name">;
4683
4658
def fno_diagnostics_use_presumed_location : Flag<["-"], "fno-diagnostics-use-presumed-location">,
4684
- HelpText<"Ignore #line directives when displaying diagnostic locations">,
4685
- MarshallingInfoNegativeFlag<"ShowPresumedLoc">, IsDiag;
4659
+ HelpText<"Ignore #line directives when displaying diagnostic locations">;
4686
4660
def ftabstop : Separate<["-"], "ftabstop">, MetaVarName<"<N>">,
4687
- HelpText<"Set the tab stop distance.">,
4688
- MarshallingInfoStringInt<"TabStop", "DiagnosticOptions::DefaultTabStop">, IsDiag;
4661
+ HelpText<"Set the tab stop distance.">;
4689
4662
def ferror_limit : Separate<["-"], "ferror-limit">, MetaVarName<"<N>">,
4690
- HelpText<"Set the maximum number of errors to emit before stopping (0 = no limit).">,
4691
- MarshallingInfoStringInt<"ErrorLimit">, IsDiag;
4663
+ HelpText<"Set the maximum number of errors to emit before stopping (0 = no limit).">;
4692
4664
def fmacro_backtrace_limit : Separate<["-"], "fmacro-backtrace-limit">, MetaVarName<"<N>">,
4693
- HelpText<"Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit).">,
4694
- MarshallingInfoStringInt<"MacroBacktraceLimit", "DiagnosticOptions::DefaultMacroBacktraceLimit">, IsDiag;
4665
+ HelpText<"Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit).">;
4695
4666
def ftemplate_backtrace_limit : Separate<["-"], "ftemplate-backtrace-limit">, MetaVarName<"<N>">,
4696
- HelpText<"Set the maximum number of entries to print in a template instantiation backtrace (0 = no limit).">,
4697
- MarshallingInfoStringInt<"TemplateBacktraceLimit", "DiagnosticOptions::DefaultTemplateBacktraceLimit">, IsDiag;
4667
+ HelpText<"Set the maximum number of entries to print in a template instantiation backtrace (0 = no limit).">;
4698
4668
def fconstexpr_backtrace_limit : Separate<["-"], "fconstexpr-backtrace-limit">, MetaVarName<"<N>">,
4699
- HelpText<"Set the maximum number of entries to print in a constexpr evaluation backtrace (0 = no limit).">,
4700
- MarshallingInfoStringInt<"ConstexprBacktraceLimit", "DiagnosticOptions::DefaultConstexprBacktraceLimit">, IsDiag;
4669
+ HelpText<"Set the maximum number of entries to print in a constexpr evaluation backtrace (0 = no limit).">;
4701
4670
def fspell_checking_limit : Separate<["-"], "fspell-checking-limit">, MetaVarName<"<N>">,
4702
- HelpText<"Set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit).">,
4703
- MarshallingInfoStringInt<"SpellCheckingLimit", "DiagnosticOptions::DefaultSpellCheckingLimit">, IsDiag;
4671
+ HelpText<"Set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit).">;
4704
4672
def fcaret_diagnostics_max_lines :
4705
4673
Separate<["-"], "fcaret-diagnostics-max-lines">, MetaVarName<"<N>">,
4706
- HelpText<"Set the maximum number of source lines to show in a caret diagnostic">,
4707
- MarshallingInfoStringInt<"SnippetLineLimit", "DiagnosticOptions::DefaultSnippetLineLimit">, IsDiag;
4674
+ HelpText<"Set the maximum number of source lines to show in a caret diagnostic">;
4708
4675
def verify_EQ : CommaJoined<["-"], "verify=">,
4709
4676
MetaVarName<"<prefixes>">,
4710
4677
HelpText<"Verify diagnostic output using comment directives that start with"
4711
4678
" prefixes in the comma-separated sequence <prefixes>">,
4712
- MarshallingInfoStringVector<"VerifyPrefixes">, IsDiag ;
4679
+ MarshallingInfoStringVector<"DiagnosticOpts-> VerifyPrefixes">;
4713
4680
def verify : Flag<["-"], "verify">,
4714
4681
HelpText<"Equivalent to -verify=expected">;
4715
4682
def verify_ignore_unexpected : Flag<["-"], "verify-ignore-unexpected">,
4716
4683
HelpText<"Ignore unexpected diagnostic messages">;
4717
4684
def verify_ignore_unexpected_EQ : CommaJoined<["-"], "verify-ignore-unexpected=">,
4718
4685
HelpText<"Ignore unexpected diagnostic messages">;
4719
4686
def Wno_rewrite_macros : Flag<["-"], "Wno-rewrite-macros">,
4720
- HelpText<"Silence ObjC rewriting warnings">,
4721
- MarshallingInfoFlag<"NoRewriteMacros">, IsDiag;
4687
+ HelpText<"Silence ObjC rewriting warnings">;
4722
4688
4723
4689
//===----------------------------------------------------------------------===//
4724
4690
// Frontend Options
0 commit comments