This allows callers of Diags.Report() to override the name of the flag
associated with the diagnostic. This is useful in cases like the -Rpass
flag, where we want the diagnostic to show the name of the pass that
matched the pattern. Instead of showing "... [-Rpass]", this allows
us to show "... [-Rpass=passname]".
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Instead of an override, provide a flag value.
As we discussed offline, it seems cleaner to offer callers to provide
an additional value to the option, instead of overriding it completely.
This changes the patch so that callers provide an additional value to
the diagnostic. This value is emitted as the suffix "=value" when
displaying the flag name.