diff options
author | Anders Carlsson <andersca@mac.com> | 2009-05-15 00:48:27 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-05-15 00:48:27 +0000 |
commit | 03d77760a5db7990724b6901cea958a673ce0b39 (patch) | |
tree | 7d52643d5b2c315e88c58ffd6377ca2597595552 /lib/Sema/SemaStmt.cpp | |
parent | fd0e628aa8a1e3932445559cb1d950fee11ea9a9 (diff) |
Instantiate return statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71825 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index 0c181ecf01..e200c46e4f 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -823,7 +823,7 @@ Sema::ActOnReturnStmt(SourceLocation ReturnLoc, ExprArg rex) { return Owned(new (Context) ReturnStmt(ReturnLoc, RetValExp)); } - if (!RetValExp) { + if (!RetValExp && !FnRetType->isDependentType()) { unsigned DiagID = diag::warn_return_missing_expr; // C90 6.6.6.4p4 // C99 6.8.6.4p1 (ext_ since GCC warns) if (getLangOptions().C99) DiagID = diag::ext_return_missing_expr; |