[PATCH] D56723: [CodeComplete] Propagate preferred types through parser in more cases

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 24 06:31:52 PST 2019


ilya-biryukov added a comment.

In D56723#1366885 <https://reviews.llvm.org/D56723#1366885>, @rsmith wrote:

> `ConsumeToken` is a fairly hot function; if you can avoid changes there that'd be preferable.


Done, there are no `enterUnknown` calls anymore and to avoid updating on each call to `ConsumeToken` we now store a location of the token we computed the expected type for.
The resulting code looks ok to my taste, let me know what you think.

Initially I thought this approach would allow to get rid of the RAII object to restore the type, but I don't see a good alternative to it even with the new approach.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56723/new/

https://reviews.llvm.org/D56723





More information about the cfe-commits mailing list