[PATCH] D112374: [clang] Implement ElaboratedType sugaring for types written bare
Matheus Izvekov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 28 05:17:56 PDT 2022
mizvekov added a comment.
In D112374#3684722 <https://reviews.llvm.org/D112374#3684722>, @hans wrote:
> Here's an example where I think this regressed a Clang diagnostic. Consider:
Consider this simple extension of this example, to show how this general problem already existed: https://godbolt.org/z/n6nGhejTc
template <typename T> struct Template { Template(int x) {} };
struct S1 {
struct Baz {
struct Foo;
};
typedef Template<Baz::Foo> Typedef;
};
struct S2 {
struct Baz {
struct Foo;
};
typedef Template<Baz::Foo> Typedef;
};
typedef S1::Typedef Bar;
Bar f;
Prints: `error: no matching constructor for initialization of 'Bar' (aka 'Template<Baz::Foo>')`
You still don't know which `Foo` this refers to, because you don't know which `Baz` it is either.
This patch fixed the inconsistency where we printed the bare `Foo` with the synthetic nested name, but printed `Baz::Foo` as written.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112374/new/
https://reviews.llvm.org/D112374
More information about the cfe-commits
mailing list