<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Folks, I'm trying understand a `clang-tidy` bug where the 'modernize-use-default-member-init' check misbehaves on this (reduced) input:</div><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr">struct Thing {</div><div dir="ltr">    Thing(int arg) : a(arg), b(0) {}</div><div dir="ltr">    int a, b;</div><div dir="ltr">};</div><div dir="ltr"><br></div><div>The check works correctly when running `clang-tidy` without a compilation DB. The tool complains, but works correctly. Things also work correctly in the LIT tests... </div><div><br></div><div>Yet when running with a compilation DB, I get this output after fixes are applied (notice the trailing comma, which makes the code ill-formed):</div><div><br></div><div><div>struct Thing {</div><div>    Thing(int arg) : a(arg), {}</div><div>    int a, b{0};</div><div>};</div></div><div><br></div><div>How do I write a unit test for this? I mean how do I create a reliable repro?</div><div><br></div><div>Thanks,<br>Oleg.</div></div></div></div></div>