llvm-project/clang/lib/Parse
Shafik Yaghmour aa7ce60536 [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
2022-08-27 15:18:36 -07:00
..
CMakeLists.txt [HLSL] Add Semantic syntax, and SV_GroupIndex 2022-04-14 10:21:58 -05:00
ParseAST.cpp re-land [C++20][Modules] Build module static initializers per P1874R1. 2022-07-22 08:38:07 +01:00
ParseCXXInlineMethods.cpp [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00
ParseDecl.cpp [Clang] Avoid crashes when parsing using enum declarations 2022-08-27 15:18:36 -07:00
ParseDeclCXX.cpp Diagnosing the Future Keywords 2022-08-26 09:20:05 -04:00
ParseExpr.cpp [clang] adds unary type transformations as compiler built-ins 2022-08-22 03:03:32 +00:00
ParseExprCXX.cpp [clang] adds unary type transformations as compiler built-ins 2022-08-22 03:03:32 +00:00
ParseHLSL.cpp [HLSL] Add Semantic syntax, and SV_GroupIndex 2022-04-14 10:21:58 -05:00
ParseInit.cpp [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00
ParseObjc.cpp [clang] Reject non-declaration C++11 attributes on declarations 2022-06-15 11:58:26 +02:00
ParseOpenMP.cpp [OpenMP][NFC] Use OMPInteropInfo in the OMPDeclareVariantAttr attribute 2022-08-22 10:41:16 -07:00
ParsePragma.cpp [RISCV] Lazily add RVV C intrinsics. 2022-07-26 15:47:47 +08:00
ParseStmt.cpp [clang] adds unary type transformations as compiler built-ins 2022-08-22 03:03:32 +00:00
ParseStmtAsm.cpp [clang] Fix bugprone argument comments (NFC) 2022-01-09 00:19:49 -08:00
ParseTemplate.cpp [clang] Add cxx scope if needed for requires clause. 2022-08-26 10:15:54 +02:00
ParseTentative.cpp [clang] adds unary type transformations as compiler built-ins 2022-08-22 03:03:32 +00:00
Parser.cpp [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00