From a5ba0cb77223546475c7a2ceae41d708b5003fcc Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 13 Jul 2007 20:07:11 +0000 Subject: [PATCH] silence a bogus gcc warning. llvm-svn: 39824 --- clang/CodeGen/CGStmt.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang/CodeGen/CGStmt.cpp b/clang/CodeGen/CGStmt.cpp index 193acb716a89..88df7d411683 100644 --- a/clang/CodeGen/CGStmt.cpp +++ b/clang/CodeGen/CGStmt.cpp @@ -247,6 +247,8 @@ void CodeGenFunction::EmitReturnStmt(const ReturnStmt &S) { const Expr *RV = S.getRetValue(); if (RV) RetVal = EmitExpr(RV); + else // Silence a bogus GCC warning. + RetVal = RValue::get(0); QualType FnRetTy = CurFuncDecl->getType().getCanonicalType(); FnRetTy = cast(FnRetTy)->getResultType();