llvm-project/clang/test/CXX/temp
Faisal Vali 0374bf0d07 [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
2015-11-18 04:29:22 +00:00
..
temp.arg [NFC] Change the evaluation context of a non-type default template argument from Unevaluated to ConstantEvaluated. 2015-11-18 04:29:22 +00:00
temp.decls [Lit Test] Updated 34 Lit tests to be C++11 compatible. 2015-11-17 20:25:05 +00:00
temp.fct.spec [Lit Test] Updated 26 Lit tests to be C++11 compatible. 2015-11-11 19:34:47 +00:00
temp.names Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
temp.param [Lit Test] Updated 34 Lit tests to be C++11 compatible. 2015-11-17 20:25:05 +00:00
temp.res Avoid duplicated diagnostic when lookup for a nested-name-specifier fails due to ambiguity. 2015-11-12 22:40:09 +00:00
temp.spec [Lit Test] Updated 34 Lit tests to be C++11 compatible. 2015-11-17 20:25:05 +00:00
temp.type
p3.cpp Implement DR482: namespace members can be redeclared with a qualified name 2013-12-05 07:51:02 +00:00