summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/class.derived/class.abstract
Commit message (Collapse)AuthorAgeFilesLines
* [cxx2a] P0641R2: (Some) type mismatches on defaulted functions onlyRichard Smith2018-09-281-2/+2
| | | | | | | | | | | | | | | | render the function deleted instead of rendering the program ill-formed. This change also adds an enabled-by-default warning for the case where an explicitly-defaulted special member function of a non-template class is implicitly deleted by the type checking rules. (This fires either due to this language change or due to pre-C++20 reasons for the member being implicitly deleted). I've tested this on a large codebase and found only bugs (where the program means something that's clearly different from what the programmer intended), so this is enabled by default, but we should revisit this if there are problems with this being enabled by default. llvm-svn: 343285
* Add context note to diagnostics that occur while declaring an implicit ↵Richard Smith2017-02-231-3/+5
| | | | | | special member function. llvm-svn: 296020
* Move checks for creation of objects of abstract class type from the variousRichard Smith2016-12-152-0/+120
| | | | | | | | | constructs that can do so into the initialization code. This fixes a number of different cases in which we used to fail to check for abstract types. Thanks to Tim Shen for inspiring the weird code that uncovered this! llvm-svn: 289753
* When diagnosing that a defaulted function is ill-formed because it would beRichard Smith2016-10-311-5/+13
| | | | | | | implicitly deleted and overrides a non-deleted function, explain why the function is deleted. For PR30844. llvm-svn: 285610
* Implement final resolution of DR1402: implicitly-declared move operators thatRichard Smith2013-11-041-2/+2
| | | | | | | | | | | would be deleted are still declared, but are ignored by overload resolution. Also, don't delete such members if a subobject has no corresponding move operation and a non-trivial copy. This causes us to implicitly declare move operations in more cases, but risks move-assigning virtual bases multiple times in some circumstances (a warning for that is to follow). llvm-svn: 193969
* If a defaulted special member is implicitly deleted, check whether it'sRichard Smith2013-04-021-0/+26
| | | | | | | overriding a non-deleted virtual function. The existing check for this doesn't catch this case, because it fires before we mark the method as deleted. llvm-svn: 178563
* Implement C++ 10.3p16 - overrides involving deleted functions must match.David Blaikie2012-10-171-0/+16
| | | | | | | Only deleted functions may override deleted functions and non-deleted functions may only override non-deleted functions. llvm-svn: 166082
* Fix PR8767, improve diagnostic wording when allocating an object of anChandler Carruth2011-02-182-7/+7
| | | | | | | | abstract class type. Patch by Stephen Hines, with a wording tweak from Doug applied by me. llvm-svn: 125996
* Implement computation of the final overriders for each virtualDouglas Gregor2010-03-232-0/+103
function within a class hierarchy (C++ [class.virtual]p2). We use the final-overrider computation to determine when a particular class is ill-formed because it has multiple final overriders for a given virtual function (e.g., because two virtual functions override the same virtual function in the same virtual base class). Fixes PR5973. We also use the final-overrider computation to determine which virtual member functions are pure when determining whether a class is abstract or diagnosing the improper use of an abstract class. The prior approach to determining whether there were any pure virtual functions in a class didn't cope with virtual base class subobjects properly, and could not easily be fixed to deal with the oddities of subobject hiding. Fixes PR6631. llvm-svn: 99351
OpenPOWER on IntegriCloud