[PATCH] D76592: [Parser] Fix the assertion crash in ActOnStartOfSwitch stmt.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 23 19:04:28 PDT 2020
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 do we know Cond is a TypoExpr directly rather than containing one?
I think the usual strategy when code can't deal with typo correction being delayed further is to call CorrectDelayedTyposInExpr.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76592/new/
https://reviews.llvm.org/D76592
More information about the cfe-commits
mailing list