From 6bae51a21c29e00050dddc76f3ea42af21745ebd Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Tue, 5 Nov 2013 08:01:18 +0000 Subject: [PATCH] Sema: Improve comment introduced in r193397 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194052 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaLambda.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Sema/SemaLambda.cpp b/lib/Sema/SemaLambda.cpp index 2e1cd105a9..3fff7465bc 100644 --- a/lib/Sema/SemaLambda.cpp +++ b/lib/Sema/SemaLambda.cpp @@ -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 -- 2.40.0