[PATCH] D22996: [cxx1z-constexpr-lambda] Implement constant evaluation of non-capturing lambda expressions.

Faisal Vali via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 30 17:06:12 PDT 2016


faisalv created this revision.
faisalv added reviewers: rsmith, hubert.reinterpretcast, aaron.ballman, erik.pilkington.
faisalv added a subscriber: cfe-commits.
faisalv set the repository for this revision to rL LLVM.
faisalv added a project: clang-c.

Add a visitor for lambda expressions to RecordExprEvaluator in ExprConstant.cpp that creates an empty APValue Struct - thus supporting the following code:

constexpr auto ID = [] (auto a) { return a; };
static_assert(ID(3.14) == 3.14);




Repository:
  rL LLVM

https://reviews.llvm.org/D22996

Files:
  lib/AST/ExprConstant.cpp
  test/SemaCXX/cxx1z-constexpr-lambdas.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22996.66231.patch
Type: text/x-patch
Size: 4129 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160731/daffc813/attachment.bin>


More information about the cfe-commits mailing list