https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/99763
>From 97dff508a361bbab478735eb4bf186d698649acf Mon Sep 17 00:00:00 2001 From: Brandon Wu <brandon...@sifive.com> Date: Sat, 20 Jul 2024 07:27:53 -0700 Subject: [PATCH] [ASTContext] Add a default case to nested switch in `encodeTypeForFunctionPointerAuth` This prevent the warning from compiler. --- clang/lib/AST/ASTContext.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 90bcbea072e39..87225b4702bd6 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -3285,6 +3285,8 @@ static void encodeTypeForFunctionPointerAuth(const ASTContext &Ctx, case Type::Builtin: { const auto *BTy = T->getAs<BuiltinType>(); switch (BTy->getKind()) { + default: + llvm_unreachable("not yet implemented"); #define SIGNED_TYPE(Id, SingletonId) \ case BuiltinType::Id: \ OS << "i"; \ _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits