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
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index b47e3d2..4351e9b 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -1847,9 +1847,9 @@
         !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;