r194052 - Sema: Improve comment introduced in r193397

David Majnemer david.majnemer at gmail.com
Tue Nov 5 00:01:18 PST 2013

Author: majnemer
Date: Tue Nov  5 02:01:18 2013
New Revision: 194052

URL: http://llvm.org/viewvc/llvm-project?rev=194052&view=rev
Sema: Improve comment introduced in r193397


Modified: cfe/trunk/lib/Sema/SemaLambda.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLambda.cpp?rev=194052&r1=194051&r2=194052&view=diff
--- cfe/trunk/lib/Sema/SemaLambda.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLambda.cpp Tue Nov  5 02:01:18 2013
@@ -1241,6 +1241,11 @@ ExprResult Sema::ActOnLambdaExpr(SourceL
     //   A conditional-expression e is a core constant expression unless the
     //   evaluation of e, following the rules of the abstract machine, would
     //   evaluate [...] a lambda-expression.
+    //
+    // This is technically incorrect, there are some constant evaluated contexts
+    // where this should be allowed.  We should probably fix this when DR1607 is
+    // ratified, it lays out the exact set of conditions where we shouldn't
+    // allow a lambda-expression.
     case ConstantEvaluated:
       // We don't actually diagnose this case immediately, because we
       // could be within a context where we might find out later that

More information about the cfe-commits mailing list