Bug #:
Submitted by: Reviewed by: Fix "FIXME: does this lose qualifiers from the typedef??" in ASTContext::getTypedefType(). This change was fairly pervasive...nevertheless, here are the highlights: - Change the type of Type::CanonicalType to TypeRef (was "Type *"). - Change the implementation of TypeRef::getCanonicalType() to work for typedefs. - Make the implementation of Type::getCanonicalType private (only TypeRef should access). This will force clients to use TypeRef::getCanonicalType (the correct version of the function). Since TypeRef overloads "->", it was very easy to fall into this bug... - Changed many references of "Type *" to "TypeRef"...when the raw type pointer is required, use t.getTypePtr(). - Changed all the *Type classes to take a TypeRef. - Made the Type constructor protected (cleanup). - Removed function Expr::getType(). - Convert functions in SemaExpr to use the above support. This fixed the "const" bug I was originally investigating. I will follow this check-in up with a rename of TypeRef->QualType. I will also make sure the constructor does not default to 0 (which can lead to broken code...). llvm-svn: 39394
Loading
Please register or sign in to comment