diff options
author | Shafik Yaghmour <shafik.yaghmour@intel.com> | 2022-08-27 15:18:36 -0700 |
---|---|---|
committer | Shafik Yaghmour <shafik.yaghmour@intel.com> | 2022-08-27 15:18:36 -0700 |
commit | aa7ce60536a642e825d26d89b4a4347a36b63360 (patch) | |
tree | 6de1e3eb120d77af6ff41a0cbf846e6fd97f9ca9 /llvm/lib/Transforms/Utils/LoopSimplify.cpp | |
parent | 44a06b51b2ce2c75ec327902b7ddd1172e54bc8f (diff) | |
download | llvm-aa7ce60536a642e825d26d89b4a4347a36b63360.zip llvm-aa7ce60536a642e825d26d89b4a4347a36b63360.tar.gz llvm-aa7ce60536a642e825d26d89b4a4347a36b63360.tar.bz2 |
[Clang] Avoid crashes when parsing using enum declarations
In Parser::ParseUsingDeclaration(...) when we call ParseEnumSpecifier(...) it is
not calling SetTypeSpecError() on DS when it detects an error. That means that
DS is left set to TST_unspecified. When we then pass DS into
Sema::ActOnUsingEnumDeclaration(...) we hit an llvm_unreachable(...) since it
expects it to be one of three states TST_error, TST_enum or TST_typename.
This fixes https://github.com/llvm/llvm-project/issues/57347
Differential Revision: https://reviews.llvm.org/D132695
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopSimplify.cpp')
0 files changed, 0 insertions, 0 deletions