Previously expressions were being printed in diagnostics via an implicit conversion to an expression template argument -- which would then be printed via some code with a comment suggesting the code path was only for completeness and rarely/never used; this was both roundabout, and subtle. This patch provides a more direct overload, though the patch is still imperfect, as it does not solve the associated LangOpts issue.
Additionally, to prevent similar issues in the future, this patch makes conversions from expressions to template arguments explicit.
This code looks like a very special case, and the LangOptions comments suggests it's a bit hacky.
Because of that I'm not sure it makes sense to promote it to what looks like a general-purpose operator<< for Expr. What's the motivation for that?