[clang] Fix MSVC "not all control paths return a value" warning. NFC. (PR #182482)
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 20 03:48:30 PST 2026
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/182482
None
>From 01de6c2125edc897b08d9faec10b3f43e183fc2d Mon Sep 17 00:00:00 2001
From: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: Fri, 20 Feb 2026 11:47:23 +0000
Subject: [PATCH] Fix MSVC "not all control paths return a value" warning. NFC.
---
clang/lib/CodeGen/CGExprScalar.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index 3ef9da7806606..75a18c9f60b96 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -224,6 +224,7 @@ getOverflowBehaviorConsideringType(const CodeGenFunction &CGF,
case LangOptions::SignedOverflowBehaviorTy::SOB_Trapping:
return LangOptions::OverflowBehaviorKind::OB_Trap;
}
+ llvm_unreachable("Unknown SignedOverflowBehaviorTy");
}
/// Check if we can skip the overflow check for \p Op.
More information about the cfe-commits
mailing list