[cfe-commits] r147620 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDeclCXX.cpp lib/Sema/SemaTemplateInstantiateDecl.cpp test/CXX/temp/temp.decls/temp.variadic/p4.cpp test/SemaCXX/dependent-auto.cpp
Richard Smith
richard at metafoo.co.uk
Thu Jan 5 16:34:55 PST 2012
On Thu, January 5, 2012 22:34, Eli Friedman wrote:
> Author: efriedma
> Date: Thu Jan 5 16:34:08 2012
> New Revision: 147620
>
>
> URL: http://llvm.org/viewvc/llvm-project?rev=147620&view=rev
> Log:
> Tweak the fix to PR8977: an empty expression-list represents value
> initialization, not default initialization. Fixes PR11712.
>
>
> Modified:
> cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
> cfe/trunk/lib/Sema/SemaDeclCXX.cpp
> cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
> cfe/trunk/test/CXX/temp/temp.decls/temp.variadic/p4.cpp
> cfe/trunk/test/SemaCXX/dependent-auto.cpp
>
> Modified: cfe/trunk/test/CXX/temp/temp.decls/temp.variadic/p4.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.decls/temp.v
> ariadic/p4.cpp?rev=147620&r1=147619&r2=147620&view=diff
> =============================================================================
> =
> --- cfe/trunk/test/CXX/temp/temp.decls/temp.variadic/p4.cpp (original)
> +++ cfe/trunk/test/CXX/temp/temp.decls/temp.variadic/p4.cpp Thu Jan 5
> 16:34:08 2012
> @@ -37,7 +37,8 @@
> namespace PR8977 {
> struct A { };
> template<typename T, typename... Args> void f(Args... args) {
> - T t(args...);
> + // An empty expression-list performs value initialization.
> + constexpr T t(args...);
> };
>
> template void f<A>();
Ha, neat test :) [Though I note that... 14.6/8 "If every valid specialization
of a variadic template requires an empty template parameter pack, the template
definition is ill-formed, no diagnostic required.".]
- Richard
More information about the cfe-commits
mailing list