diff options
author | Faisal Vali <faisalv@yahoo.com> | 2015-11-18 04:29:22 +0000 |
---|---|---|
committer | Faisal Vali <faisalv@yahoo.com> | 2015-11-18 04:29:22 +0000 |
commit | 0374bf0d07f3a39f31b70bf1ee8035a3ec7e9e4e (patch) | |
tree | db64655d5ad942a9093292615541591e6ed6a99d /lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py | |
parent | 8447ff6357b27725ad04abc042dcedc521630831 (diff) | |
download | bcm5719-llvm-0374bf0d07f3a39f31b70bf1ee8035a3ec7e9e4e.tar.gz bcm5719-llvm-0374bf0d07f3a39f31b70bf1ee8035a3ec7e9e4e.zip |
[NFC] Change the evaluation context of a non-type default template argument from Unevaluated to ConstantEvaluated.
This patch emits a more appropriate (but still noisy) diagnostic stream when a lambda-expression is encountered within a non-type default argument.
For e.g. template<int N = ([] { return 5; }())> int f();
As opposed to complaining that a lambda expression is not allowed in an unevaluated operand, the patch complains about the lambda being forbidden in a constant expression context (which will be allowed in C++17 now that they have been accepted by EWG, unless of course CWG or national bodies (that have so far shown no signs of concern) rise in protest)
As I start submitting patches for constexpr lambdas (http://wg21.link/P0170R0) under C++1z (OK'd by Richard Smith at Kona), this will be one less change to make.
Thanks!
llvm-svn: 253431
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py')
0 files changed, 0 insertions, 0 deletions