Skip to content

[clang] Error (with diagnostic) on valid after #90574 #99894

Closed
@dcci

Description

@dcci
namespace {
typedef char a;
template <typename b> struct ai {
  typedef b aj;
  typedef ai ak;
  aj operator*();
  ak operator++();
  friend bool operator==(ak, ak);
};
template <typename, typename, typename, typename> class am {
  typedef a an;

public:
  typedef ai<an> ao;
};
template <typename ap, typename c = ap> class aq {
  typedef ap ar;
  typedef ap an;
  typedef c as;
  typedef am<ar, an, an, as> at;

public:
  typedef at::ao av;
  av begin();
  av end();
};
namespace {
namespace {
a aw() {
  aq<a> ax;
  for (auto module : ax)
    ;
}
} // namespace
} // namespace
} // namespace

clang patatino.cpp -std=c++20 -c

The patch got reverted, but this is the testcase.

Metadata

Metadata

Assignees

Labels

clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions