struct XX { double foo(invalid_type xx); }; double XX::foo(invalid_type xx) { return 45; }
We should keep XX::foo and its function body as part of the AST so tools can still do something with the body even if the definition is wrong.
Inline function would already be kept, but not when they are redeclarations.
Can we delete the invalid-decl check entirely here? If it's doing something important, we need to figure out what and make sure we preserve that intent if it's important, but either way it doesn't make a lot of sense to me for this to depend on whether the declaration has a definition.