diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-02-15 15:57:22 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-02-15 15:57:22 +0000 |
commit | 4e88df72e690498aeba2dc3d5089388b27be66fa (patch) | |
tree | 61f5639624fbd82d698db99e6fea1833f17676c4 /lib/Sema/SemaStmt.cpp | |
parent | 81f3bff7c202d688c9298bc049fdb5b6f77057b1 (diff) |
Specialize the diagnostic complaining about conflicting types of
return statements within a lambda; this diagnostic previously referred
to blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150584 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index b47e3d29d1..4351e9ba10 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -1847,9 +1847,9 @@ Sema::ActOnCapScopeReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp) { !CurCap->ReturnType->isDependentType() && !ReturnT->isDependentType() && !Context.hasSameType(ReturnT, CurCap->ReturnType)) { - // FIXME: Adapt diagnostic for lambdas. Diag(ReturnLoc, diag::err_typecheck_missing_return_type_incompatible) - << ReturnT << CurCap->ReturnType; + << ReturnT << CurCap->ReturnType + << getCurLambda() != 0; return StmtError(); } CurCap->ReturnType = ReturnT; |