[PATCH] D22997: [cxx1z-constexpr-lambda] Make conversion function constexpr, and teach the expression-evaluator to evaluate the static-invoker.

Faisal Vali via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 30 19:04:51 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.


This patch enables the following code:

  auto L = [](int i) { return i; };
  constexpr int (*fpi)(int) = L;
  static_assert(fpi(3) == 3);


Repository:
  rL LLVM

https://reviews.llvm.org/D22997

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

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


More information about the cfe-commits mailing list