Page MenuHomePhabricator

[Sema] Diagnose template alias declaration in local class

Authored by erik.pilkington on Mar 31 2016, 9:38 AM.



Clang currently doesn't diagnose the following invalid code:
void f() {

struct s {
  template<class> using x = int;


Despite begin rejected by both GCC and the standard, in temp p2. Fixes PR26841.

Diff Detail

Event Timeline

erik.pilkington retitled this revision from to [Sema] Diagnose template alias declaration in local class.
erik.pilkington updated this object.
erik.pilkington added a reviewer: rsmith.
erik.pilkington added a subscriber: cfe-commits.
rsmith accepted this revision.Mar 31 2016, 11:02 AM
rsmith edited edge metadata.
rsmith added inline comments.

Can you add a test for a static data member template too, please?

This revision is now accepted and ready to land.Mar 31 2016, 11:02 AM
erik.pilkington edited edge metadata.

Include local static data member template in test. Thanks for taking a look Richard, would you mind committing this for me?

rsmith closed this revision.Apr 6 2016, 10:44 AM

Landed as r265571.