We currently just emit "expected class name" if the base specifier names a template-id without a template argument list. This patch changes that error to say "expected template argument list after template-id". Fixes PR8382! Please review.
There is a secondary side-effect with the interaction with typo correction
which is partly undesirable (too verbose) and partly better (typo
correction is performed). On this testcase:
template <typename T> class Foo {}; class Bar : public Foox {};
before my patch, clang emits:
a.cc:1:56: error: expected class name
[point at 'Foox']
and with my patch clang emits:
a.cc:1:56: error: no template named 'Foox'; did you mean 'Foo'?
template <typename T> class Foo {}; class Bar : public Foox {};
[point at 'Foox' suggest 'Foo']
a.cc:1:29: note: 'Foo' declared here
template <typename T> class Foo {}; class Bar : public Foox {};
[point at 'Foo']
a.cc:1:56: error: expected template argument list after template-id
template <typename T> class Foo {}; class Bar : public Foox {};
[point at 'Foox']
Nick
pr8382-1.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
