]> granicus.if.org Git - clang/commitdiff
Add llvm_unreachable at end of fully covered switch
authorHans Wennborg <hans@hanshq.net>
Mon, 6 May 2013 15:13:34 +0000 (15:13 +0000)
committerHans Wennborg <hans@hanshq.net>
Mon, 6 May 2013 15:13:34 +0000 (15:13 +0000)
To pacify GCC warning about control reaching end of non-void function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181197 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ExprConstant.cpp

index 2b9d13cec0bb5ec1817cc11a28be7765f1524fea..8c650290b579429812f3a68cb08374fb29640f23 100644 (file)
@@ -2514,6 +2514,7 @@ static EvalStmtResult EvaluateLoopBody(APValue &Result, EvalInfo &Info,
   case ESR_Returned:
     return ESR;
   }
+  llvm_unreachable("Invalid EvalStmtResult!");
 }
 
 // Evaluate a statement.