diff options
| author | Faisal Vali <faisalv@yahoo.com> | 2017-01-09 11:47:51 +0000 |
|---|---|---|
| committer | Faisal Vali <faisalv@yahoo.com> | 2017-01-09 11:47:51 +0000 |
| commit | 20f0cf9767d461409da713a00a45864407cb88dc (patch) | |
| tree | a82a16f5b0de7f79c21570d2e20528c3ba49d7f2 | |
| parent | 74f27dc91b18d0a506ad8949fd5592797715e20a (diff) | |
| download | bcm5719-llvm-20f0cf9767d461409da713a00a45864407cb88dc.tar.gz bcm5719-llvm-20f0cf9767d461409da713a00a45864407cb88dc.zip | |
[cxx1z-constexpr-lambda] [NFC] Add a FIXME to reinstate certain restrictions on constexpr lambdas from appearing within function-signatures (CWG1607)
For further background, see Richard's comments: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20170109/181998.html
A patch to fix this is being worked on.
Thanks!
llvm-svn: 291439
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index d5378b87e0c..d62e8fd68b6 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -13118,7 +13118,13 @@ void Sema::PopExpressionEvaluationContext() { // evaluate [...] a lambda-expression. D = diag::err_lambda_in_constant_expression; } + // C++1z allows lambda expressions as core constant expressions. + // FIXME: In C++1z, reinstate the restrictions on lambda expressions (CWG + // 1607) from appearing within template-arguments and array-bounds that + // are part of function-signatures. Be mindful that P0315 (Lambdas in + // unevaluated contexts) might lift some of these restrictions in a + // future version. if (Rec.Context != ConstantEvaluated || !getLangOpts().CPlusPlus1z) for (const auto *L : Rec.Lambdas) Diag(L->getLocStart(), D); |

