Still more to come...just wanted to get the no-brainers out of the way.

llvm-svn: 75477
This commit is contained in:
Steve Naroff 2009-07-13 17:19:15 +00:00
parent 2f0c1c44d5
commit 4eed7a16d6
4 changed files with 5 additions and 17 deletions

View File

@ -215,7 +215,6 @@ static const llvm::Type* getTypeForFormat(const llvm::fltSemantics &format) {
const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) {
const clang::Type &Ty = *Context.getCanonicalType(T);
//T->dump();
switch (Ty.getTypeClass()) {
#define TYPE(Class, Base)
#define ABSTRACT_TYPE(Class, Base)

View File

@ -528,7 +528,6 @@ void Sema::MergeTypeDefDecl(TypedefDecl *New, Decl *OldD) {
// Install the built-in type for 'id', ignoring the current definition.
New->setTypeForDecl(Context.getObjCIdType().getTypePtr());
return;
break;
case 5:
if (!TypeID->isStr("Class"))
break;

View File

@ -2226,7 +2226,7 @@ Sema::ActOnMemberReferenceExpr(Scope *S, ExprArg Base, SourceLocation OpLoc,
}
// Handle properties on ObjC 'Class' types.
if (OpKind == tok::period && (BaseType->isObjCClassType())) {
if (OpKind == tok::period && BaseType->isObjCClassType()) {
// Also must look for a getter name which uses property syntax.
Selector Sel = PP.getSelectorTable().getNullarySelector(&Member);
if (ObjCMethodDecl *MD = getCurMethodDecl()) {
@ -3917,12 +3917,7 @@ QualType Sema::CheckSubtractionOperands(Expr *&lex, Expr *&rex,
// Either ptr - int or ptr - ptr.
if (lex->getType()->isPointerType() ||
lex->getType()->isObjCObjectPointerType()) {
QualType lpointee;
if (const PointerType *LHSPTy = lex->getType()->getAsPointerType())
lpointee = LHSPTy->getPointeeType();
else if (const ObjCObjectPointerType *OPT =
lex->getType()->getAsObjCObjectPointerType())
lpointee = OPT->getPointeeType();
QualType lpointee = lex->getType()->getPointeeType();
// The LHS must be an completely-defined object type.
@ -4295,15 +4290,11 @@ QualType Sema::CheckCompareOperands(Expr *&lex, Expr *&rex, SourceLocation Loc,
<< lType << rType << lex->getSourceRange() << rex->getSourceRange();
}
if (lType->isObjCQualifiedIdType() && rType->isObjCQualifiedIdType()) {
if (ObjCQualifiedIdTypesAreCompatible(lType, rType, true)) {
ImpCastExprToType(rex, lType);
return ResultTy;
} else {
if (!ObjCQualifiedIdTypesAreCompatible(lType, rType, true))
Diag(Loc, diag::warn_incompatible_qualified_id_operands)
<< lType << rType << lex->getSourceRange() << rex->getSourceRange();
ImpCastExprToType(rex, lType);
return ResultTy;
}
ImpCastExprToType(rex, lType);
return ResultTy;
}
ImpCastExprToType(rex, lType);
return ResultTy;

View File

@ -765,7 +765,6 @@ bool Sema::ObjCQualifiedIdTypesAreCompatible(QualType lhs, QualType rhs,
if (!ClassImplementsProtocol(*I, rhsID, true))
return false;
}
return true;
}
// If there are no qualifiers and no interface, we have an 'id'.
return true;