[PATCH] D133248: [clang] Fix crash upon stray coloncolon token in C2x mode

2022-10-18 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. In D133248#3865010 , @SuibianP wrote: > @aaron.ballman Thanks for the guidance! I have rectified the parentheses and > appended to the release notes. Please feel free to point out any additional > issues with the Differential. >

[PATCH] D133248: [clang] Fix crash upon stray coloncolon token in C2x mode

2022-10-18 Thread YingChi Long via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG94e8bd002c81: [clang] Fix crash upon stray coloncolon token in C2x mode (authored by Jialun Hu jialun...@apple.com, committed by inclyc).

[PATCH] D133248: [clang] Fix crash upon stray coloncolon token in C2x mode

2022-10-18 Thread Hu Jialun via Phabricator via cfe-commits
SuibianP added a comment. @aaron.ballman Thanks for the guidance! I have rectified the parentheses and appended to the release notes. Please feel free to point out any additional issues with the Differential. If all is good, I would like to have the patch attributed to `Jialun Hu `.

[PATCH] D133248: [clang] Fix crash upon stray coloncolon token in C2x mode

2022-10-18 Thread Hu Jialun via Phabricator via cfe-commits
SuibianP updated this revision to Diff 468509. SuibianP added a comment. Add release note entry Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133248/new/ https://reviews.llvm.org/D133248 Files: clang/docs/ReleaseNotes.rst

[PATCH] D133248: [clang] Fix crash upon stray coloncolon token in C2x mode

2022-10-18 Thread Hu Jialun via Phabricator via cfe-commits
SuibianP updated this revision to Diff 468488. SuibianP added a comment. Remove superfluous parentheses Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133248/new/ https://reviews.llvm.org/D133248 Files: clang/include/clang/Parse/Parser.h

[PATCH] D133248: [clang] Fix crash upon stray coloncolon token in C2x mode

2022-09-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Good catch that this was crashing! LGTM aside from the nit pointed out by @tbaeder. Can you also add a release note for the fix? Do you need someone to commit on your behalf? If

[PATCH] D133248: [clang] Fix crash upon stray coloncolon token in C2x mode

2022-09-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/include/clang/Parse/Parser.h:863 bool MightBeCXXScopeToken() { -return Tok.is(tok::identifier) || Tok.is(tok::coloncolon) || - (Tok.is(tok::annot_template_id) && -NextToken().is(tok::coloncolon)) || -

[PATCH] D133248: [clang] Fix crash upon stray coloncolon token in C2x mode

2022-09-02 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:5340 +if (!getLangOpts().CPlusPlus) + return false; if (NextToken().is(tok::kw_new) ||// ::new Maybe we can make a new `error` diagnostic definition and fire that here?

[PATCH] D133248: [clang] Fix crash upon stray coloncolon token in C2x mode

2022-09-02 Thread Hu Jialun via Phabricator via cfe-commits
SuibianP created this revision. Herald added a subscriber: jdoerfert. Herald added a project: All. SuibianP requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The parser assumes that the lexer never emits coloncolon token for C code, but this