Sema: Improve comment introduced in r193397
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 5 Nov 2013 08:01:18 +0000 (08:01 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 5 Nov 2013 08:01:18 +0000 (08:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194052 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaLambda.cpp

index 2e1cd105a98fa098e48f517afe950225eb3b80d2..3fff7465bca68b47ed87db0c29db5aa7e830dce5 100644 (file)
@@ -1241,6 +1241,11 @@ ExprResult Sema::ActOnLambdaExpr(SourceLocation StartLoc, Stmt *Body,
     //   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