[clang] [ASTContext] Make the end of the switch case unreachable in `encodeTypeForFunctionPointerAuth` (PR #99763)
Brandon Wu via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 22 11:57:15 PDT 2024
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.wu at 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();
More information about the cfe-commits
mailing list