https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/99763
>From 1ca71c8ed8b9f0cee9887ad81ccccc03fd6a502f 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] Make the end of the switch case unreachable in `encodeTypeForFunctionPointerAuth` This prevent the warning from compiler. --- clang/lib/AST/ASTContext.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 90bcbea072e39..b964d01805f48 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -3363,6 +3363,7 @@ static void encodeTypeForFunctionPointerAuth(const ASTContext &Ctx, #include "clang/Basic/RISCVVTypes.def" llvm_unreachable("not yet implemented"); } + llvm_unreachable("should never get here"); } case Type::Record: { const RecordDecl *RD = T->getAs<RecordType>()->getDecl(); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits