[PATCH] D76592: [Parser] Fix the assertion crash in ActOnStartOfSwitch stmt.

2020-03-24 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG386f95e168b0: [Parser] Fix the assertion crash in ActOnStartOfSwitch stmt. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76592/new/ ht

[PATCH] D76592: [Parser] Fix the assertion crash in ActOnStartOfSwitch stmt.

2020-03-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 252281. hokein added a comment. fix a typo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76592/new/ https://reviews.llvm.org/D76592 Files: clang/lib/Sema/SemaStmt.cpp clang/test/Parser/switch-typo-correcti

[PATCH] D76592: [Parser] Fix the assertion crash in ActOnStartOfSwitch stmt.

2020-03-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 252280. hokein added a comment. adjust the assertion based on the offline discussion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76592/new/ https://reviews.llvm.org/D76592 Files: clang/lib/Sema/SemaStmt.cp

[PATCH] D76592: [Parser] Fix the assertion crash in ActOnStartOfSwitch stmt.

2020-03-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:709 } SwitchDiagnoser(Cond); + // The TypoExpr might be corrected to a non-intergral-or-enum type in the + // later stage without the proper type check, which is in

[PATCH] D76592: [Parser] Fix the assertion crash in ActOnStartOfSwitch stmt.

2020-03-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:709 } SwitchDiagnoser(Cond); + // The TypoExpr might be corrected to a non-intergral-or-enum type in the + // later stage without the proper type check, which is invalid for switch How

[PATCH] D76592: [Parser] Fix the assertion crash in ActOnStartOfSwitch stmt.

2020-03-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, ilya-biryukov. Herald added a project: clang. After we parse the switch condition, we don't do the type check for type-dependent expr (e.g. TypoExpr) (in Sema::CheckSwitchCondition), th