[PATCH] D50763: [Parser] Refactor and fix bugs in late-parsing

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 9 16:30:45 PDT 2019


rsmith added inline comments.
Herald added a project: clang.


================
Comment at: lib/Parse/ParseCXXInlineMethods.cpp:266
+public:
+  UseCachedTokensRAII(Parser &Self, CachedTokens &Cache, const void *Data)
+      : Self(Self), Data(Data) {
----------------
Can you pass ownership of the cached tokens into here instead of passing a mutable reference? It makes me uncomfortable for this object to be modifying a list of tokens that it doesn't own (by adding an EOF token) -- that's not something I'd ever expect a utility with this name to do!


Repository:
  rC Clang

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

https://reviews.llvm.org/D50763





More information about the cfe-commits mailing list