[PATCH] D45194: [Sema] Defer checking constexpr lambda until after we've finished the lambda class.
Erik Pilkington via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 4 15:51:17 PDT 2018
erik.pilkington added a comment.
> LGTM - can you commit?
Yep, I'll do that now. Thanks for reviewing!
================
Comment at: clang/lib/AST/ExprConstant.cpp:5212
+ cast<DeclRefExpr>(E)->refersToEnclosingVariableOrCapture()) {
+ // We don't track the lambda's captures in a potential constant expression.
+ if (Info.checkingPotentialConstantExpression())
----------------
faisalv wrote:
> How about something along the lines of : We don't always have a complete capture-map when checking or inferring if the function call operator meets the requirements of a constexpr function - and we don't need to evaluate the captures to determine constexprness (dcl.constexpr C++17)?
Sure, I just copied that verbatim into the commit.
https://reviews.llvm.org/D45194
More information about the cfe-commits
mailing list