[all-commits] [llvm/llvm-project] 386f95: [Parser] Fix the assertion crash in ActOnStartOfSw...
Haojian Wu via All-commits
all-commits at lists.llvm.org
Tue Mar 24 07:17:14 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 386f95e168b09603595864a5956624792ccb59c4
https://github.com/llvm/llvm-project/commit/386f95e168b09603595864a5956624792ccb59c4
Author: Haojian Wu <hokein.wu at gmail.com>
Date: 2020-03-24 (Tue, 24 Mar 2020)
Changed paths:
M clang/lib/Sema/SemaStmt.cpp
A clang/test/Parser/switch-typo-correction.cpp
Log Message:
-----------
[Parser] Fix the assertion crash in ActOnStartOfSwitch stmt.
Summary:
After we parse the switch condition, we don't do the type check for
type-dependent expr (e.g. TypoExpr) (in Sema::CheckSwitchCondition), then the
TypoExpr is corrected to an invalid-type expr (in Sema::MakeFullExpr) and passed
to the ActOnStartOfSwitchStmt, which triggers the assertion.
Fix https://github.com/clangd/clangd/issues/311
Reviewers: sammccall
Subscribers: ilya-biryukov, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D76592
More information about the All-commits
mailing list