[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2020-07-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Herald added a subscriber: dang. I wasn't able to add you to the bug report, but I discovered this: https://bugs.llvm.org/show_bug.cgi?id=46837 I'm still working on it, but if you have a suggestion, I'd appreciate it. Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2020-03-24 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. hokein marked an inline comment as done. Closed by commit rG733edf9750a4: [AST] Add RecoveryExpr to retain expressions on semantic errors (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D69330?vs=2

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2020-03-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 252238. hokein marked 2 inline comments as done. hokein added a comment. add -fno-recovery-ast, and negative tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69330/new/ https://reviews.llvm.org/D69330 Files

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2020-03-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. Comment at: clang/include/clang/Basic/LangOptions.def:151 +LANGOPT(RecoveryAST, 1, 0, "Preserve expressions in AST when encountering errors") + this should be COMPATIBLE_LANGOPT I believe - it

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2020-03-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 252046. hokein added a comment. - add -frecovery-ast cc1 option - defer changes for existing tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69330/new/ https://reviews.llvm.org/D69330 Files: clang/includ

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2020-03-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/include/clang/AST/Expr.h:5920 +/// +/// RecoveryExpr is type-, value- and instantiation-dependent to take advantage +/// of existing machinery to deal with dependent code in C++, e.g. RecoveryExpr sammccall wrote: >

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2020-03-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 251966. hokein marked 7 inline comments as done. hokein added a comment. address some comments, add missing tree-transform testcase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69330/new/ https://reviews.llvm.

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2020-03-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Fantastic :-) @rsmith and others: would appreciate feedback on giving this a feature-flag (to decouple from LangOpts.CPlusPlus): - whether it's OK to have one - whether it should be cc1-only - the name `-f[no]recovery-ast` Comment at: clang/include

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2020-03-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. all prerequisite patches have been landed, it is time to land this patch now. Would be nice to have a second look before committing it +@sammccall. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69330/new/ https://reviews.ll

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2020-03-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 251393. hokein added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69330/new/ https://reviews.llvm.org/D69330 Files: clang/include/clang/AST/ComputeDependence.h clang/include/clang/AST/Exp

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2020-03-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 250765. hokein added a comment. Herald added a subscriber: martong. - rebase to master, fix more broken tests - preferType in CodeCompletTest - openMP diagnostics target_update_from_messages.cpp, target_update_to_messages.cpp - RecoveryExpression RValue =>

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2020-01-31 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon question-circle color=gray} Unit tests: unknown. {icon question-circle color=gray} clang-tidy: unknown. {icon question-circle color=gray} clang-format: unknown. Build artifacts : diff

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2020-01-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 241718. ilya-biryukov added a comment. Fix compilation after rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69330/new/ https://reviews.llvm.org/D69330 Files: clang/include/clang/AST/ComputeDepend

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2020-01-31 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon question-circle color=gray} Unit tests: unknown. {icon question-circle color=gray} clang-tidy: unknown. {icon question-circle color=gray} clang-format: unknown. Build artifacts : diff

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2020-01-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 241717. ilya-biryukov added a comment. Herald added a subscriber: bmahjour. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69330/new/ https://reviews.llvm.org/D69330 Files: clang/include/clang/

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2019-11-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. @rsmith, could you also take a look at D65591 ? It's really important to have the `containsError()` check in this patch that marks decls with undeduced types as invalid. Otherwise, they

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2019-11-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 230270. ilya-biryukov added a comment. - Do not correct typos when creating recovery expr - Simplify StmtPrinter::VisitRecoveryExpr - Add -Wno-used and remove extra expect-warning directives Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2019-11-19 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. In D69330#1752089 , @ilya-biryukov wrote: > In D69330#1746137 , @rsmith wrote: > > > I would prefer that we ha

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2019-11-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked 13 inline comments as done. ilya-biryukov added a comment. In D69330#1746137 , @rsmith wrote: > I would prefer that we have dedicated tests for them rather than scattering > the tests throughout the existing test suite (for example, c

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2019-11-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 230104. ilya-biryukov marked 7 inline comments as done. ilya-biryukov added a comment. - Rename ActOnSemanticError to CreateRecoveryExpr - Do not print anything for recovery expr in TextNodeDumper - canThrow(RecoveryExpr) now returns CT_Dependent - Store

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2019-11-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I would prefer that we have dedicated tests for them rather than scattering the tests throughout the existing test suite (for example, consider adding `-Wno-unused` to the tests producing "result unused" warnings and adding a dedicated test). Comment

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2019-10-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: rsmith. Herald added subscribers: usaxena95, erik.pilkington, kadircet, arphaman. Herald added a project: clang. Normally clang avoids creating expressions when it encounters semantic errors, even if the parser knows which expres