[clang] ac017c8 - Fix MSVC "not all control paths return a value" warning. NFC. (#182482)

via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 20 04:11:33 PST 2026


Author: Simon Pilgrim
Date: 2026-02-20T12:11:27Z
New Revision: ac017c8e9385cea2b7ee551f518b86756f175ddd

URL: https://github.com/llvm/llvm-project/commit/ac017c8e9385cea2b7ee551f518b86756f175ddd
DIFF: https://github.com/llvm/llvm-project/commit/ac017c8e9385cea2b7ee551f518b86756f175ddd.diff

LOG: Fix MSVC "not all control paths return a value" warning. NFC. (#182482)

Added: 
    

Modified: 
    clang/lib/CodeGen/CGExprScalar.cpp

Removed: 
    


################################################################################
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