r331753 - Fix 'not all control paths return a value' MSVC warnings. NFCI.
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Tue May 8 02:40:33 PDT 2018
Author: rksimon
Date: Tue May 8 02:40:32 2018
New Revision: 331753
URL: http://llvm.org/viewvc/llvm-project?rev=331753&view=rev
Log:
Fix 'not all control paths return a value' MSVC warnings. NFCI.
Modified:
cfe/trunk/lib/AST/ExprConstant.cpp
cfe/trunk/lib/CodeGen/CGExprAgg.cpp
Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=331753&r1=331752&r2=331753&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Tue May 8 02:40:32 2018
@@ -8616,6 +8616,7 @@ EvaluateComparisonBinaryOperator(EvalInf
case APFloat::cmpUnordered:
return CCR::Unordered;
}
+ llvm_unreachable("Unrecognised APFloat::cmpResult enum");
};
return Success(GetCmpRes(), E);
}
Modified: cfe/trunk/lib/CodeGen/CGExprAgg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprAgg.cpp?rev=331753&r1=331752&r2=331753&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprAgg.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprAgg.cpp Tue May 8 02:40:32 2018
@@ -920,6 +920,7 @@ static llvm::Value *EmitCompare(CGBuilde
case CK_Equal:
return {"cmp.eq", FI::FCMP_OEQ, II::ICMP_EQ, II::ICMP_EQ};
}
+ llvm_unreachable("Unrecognised CompareKind enum");
}();
if (ArgTy->hasFloatingRepresentation())
More information about the cfe-commits
mailing list