[libcxx-commits] [PATCH] D112374: [clang] Implement ElaboratedType sugaring for types written bare
Hans Wennborg via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 28 04:32:53 PDT 2022
hans added a comment.
Here's an example where I think this regressed a Clang diagnostic. Consider:
template <typename T> struct Template { Template(int x) {} };
struct S1 {
struct Foo;
typedef Template<Foo> Typedef;
};
struct S2 {
struct Foo;
typedef Template<Foo> Typedef;
};
typedef S1::Typedef Bar;
Bar f;
before this change, Clang would say:
/tmp/a.cc:14:5: error: no matching constructor for initialization of 'Bar' (aka 'Template<S1::Foo>')
Bar f;
^
however, after this change it says:
/tmp/a.cc:14:5: error: no matching constructor for initialization of 'Bar' (aka 'Template<Foo>')
Bar f;
^
The problem is that just based on `Template<Foo>` it's not clear whether it's `S1::Foo` or `S2::Foo` that's referred to.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112374/new/
https://reviews.llvm.org/D112374
More information about the libcxx-commits
mailing list