<div dir="ltr"><div>Clang currently crashes on</div><div><br></div><div>    class C {</div><div>      C() = default;</div><div>      C() = delete;</div><div>    };</div><div><br></div><div>My cunning plan for fixing this was to change the `if (!FnD)` in Parser::ParseCXXInlineMethodDef() to `if (!FnD || FnD->isInvalidDecl)` – but alas, the second constructor decl wasn't marked as invalid. This patch lets Sema::MergeFunctionDecl() return true on function redeclarations, which leads to them being marked invalid. (There are two more diag::err_s later in the same function that also don't return true. These look fishy to me too – let me know if you think those should be changed too. Probably in a separate patch, though.)</div><div><br></div><div>This reduces the number of duplicate error messages in tests, which is probably a good thing for this kind of error – if you have two definitions of a function, things likely are pretty dire already.</div><div><br></div><div>Nico</div><div><br></div><div><br></div><div>ps: I tried to upload this to phab since this looks like the type of patch it's good for, but it didn't want to accept <a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a> (or <a href="mailto:richard-llvm@metafoo.co.uk">richard-llvm@metafoo.co.uk</a>) in the "Reviewers" field; there also weren't any "Richard Smith"s in the autocomplete field :-/</div></div>