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();