summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/CXXInheritance.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Use CanQualType to enforce the use of a canonical type argument toDouglas Gregor2010-05-211-3/+2
| | | | | | | CXXBasePaths::isAmbiguous(), rather than just asserting that we have a canonical type. Fixes PR7176. llvm-svn: 104374
* Implement computation of the final overriders for each virtualDouglas Gregor2010-03-231-0/+237
| | | | | | | | | | | | | | | | | | | | 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
* Implement name hiding for names found through virtual base subobjectsDouglas Gregor2010-03-031-1/+83
| | | | | | | | that are hidden by other derived base subobjects reached along a lookup path that does *not* pass through the hiding subobject (C++ [class.member.lookup]p6). Fixes PR6462. llvm-svn: 97640
* Refactor CXXRecordDecl::lookupInBases() to push the recursion down aDouglas Gregor2010-03-031-27/+35
| | | | | | | level. No functionality change, and it obeys access control this time. llvm-svn: 97634
* Revert r97618. Access control sucksDouglas Gregor2010-03-031-18/+9
| | | | llvm-svn: 97621
* Factor out the recursive lookup into C++ base classes into a separate,Douglas Gregor2010-03-031-9/+18
| | | | | | static function. No functionality change. llvm-svn: 97618
* Eliminate the ASTContext parameter from RecordDecl::getDefinition()Douglas Gregor2010-02-111-2/+1
| | | | | | | and CXXRecordDecl::getDefinition(); it's totally unnecessary. No functionality change. llvm-svn: 95836
* Reset the found-virtual-base state unless the *current* base produces a path,John McCall2010-02-091-4/+7
| | | | | | | | not *any* base up to now has produced a path. Fixes PR 6254. I'll do the access-control part of this patch RSN. llvm-svn: 95638
* Implement elementary access control.John McCall2010-01-231-14/+28
| | | | llvm-svn: 94268
* First pass at collecting access-specifier information along inheritance paths.John McCall2010-01-201-2/+18
| | | | | | | | Triggers lots of assertions about missing access information; fix them. Will actually consume this information soon. llvm-svn: 94038
* In CXXRecordDecl::forallBases, add the base to the "queue", so we walk more ↵Anders Carlsson2009-12-091-2/+4
| | | | | | than one heirarchy of classes. John, please review. llvm-svn: 90948
* Add CXXRecordDecl::forallBases to walk an inheritance hierarchy with non-lookupJohn McCall2009-12-081-0/+49
| | | | | | | semantics and CXXRecordDecl::isProvablyNotDerivedFrom to assist with pre-instantiation diagnostics. llvm-svn: 90842
* First part of changes to eliminate problems with cv-qualifiers andDouglas Gregor2009-11-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sugared types. The basic problem is that our qualifier accessors (getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at the current QualType and not at any qualifiers that come from sugared types, meaning that we won't see these qualifiers through, e.g., typedefs: typedef const int CInt; typedef CInt Self; Self.isConstQualified() currently returns false! Various bugs (e.g., PR5383) have cropped up all over the front end due to such problems. I'm addressing this problem by splitting each qualifier accessor into two versions: - the "local" version only returns qualifiers on this particular QualType instance - the "normal" version that will eventually combine qualifiers from this QualType instance with the qualifiers on the canonical type to produce the full set of qualifiers. This commit adds the local versions and switches a few callers from the "normal" version (e.g., isConstQualified) over to the "local" version (e.g., isLocalConstQualified) when that is the right thing to do, e.g., because we're printing or serializing the qualifiers. Also, switch a bunch of Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType() expressions over to Context.hasSameUnqualifiedType(T1, T2) llvm-svn: 88969
* Random const correctness, and incidentally use computeDeclContext when buildingJohn McCall2009-11-121-12/+13
| | | | | | a using declaration. llvm-svn: 86942
* Canonicality is a property of qualified types, not unqualified types.John McCall2009-10-221-1/+1
| | | | llvm-svn: 84891
* Fix eof.Mike Stump2009-10-061-1/+1
| | | | llvm-svn: 83433
* Refactor the code that walks a C++ inheritance hierarchy, searchingDouglas Gregor2009-10-061-0/+244
for bases, members, overridden virtual methods, etc. The operations isDerivedFrom and lookupInBases are now provided by CXXRecordDecl, rather than by Sema, so that CodeGen and other clients can use them directly. llvm-svn: 83396
OpenPOWER on IntegriCloud