summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaLambda.cpp
diff options
context:
space:
mode:
authorFaisal Vali <faisalv@yahoo.com>2017-01-08 18:56:11 +0000
committerFaisal Vali <faisalv@yahoo.com>2017-01-08 18:56:11 +0000
commitd92e7499fb966f0513ba9c2e6fbd21b638b423d0 (patch)
tree6d81416bfa85454daea875cf4c7c70d690dad675 /clang/lib/Sema/SemaLambda.cpp
parentccd3e6803c33dfe7b9806027f24cd9448bee9147 (diff)
downloadbcm5719-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.cpp2
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);
OpenPOWER on IntegriCloud