[PATCH] D149276: [Clang] Fix parsing of `(auto(x))`.
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 18 10:45:03 PDT 2023
aaron.ballman added inline comments.
================
Comment at: clang/lib/Parse/ParseTentative.cpp:2178-2182
+// When parsing an identifier after an arrow
+// it may be a member expression, in which case we
+// should not annotate it as an independant expression
+// so we just lookup that name, if it's not a type
+// the construct is not a function declaration
----------------
This comment looks like it can be re-flowed to 80 columns instead of shortened like this.
================
Comment at: clang/lib/Parse/ParseTentative.cpp:2185-2187
+ Token Next = NextToken();
+ if (NextToken().is(tok::coloncolon))
+ return false;
----------------
Something smells off here -- `NextToken()` is a peek; were you trying to advance the tokens stream? If not, then `Next.is(...)` would be more clear.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149276/new/
https://reviews.llvm.org/D149276
More information about the cfe-commits
mailing list