<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Feb 15, 2012, at 11:26 AM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">On Wed, Feb 15, 2012 at 8:20 AM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: dgregor<br>
Date: Wed Feb 15 10:20:15 2012<br>
New Revision: 150586<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=150586&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=150586&view=rev</a><br>
Log:<br>
Specialize noreturn diagnostics for lambda expressions.<br>
<br>
Modified:<br>
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td<br>
    cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp<br>
    cfe/trunk/lib/Sema/SemaStmt.cpp<br>
    cfe/trunk/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp<br>
    cfe/trunk/test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp<br>
    cfe/trunk/test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp<br>
<br>
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=150586&r1=150585&r2=150586&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=150586&r1=150585&r2=150586&view=diff</a><br>

==============================================================================<br>
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)<br>
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Wed Feb 15 10:20:15 2012<br>
@@ -4045,6 +4045,14 @@<br>
   def ext_lambda_default_arguments : ExtWarn<<br>
     "C++11 forbids default arguments for lambda expressions">,<br>
     InGroup<LambdaExtensions>;<br>
+  def err_noreturn_lambda_has_return_expr : Error<<br>
+    "lambda declared 'noreturn' should not return">;<br>
+  def warn_maybe_falloff_nonvoid_lambda : Warning<<br>
+    "control may reach end of non-void lambda">,<br>
+    InGroup<ReturnType>;<br>
+  def warn_falloff_nonvoid_lambda : Warning<<br>
+    "control reaches end of non-void lambda">,<br>
+    InGroup<ReturnType>;<br>
 }<br>
<br>
 def err_operator_arrow_circular : Error<<br>
<br>
Modified: cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp?rev=150586&r1=150585&r2=150586&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp?rev=150586&r1=150585&r2=150586&view=diff</a><br>

==============================================================================<br>
--- cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp (original)<br>
+++ cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp Wed Feb 15 10:20:15 2012<br>
@@ -218,7 +218,8 @@<br>
   unsigned diag_AlwaysFallThrough_HasNoReturn;<br>
   unsigned diag_AlwaysFallThrough_ReturnsNonVoid;<br>
   unsigned diag_NeverFallThroughOrReturn;<br>
-  bool funMode;<br>
+  enum { Function, Block, Lambda } funMode;<br>
+  bool IsLambda;<br></blockquote><div><br></div><div>It looks like you're not using this new member.</div></div>
</blockquote></div><br><div>Fixed in r150611, thanks!</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">    </span>- Doug</div></body></html>