Go to file
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
clang [NFC] Change the evaluation context of a non-type default template argument from Unevaluated to ConstantEvaluated. 2015-11-18 04:29:22 +00:00
clang-tools-extra Revert r253401, "[clang-tidy] add check cppcoreguidelines-pro-bounds-constant-array-index" 2015-11-18 02:14:35 +00:00
compiler-rt [TSan] List only amd64 asm file in Makefile.old (attempt 2) 2015-11-18 00:56:37 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc integer: remove explicit casts from _MIN definitions 2015-10-06 19:12:12 +00:00
libcxx Fix bad variable name. project_root -> project_obj_root 2015-11-17 21:48:29 +00:00
libcxxabi Fix LIBCXXABI_HAS_NO_THREADS configuration. 2015-10-14 19:21:38 +00:00
libunwind Make it possible to use libunwind without heap. 2015-11-09 06:57:29 +00:00
lld COFF: Destroy LTOModules as they are linked. 2015-11-17 23:30:59 +00:00
lldb Remove a few vestigial typedefs from the old world 2015-11-18 01:44:36 +00:00
llgo debug: Update for debug info API change. 2015-11-05 22:04:20 +00:00
llvm Add a test for r253323 2015-11-18 02:50:39 +00:00
openmp Add newlines to debug TRACE messages in kmp_taskdeps.cpp 2015-11-16 22:53:38 +00:00
polly ScopInfo: Ensure unique names for parameter names coming from load instructions 2015-11-17 11:54:51 +00:00