[clang] e41dd02 - Fix MSVC "not all control paths return a value" warning

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 19 09:38:23 PDT 2022


Author: Simon Pilgrim
Date: 2022-08-19T17:37:37+01:00
New Revision: e41dd0205242af4f8e2a370d0346f24f0b0eb788

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

LOG: Fix MSVC "not all control paths return a value" warning

Added: 
    

Modified: 
    clang/lib/AST/Interp/ByteCodeExprGen.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
index 8f53f0e1d6f5..be2c48456b5b 100644
--- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp
+++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
@@ -147,6 +147,7 @@ bool ByteCodeExprGen<Emitter>::VisitCastExpr(const CastExpr *CE) {
   default:
     assert(false && "Cast not implemented");
   }
+  llvm_unreachable("Unhandled clang::CastKind enum");
 }
 
 template <class Emitter>


        


More information about the cfe-commits mailing list