[PATCH] D130460: [pseudo] Add recovery for declarations

2022-09-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 462448. hokein added a comment. Fix a bug caused by my change, and add test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130460/new/ https://reviews.llvm.org/D130460 Files: clang-tools-extra/pseudo/include/

[PATCH] D130460: [pseudo] Add recovery for declarations

2022-09-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. I think the current version should be good to review, some bits need to take care of: - left-recursive vs right-recursive of declaration-seq rule, see my other comments about it. Currently I keep it as-is to avoid the performance regression on large files (I still don't

[PATCH] D130460: [pseudo] Add recovery for declarations

2022-09-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 462107. hokein added a comment. - rebase, fixed a few conflicts - address comments - fix some bugs - restructure the code, moving the implementation to a separate file - add unittests for recoveryNextDeclaration - keep the left-recursive declaration-seq grammar

[PATCH] D130460: [pseudo] Add recovery for declarations

2022-09-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. I'm going to pick this up. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130460/new/ https://reviews.llvm.org/D130460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[PATCH] D130460: [pseudo] Add recovery for declarations

2022-09-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein commandeered this revision. hokein edited reviewers, added: sammccall; removed: hokein. hokein added inline comments. Comment at: clang-tools-extra/pseudo/lib/cxx/CXX.cpp:333 + // Walk over tokens at the appropriate bracket nesting level. + for (const Token *T = &P.Token

[PATCH] D130460: [pseudo] Add recovery for declarations

2022-07-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/pseudo/lib/cxx/CXX.cpp:267 +Token::Index recoverNextDeclaration(const RecoveryParams &P) { + if (P.Begin == P.Tokens.tokens().size()) I think this excludes the parameter-declaration (from the grammar

[PATCH] D130460: [pseudo] Add recovery for declarations

2022-07-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, alextsao1999. Herald added a project: clang-tools-extra. - declaration recovery strategy: search for likely declarat

[PATCH] D130460: [pseudo] Add recovery for declarations

2022-07-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This may well need refinement & more testing, interested in initial thoughts Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130460/new/ https://reviews.llvm.org/D130460 ___ cfe-