<div dir="ltr">Attached is an initial patch for trying to correct a missing "-" or ">" to "->" when accessing a member through an object pointer. This patch also doesn't work for C code as C seems to hit a different code path. I'm sending the patch out for pre-commit review even though it is a small and fairly unobtrusive (code-wise) patch because I'm a bit iffy on whether it's a good way to perform the diagnostic.<div>
<br></div><div>For a bit of context, what makes this diagnostic tricky is that the original error about the unknown identifier after the "-" or ">" occurs well within Sema as the parser is handling the RHS of a binary operator, but the recovery would require following a code path in the parser that was part of the construction of the LHS. And since Sema cannot tell the parser to back up a few steps....</div>
<div><br></div><div>Cheers,</div><div>Kaelyn</div></div>