rsmith requested changes to this revision. rsmith added a comment. This revision now requires changes to proceed.
Per [dcl.type.class.deduct]p1, only the initializing declaration of a variable can use a placeholder type. The existing diagnostic was correct in many of the modified cases. ================ Comment at: test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.class.deduct/p1.cpp:15 struct B { - static A a; // expected-error {{requires an initializer}} + static A a; }; ---------------- This should be ill-formed: this is not the initializing declaration of `B::a`. ================ Comment at: test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.class.deduct/p1.cpp:17 }; -extern A x; // expected-error {{requires an initializer}} +extern A x; ---------------- Likewise, this should remain ill-formed. ================ Comment at: test/Parser/cxx1z-class-template-argument-deduction.cpp:55 - static A x; // expected-error {{declaration of variable 'x' with deduced type 'A' requires an initializer}} + static A x; static constexpr A y = 0; ---------------- Likewise. https://reviews.llvm.org/D38216 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits