Commit Graph

3 Commits

Author SHA1 Message Date
Richard Smith 7b8c3c91f4 PR10359: Template declarations which define classes are not permitted to also contain declarators. Previously we would accept code like this:
template<typename T> struct S { } f() { return 0; }

This case now produces a missing ';' diagnostic, since that seems like a much more likely error than an attempt to declare a function or variable in addition to the class template.

Treat this 

llvm-svn: 135195
2011-07-14 21:35:26 +00:00
Douglas Gregor 8b02cd0bea Extend Sema::ClassifyName() to support C++, ironing out a few issues
in the classification of template names and using declarations. We now
properly typo-correct the leading identifiers in statements to types,
templates, values, etc. As an added bonus, this reduces the number of
lookups required for disambiguation.

llvm-svn: 130288
2011-04-27 04:48:22 +00:00
Argyrios Kyrtzidis 8e4be0b1ea Don't enter a qualified scope for an invalid decl.
Fixes assertion later on. rdar://9122937 & http://llvm.org/PR9459

llvm-svn: 130006
2011-04-22 18:52:25 +00:00