[PATCH] D156277: [Parser][ObjC] Fix parser crash on nested top-level block with better recovery path
Ding Fei via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 28 01:42:26 PDT 2023
danix800 updated this revision to Diff 545056.
danix800 retitled this revision from "[Parser][ObjC] Stop parsing on eof" to "[Parser][ObjC] Fix parser crash on nested top-level block with better recovery path".
danix800 edited the summary of this revision.
danix800 added a comment.
Delay consuming tokens and bail out early if nested top-level block are met
for better diag & recovery.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156277/new/
https://reviews.llvm.org/D156277
Files:
clang/lib/Parse/ParseObjc.cpp
clang/test/Parser/missing-end-1-gh64065-nocrash.m
clang/test/Parser/missing-end-2.m
clang/test/Parser/missing-end-3.m
clang/test/Parser/missing-end-4.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156277.545056.patch
Type: text/x-patch
Size: 4720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230728/78ed19a2/attachment.bin>
More information about the cfe-commits
mailing list