<div dir="ltr">Hi,<div><br></div><div>the attached patch attempts to fix PR20208 in the way I understood Richard's suggestion in comment 1.</div><div><br></div><div>The patch is a bit hairy (but short) since it adds a fixit on an error emitted by InitializationSequence – this means it needs to build a correct AST, which in turn means InitializationSequence::Failed() cannot return true when this fixit is applied. As a workaround, the patch adds a fixit member to InitializationSequence, and InitializationSequence::Perform() prints the diagnostic if the fixit member is set right after its call to Diagnose. I think that function is usually called when InitializationSequences are used – InitListChecker::PerformEmptyInit() doesn't call it though, so there might be bugs there.</div>
<div><br></div><div>Ideas? Easiest would be to put the fixit on a note, but the note would just repeat the snippet from the diag itself, which isn't great. Or we could omit the fixit and just do the wording change, but the fixit makes the diagnostic much clearer.</div>
<div><br></div><div>Nico</div></div>