erik.pilkington added inline comments.
================ Comment at: clang/lib/Sema/SemaDecl.cpp:12886 if (!IsInstantiation && FD && FD->isConstexpr() && !FD->isInvalidDecl() && + !isLambdaCallOperator(FD) && (!CheckConstexprFunctionDecl(FD) || ---------------- faisalv wrote: > Hmm - as opposed to further leaking our lambda's implementation-details into > ActOnFinishFunctionBody - and duplicating these checks for a lambda marked > constexpr, I think I would prefer teaching the expression-evaluator > (ExprConstant.cpp) to know how to check a lambda's function call operator for > constexprness (i.e. avoid creating the capture-to-field-map when > 'checkingPotentialConstantExpression()' and ignore evaluating expressions > that refer to enclosing variables since their evaluation should not affect > inferring constexprness). > > Thoughts? > > That's a really good point, makes this a lot simpler. Thanks! https://reviews.llvm.org/D45194 _______________________________________________ cfe-commits mailing list email@example.com http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits