diff options
author | Faisal Vali <faisalv@yahoo.com> | 2017-01-08 18:56:11 +0000 |
---|---|---|
committer | Faisal Vali <faisalv@yahoo.com> | 2017-01-08 18:56:11 +0000 |
commit | d92e7499fb966f0513ba9c2e6fbd21b638b423d0 (patch) | |
tree | 6d81416bfa85454daea875cf4c7c70d690dad675 /clang/lib/Sema/SemaLambda.cpp | |
parent | ccd3e6803c33dfe7b9806027f24cd9448bee9147 (diff) | |
download | bcm5719-llvm-d92e7499fb966f0513ba9c2e6fbd21b638b423d0.tar.gz bcm5719-llvm-d92e7499fb966f0513ba9c2e6fbd21b638b423d0.zip |
[cxx1z-constexpr-lambda] Make conversion function constexpr, and teach the expression-evaluator to evaluate the static-invoker.
This patch has been sitting in review hell since july 2016 and our lack of constexpr lambda support is getting embarrassing (given that I've had a branch that implements the feature (modulo *this capture) for over a year. While in Issaquah I was enjoying shamelessly trying to convince folks of the lie that this was Richard's fault ;) I won't be able to do so in Kona since I won't be attending - so I'm going to aim to have this feature be implemented by then.
I'm quite confident of the approach in this patch, which simply maps the static-invoker 'thunk' back to the corresponding call-operator (specialization).
Thanks!
llvm-svn: 291397
Diffstat (limited to 'clang/lib/Sema/SemaLambda.cpp')
-rw-r--r-- | clang/lib/Sema/SemaLambda.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp index 1680d8a6960..a0d574915eb 100644 --- a/clang/lib/Sema/SemaLambda.cpp +++ b/clang/lib/Sema/SemaLambda.cpp @@ -1274,7 +1274,7 @@ static void addFunctionPointerConversion(Sema &S, ConvTy, ConvTSI, /*isInline=*/true, /*isExplicit=*/false, - /*isConstexpr=*/false, + /*isConstexpr=*/S.getLangOpts().CPlusPlus1z, CallOperator->getBody()->getLocEnd()); Conversion->setAccess(AS_public); Conversion->setImplicit(true); |