Commit Graph

8 Commits

Author SHA1 Message Date
Douglas Gregor c99f155365 Unify the end-of-class code paths used by the parser and template
instantiation, to ensure that we mark class template specilizations as
abstract when we need to and perform checking of abstract classes.

Also, move the checking that determines whether we are creating a
variable of abstract class type *after* we check whether the type is
complete. Otherwise, we won't see when we have an abstract class
template specialization that is implicitly instantiated by this
declaration. This is the "something else" that Sebastian had noted
earlier.

llvm-svn: 90467
2009-12-03 18:33:45 +00:00
Douglas Gregor 6be3de3fa7 Funtion templates and function template specializations do not
override virtual functions. Also, eliminate a (now redundant) call to
AddOverriddenMethods.

llvm-svn: 90242
2009-12-01 17:35:23 +00:00
Douglas Gregor 21920e3758 Move the checking of overridden virtual functions into the code path
common to both parsing and template instantiation, so that we'll find
overridden virtuals for member functions of class templates when they
are instantiated. 

Additionally, factor out the checking for pure virtual functions, so
that it will be executed both at parsing time and at template
instantiation time. 

These changes fix PR5656 (for real), although one more tweak
w.r.t. member function templates will be coming along shortly.

llvm-svn: 90241
2009-12-01 17:24:26 +00:00
Douglas Gregor f107aa63ee An inherited virtual (where "virtual" wasn't written explicitly) can
be defined as pure. Fixes PR5656.

llvm-svn: 90237
2009-12-01 16:18:00 +00:00
Anders Carlsson 0a7c01ff2b Check that the function being overridden is virtual.
llvm-svn: 71802
2009-05-14 22:15:41 +00:00
Anders Carlsson 0224c67400 Fix the same speling error in the test case (Duh).
llvm-svn: 71793
2009-05-14 21:20:16 +00:00
Anders Carlsson 8fb0b8a2cb Better diagnostics for covariance when checking overriding return types.
llvm-svn: 71786
2009-05-14 19:52:19 +00:00
Anders Carlsson f2a2e338ff Add return type checking for overriding virtual functions. We currently don't check covariance but that's next.
llvm-svn: 71759
2009-05-14 01:09:04 +00:00